1
0
Fork 0
forked from suyu/suyu

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.
This commit is contained in:
Lioncash 2018-10-10 20:54:00 -04:00
parent 03ec936ca0
commit 6e6ce2ce39

View file

@ -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 common PRIVATE audio_core video_core)
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn open_source_archives) target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static mbedtls opus unicorn open_source_archives)
if (ENABLE_WEB_SERVICE) 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) target_link_libraries(core PUBLIC json-headers web_service)
endif() endif()