From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:32:52 +0200 Subject: Move CMake files to modernized cmake syntax, step 1. Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects. --- indra/viewer_components/login/CMakeLists.txt | 31 +++++++--------------------- 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'indra/viewer_components/login/CMakeLists.txt') diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 23518b791c..0508a17f3a 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -7,21 +7,7 @@ if(LL_TESTS) include(LLAddBuildTest) endif(LL_TESTS) include(LLCommon) -include(LLMath) -include(LLXML) -include(Boost) include(LLCoreHttp) -include(LLMessage) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) set(login_SOURCE_FILES lllogin.cpp @@ -42,17 +28,14 @@ list(APPEND add_library(lllogin ${login_SOURCE_FILES} ) +set_target_include_dirs( lllogin ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(lllogin - ${LLMESSAGE_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLXML_LIBRARIES} - ${BOOST_THREAD_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} + llmessage + llcorehttp + llcommon + llmath + llxml ) if(LL_TESTS) @@ -62,7 +45,7 @@ if(LL_TESTS) set_source_files_properties( lllogin.cpp PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${LLMESSAGE_LIBRARIES};${LLCOREHTTP_LIBRARIES};${LLCOMMON_LIBRARIES};${BOOST_FIBER_LIBRARY};${BOOST_CONTEXT_LIBRARY};${BOOST_THREAD_LIBRARY};${BOOST_SYSTEM_LIBRARY}" + LL_TEST_ADDITIONAL_LIBRARIES llmessage llcorehttp llcommon ) LL_ADD_PROJECT_UNIT_TESTS(lllogin "${lllogin_TEST_SOURCE_FILES}") -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:04:57 +0200 Subject: Switch to target_include_directories All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries. --- indra/viewer_components/login/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/viewer_components/login/CMakeLists.txt') diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 0508a17f3a..76e38acf8a 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -28,7 +28,7 @@ list(APPEND add_library(lllogin ${login_SOURCE_FILES} ) -set_target_include_dirs( lllogin ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( lllogin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(lllogin llmessage -- cgit v1.2.3 From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 00:38:40 +0200 Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically sets the property on those. --- indra/viewer_components/login/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/viewer_components/login/CMakeLists.txt') diff --git a/indra/viewer_components/login/CMakeLists.txt b/indra/viewer_components/login/CMakeLists.txt index 76e38acf8a..8381803b03 100644 --- a/indra/viewer_components/login/CMakeLists.txt +++ b/indra/viewer_components/login/CMakeLists.txt @@ -17,9 +17,6 @@ set(login_HEADER_FILES lllogin.h ) -set_source_files_properties(${login_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND login_SOURCE_FILES ${login_HEADER_FILES} -- cgit v1.2.3