diff options
author | Robert Adam <dev@robert-adam.de> | 2022-09-08 13:41:45 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2022-09-10 18:28:34 +0300 |
commit | 09a17879f8680abd89f6c7d1e62a0f2132e588dc (patch) | |
tree | ac246e6629635ddeac0072594b6f8667b25b4f0e /src/mumble | |
parent | b61091dbd7b07b01c64f7df65d2bef029f4528ff (diff) |
BUILD(cmake): Use EXCLUDE_FROM_ALL for 3rdparty subdirs
This prevents adding all targets in said subdirectories to the ALL
target by default. Instead, only those targets that are explicitly
referenced (e.g. via target_link_libraries) are built.
This also has the side-effect that any install-directives in these
subdirectories are also ignored for the default install targets which
prevents these libraries of unconditionally installing themselves when
issuing a make install. Instead, we now have to make any 3rdparty
component that we do indeed want to install, do so explicitly (e.g. via
install_library()).
Diffstat (limited to 'src/mumble')
-rw-r--r-- | src/mumble/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mumble/CMakeLists.txt b/src/mumble/CMakeLists.txt index abe2820d0..585f09f47 100644 --- a/src/mumble/CMakeLists.txt +++ b/src/mumble/CMakeLists.txt @@ -506,7 +506,7 @@ endif() if(bundled-json) set(JSON_BuildTests OFF CACHE INTERNAL "") set(JSON_ImplicitConversions OFF CACHE INTERNAL "") - add_subdirectory("${3RDPARTY_DIR}/nlohmann_json/" "${CMAKE_CURRENT_BINARY_DIR}/nlohmann_json/") + add_subdirectory("${3RDPARTY_DIR}/nlohmann_json/" "${CMAKE_CURRENT_BINARY_DIR}/nlohmann_json/" EXCLUDE_FROM_ALL) else() find_pkg("nlohmann_json" REQUIRED) endif() @@ -596,7 +596,7 @@ if(WIN32) target_link_libraries(mumble_client_object_lib PUBLIC Qt5::QWindowsIntegrationPlugin) endif() - add_subdirectory("${3RDPARTY_DIR}/xinputcheck-build" "${CMAKE_CURRENT_BINARY_DIR}/xinputcheck") + add_subdirectory("${3RDPARTY_DIR}/xinputcheck-build" "${CMAKE_CURRENT_BINARY_DIR}/xinputcheck" EXCLUDE_FROM_ALL) # Disable all warnings that the xinputcheck code may emit disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/xinputcheck-build") @@ -698,7 +698,7 @@ if(bundled-opus) option(OPUS_STACK_PROTECTOR "" OFF) endif() - add_subdirectory("${3RDPARTY_DIR}/opus" "${CMAKE_CURRENT_BINARY_DIR}/opus") + add_subdirectory("${3RDPARTY_DIR}/opus" "${CMAKE_CURRENT_BINARY_DIR}/opus" EXCLUDE_FROM_ALL) # Disable all warnings that the Opus code may emit disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/opus") @@ -725,7 +725,7 @@ else() endif() if(bundled-speex) - add_subdirectory("${3RDPARTY_DIR}/speexdsp-build" "${CMAKE_CURRENT_BINARY_DIR}/speexdsp") + add_subdirectory("${3RDPARTY_DIR}/speexdsp-build" "${CMAKE_CURRENT_BINARY_DIR}/speexdsp" EXCLUDE_FROM_ALL) # Disable all warnings that the speexdsp code may emit disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/speexdsp-build") @@ -754,7 +754,7 @@ if(rnnoise) target_compile_definitions(mumble_client_object_lib PRIVATE "USE_RNNOISE") if(bundled-rnnoise) - add_subdirectory("${3RDPARTY_DIR}/rnnoise-build" "${CMAKE_CURRENT_BINARY_DIR}/rnnoise") + add_subdirectory("${3RDPARTY_DIR}/rnnoise-build" "${CMAKE_CURRENT_BINARY_DIR}/rnnoise" EXCLUDE_FROM_ALL) # Disable all warnings that the RNNoise code may emit disable_warnings_for_all_targets_in("${3RDPARTY_DIR}/rnnoise-build") |