From dbe7fd979f8c9e2abac5c2d0d8a8a4fe79e8f0a6 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sun, 3 May 2026 13:43:47 +0100 Subject: [PATCH] cmake: Add EXCLUDE_FROM_ALL to targets where applicable --- externals/CMakeLists.txt | 28 ++++++++++++++-------------- src/audio_core/CMakeLists.txt | 2 +- src/common/CMakeLists.txt | 2 +- src/core/CMakeLists.txt | 2 +- src/input_common/CMakeLists.txt | 2 +- src/network/CMakeLists.txt | 2 +- src/video_core/CMakeLists.txt | 2 +- src/web_service/CMakeLists.txt | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 046e484fe..c5d424ff4 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -57,7 +57,7 @@ if (ENABLE_TESTS) else() set(CATCH_INSTALL_DOCS OFF CACHE BOOL "") set(CATCH_INSTALL_EXTRAS OFF CACHE BOOL "") - add_subdirectory(catch2) + add_subdirectory(catch2 EXCLUDE_FROM_ALL) endif() target_link_libraries(catch2 INTERFACE Catch2::Catch2WithMain) include(Catch) @@ -79,7 +79,7 @@ else() set(CRYPTOPP_BUILD_TESTING OFF CACHE BOOL "") set(CRYPTOPP_INSTALL OFF CACHE BOOL "") set(CRYPTOPP_SOURCES "${CMAKE_SOURCE_DIR}/externals/cryptopp" CACHE STRING "") - add_subdirectory(cryptopp-cmake) + add_subdirectory(cryptopp-cmake EXCLUDE_FROM_ALL) endif() # dds-ktx @@ -142,7 +142,7 @@ endif() # getopt if (MSVC) - add_subdirectory(getopt) + add_subdirectory(getopt EXCLUDE_FROM_ALL) endif() # inih @@ -151,7 +151,7 @@ if(USE_SYSTEM_INIH) add_library(inih INTERFACE) target_link_libraries(inih INTERFACE inih::inih inih::inir) else() - add_subdirectory(inih) + add_subdirectory(inih EXCLUDE_FROM_ALL) endif() # MicroProfile @@ -174,7 +174,7 @@ if (NOT MSVC) endif() # Open Source Archives -add_subdirectory(open_source_archives) +add_subdirectory(open_source_archives EXCLUDE_FROM_ALL) # faad2 add_subdirectory(faad2 EXCLUDE_FROM_ALL) @@ -213,12 +213,12 @@ add_subdirectory(teakra EXCLUDE_FROM_ALL) # SDL2 if (ENABLE_SDL2 AND NOT USE_SYSTEM_SDL2) - add_subdirectory(sdl2) + add_subdirectory(sdl2 EXCLUDE_FROM_ALL) endif() # libusb if (ENABLE_LIBUSB AND NOT USE_SYSTEM_LIBUSB) - add_subdirectory(libusb) + add_subdirectory(libusb EXCLUDE_FROM_ALL) set(LIBUSB_INCLUDE_DIR "" PARENT_SCOPE) set(LIBUSB_LIBRARIES usb PARENT_SCOPE) endif() @@ -262,7 +262,7 @@ if(USE_SYSTEM_ENET) add_library(enet INTERFACE) target_link_libraries(enet INTERFACE libenet::libenet) else() - add_subdirectory(enet) + add_subdirectory(enet EXCLUDE_FROM_ALL) target_include_directories(enet INTERFACE ./enet/include) endif() @@ -370,7 +370,7 @@ target_compile_options(httplib INTERFACE -DCPPHTTPLIB_OPENSSL_SUPPORT) target_link_libraries(httplib INTERFACE ${OPENSSL_LIBRARIES}) if (UNIX AND NOT APPLE) - add_subdirectory(gamemode) + add_subdirectory(gamemode EXCLUDE_FROM_ALL) endif() # cpp-jwt @@ -393,13 +393,13 @@ if(USE_SYSTEM_LODEPNG) find_package(lodepng REQUIRED) target_link_libraries(lodepng INTERFACE lodepng::lodepng) else() - add_subdirectory(lodepng) + add_subdirectory(lodepng EXCLUDE_FROM_ALL) endif() # (xperia64): Only use libyuv on Android b/c of build issues on Windows and mandatory JPEG if(ANDROID) # libyuv - add_subdirectory(libyuv) + add_subdirectory(libyuv EXCLUDE_FROM_ALL) target_include_directories(yuv INTERFACE ./libyuv/include) endif() @@ -428,7 +428,7 @@ endif() # OpenGL dependencies if (ENABLE_OPENGL) # Glad - add_subdirectory(glad) + add_subdirectory(glad EXCLUDE_FROM_ALL) endif() # Vulkan dependencies @@ -468,7 +468,7 @@ if (ENABLE_VULKAN) set(ENABLE_CTEST OFF CACHE BOOL "") set(ENABLE_HLSL OFF CACHE BOOL "") set(BUILD_EXTERNAL OFF CACHE BOOL "") - add_subdirectory(glslang) + add_subdirectory(glslang EXCLUDE_FROM_ALL) endif() # sirit @@ -516,7 +516,7 @@ if (ENABLE_VULKAN) # adrenotools if (ANDROID AND "arm64" IN_LIST ARCHITECTURE) - add_subdirectory(libadrenotools) + add_subdirectory(libadrenotools EXCLUDE_FROM_ALL) endif() endif() diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index 6ea16672e..f6f8bf9ed 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(audio_core STATIC +add_library(audio_core STATIC EXCLUDE_FROM_ALL audio_types.h codec.cpp codec.h diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 931899f5f..ae812c89d 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,6 +1,6 @@ include(GenerateSCMRev) -add_library(citra_common STATIC +add_library(citra_common STATIC EXCLUDE_FROM_ALL aarch64/cpu_detect.cpp aarch64/cpu_detect.h aarch64/oaknut_abi.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e3f8e5275..dfcb20a27 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(citra_core STATIC +add_library(citra_core STATIC EXCLUDE_FROM_ALL 3ds.h arm/arm_interface.h arm/dyncom/arm_dyncom.cpp diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 70d36cbfd..2226f7931 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(input_common STATIC +add_library(input_common STATIC EXCLUDE_FROM_ALL analog_from_button.cpp analog_from_button.h keyboard.cpp diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index 3feb6f479..365bd6877 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(network STATIC +add_library(network STATIC EXCLUDE_FROM_ALL announce_multiplayer_session.cpp announce_multiplayer_session.h artic_base/artic_base_client.cpp diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index a8ade344d..528072c9a 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt @@ -1,6 +1,6 @@ add_subdirectory(host_shaders) -add_library(video_core STATIC +add_library(video_core STATIC EXCLUDE_FROM_ALL custom_textures/custom_format.cpp custom_textures/custom_format.h custom_textures/custom_tex_manager.cpp diff --git a/src/web_service/CMakeLists.txt b/src/web_service/CMakeLists.txt index 7dabb7b45..d21c0eace 100644 --- a/src/web_service/CMakeLists.txt +++ b/src/web_service/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(web_service STATIC +add_library(web_service STATIC EXCLUDE_FROM_ALL announce_room_json.cpp announce_room_json.h precompiled_headers.h