Build: Fix double-linking when creating Flatpak

This commit is contained in:
Stenzek 2023-09-05 22:57:58 +10:00
parent eb07d698cd
commit 56d95c3331
3 changed files with 30 additions and 30 deletions

View file

@ -1,52 +1,52 @@
add_subdirectory(fmt) add_subdirectory(fmt EXCLUDE_FROM_ALL)
add_subdirectory(stb) add_subdirectory(stb EXCLUDE_FROM_ALL)
add_subdirectory(zlib) add_subdirectory(zlib EXCLUDE_FROM_ALL)
add_subdirectory(zstd) add_subdirectory(zstd EXCLUDE_FROM_ALL)
add_subdirectory(minizip) add_subdirectory(minizip EXCLUDE_FROM_ALL)
add_subdirectory(lzma) add_subdirectory(lzma EXCLUDE_FROM_ALL)
add_subdirectory(libchdr) add_subdirectory(libchdr EXCLUDE_FROM_ALL)
add_subdirectory(xxhash) add_subdirectory(xxhash EXCLUDE_FROM_ALL)
add_subdirectory(rapidjson) add_subdirectory(rapidjson EXCLUDE_FROM_ALL)
add_subdirectory(glslang) add_subdirectory(glslang EXCLUDE_FROM_ALL)
add_subdirectory(imgui) add_subdirectory(imgui EXCLUDE_FROM_ALL)
add_subdirectory(simpleini) add_subdirectory(simpleini EXCLUDE_FROM_ALL)
add_subdirectory(vulkan) add_subdirectory(vulkan EXCLUDE_FROM_ALL)
add_subdirectory(soundtouch) add_subdirectory(soundtouch EXCLUDE_FROM_ALL)
add_subdirectory(googletest) add_subdirectory(googletest EXCLUDE_FROM_ALL)
add_subdirectory(cpuinfo) add_subdirectory(cpuinfo EXCLUDE_FROM_ALL)
add_subdirectory(fast_float) add_subdirectory(fast_float EXCLUDE_FROM_ALL)
add_subdirectory(reshadefx) add_subdirectory(reshadefx EXCLUDE_FROM_ALL)
if(ENABLE_CUBEB) if(ENABLE_CUBEB)
add_subdirectory(cubeb) add_subdirectory(cubeb EXCLUDE_FROM_ALL)
endif() endif()
if(ENABLE_OPENGL) if(ENABLE_OPENGL)
add_subdirectory(glad) add_subdirectory(glad EXCLUDE_FROM_ALL)
endif() endif()
if(ENABLE_DISCORD_PRESENCE) if(ENABLE_DISCORD_PRESENCE)
add_subdirectory(discord-rpc) add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
endif() endif()
if(ENABLE_CHEEVOS) if(ENABLE_CHEEVOS)
add_subdirectory(rcheevos) add_subdirectory(rcheevos EXCLUDE_FROM_ALL)
endif() endif()
if(${CPU_ARCH} STREQUAL "aarch32" OR ${CPU_ARCH} STREQUAL "aarch64") if(${CPU_ARCH} STREQUAL "aarch32" OR ${CPU_ARCH} STREQUAL "aarch64")
add_subdirectory(vixl) add_subdirectory(vixl EXCLUDE_FROM_ALL)
endif() endif()
if(${CPU_ARCH} STREQUAL "riscv64") if(${CPU_ARCH} STREQUAL "riscv64")
add_subdirectory(biscuit) add_subdirectory(biscuit EXCLUDE_FROM_ALL)
add_subdirectory(riscv-disas) add_subdirectory(riscv-disas EXCLUDE_FROM_ALL)
endif() endif()
if(WIN32) if(WIN32)
add_subdirectory(d3d12ma) add_subdirectory(d3d12ma EXCLUDE_FROM_ALL)
add_subdirectory(winpixeventruntime) add_subdirectory(winpixeventruntime EXCLUDE_FROM_ALL)
endif() endif()
if(APPLE) if(APPLE)
add_subdirectory(spirv-cross) add_subdirectory(spirv-cross EXCLUDE_FROM_ALL)
endif() endif()

View file

@ -20,5 +20,5 @@ if(BUILD_REGTEST)
endif() endif()
if(BUILD_TESTS) if(BUILD_TESTS)
add_subdirectory(common-tests) add_subdirectory(common-tests EXCLUDE_FROM_ALL)
endif() endif()

View file

@ -4,7 +4,7 @@ if(WIN32)
COMMAND cmd /k "${CMAKE_CURRENT_SOURCE_DIR}/gen_scmversion.bat" COMMAND cmd /k "${CMAKE_CURRENT_SOURCE_DIR}/gen_scmversion.bat"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
else() else()
add_custom_command(OUTPUT scmversion.cpp _scmversion.cpp add_custom_command(OUTPUT scmversion.cpp PRE_BUILD
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/gen_scmversion.sh") COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/gen_scmversion.sh")
endif() endif()