Merge pull request #54 from wheremyfoodat/dynapica

Make LTO a proper CMake option
This commit is contained in:
wheremyfoodat 2023-07-01 13:43:08 +03:00 committed by GitHub
commit d0d7bbf038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -14,6 +14,7 @@ project(Alber)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
option(GPU_DEBUG_INFO "Enable additional GPU debugging info" OFF)
option(ENABLE_LTO "Enable link-time optimization" OFF)
include_directories(${PROJECT_SOURCE_DIR}/include/)
include_directories(${PROJECT_SOURCE_DIR}/include/kernel)
@ -158,8 +159,9 @@ source_group("Source Files\\Third Party" FILES ${THIRD_PARTY_SOURCE_FILES})
add_executable(Alber ${SOURCE_FILES} ${FS_SOURCE_FILES} ${CRYPTO_SOURCE_FILES} ${KERNEL_SOURCE_FILES} ${LOADER_SOURCE_FILES} ${SERVICE_SOURCE_FILES}
${PICA_SOURCE_FILES} ${RENDERER_GL_SOURCE_FILES} ${THIRD_PARTY_SOURCE_FILES} ${HEADER_FILES})
# Uncomment to enable LTO
# set_target_properties(Alber PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
if(ENABLE_LTO)
set_target_properties(Alber PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
target_link_libraries(Alber PRIVATE dynarmic SDL2-static glad cryptopp)

View file

@ -29,7 +29,7 @@ The 3DS emulation scene is already pretty mature, with offerings such as [Citra]
Keep in mind, these are all long-term plans. Until then, the main focus is just improving compatibility
# How to build
Panda3DS compiles on Windows, Linux and MacOS (if you use a compiler other than AppleClang), without needing to download any system dependencies.
Panda3DS compiles on Windows, Linux and MacOS, without needing to download any system dependencies.
All you need is CMake and a generator of your choice (Make, Visual Studio, Ninja, etc). Simply clone the repo recursively and build it like your average CMake project.