From 6e6ce2ce39b1461c0cf870f79e0d0dde1cfe2d35 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 10 Oct 2018 20:54:00 -0400 Subject: core/CMakeLists: Use target_compile_definitions instead of add_definitions for specifying ENABLE_WEB_SERVICE Avoids introducing the definition to the whole directory space and localizes it to being added to the library that needs it. --- src/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e4a676e91..f3b44fac0 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -397,7 +397,7 @@ create_target_directory_groups(core) target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn open_source_archives) if (ENABLE_WEB_SERVICE) - add_definitions(-DENABLE_WEB_SERVICE) + target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE) target_link_libraries(core PUBLIC json-headers web_service) endif() -- cgit v1.2.3 From 28ec921d0d49957c067783d1e21d18734c17c67d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 10 Oct 2018 21:37:19 -0400 Subject: core/CMakeLists: Make all web_service-related libraries private Now that all external dependencies are hidden, we can remove json-headers from the publically linked libraries, as the use of this library is now completely hidden from external users of the web_service library. We can also make the web_services library private as well, considering it's not a requirement. If a library needs to link in web_service, it should be done explicitly -- not via indirect linking. --- src/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f3b44fac0..194e5f3f7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -398,7 +398,7 @@ target_link_libraries(core PUBLIC common PRIVATE audio_core video_core) target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn open_source_archives) if (ENABLE_WEB_SERVICE) target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE) - target_link_libraries(core PUBLIC json-headers web_service) + target_link_libraries(core PRIVATE web_service) endif() if (ARCHITECTURE_x86_64) -- cgit v1.2.3