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/llfilesystem/CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 09c4c33ebf..dfc290a48b 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -60,15 +60,10 @@ list(APPEND llfilesystem_SOURCE_FILES ${llfilesystem_HEADER_FILES}) add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) -set(cache_BOOST_LIBRARIES - ${BOOST_FILESYSTEM_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ) - target_link_libraries(llfilesystem - ${LLCOMMON_LIBRARIES} - ${cache_BOOST_LIBRARIES} + llcommon ) +set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) if (DARWIN) include(CMakeFindFrameworks) @@ -92,7 +87,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon llfilesystem ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon llfilesystem ${WINDOWS_LIBRARIES}) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") -- cgit v1.3 From bb85651d987a6cb969de7dd7c2b130411de6203c Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:29:02 +0200 Subject: Create a new target ll::oslibrary to link against libs specific to the OS compiled on. This gets rid of the a few OS specific set and uses variables (which some even seemed mostly duplicate like WINDOWS_LIBRARIES ans UI_LIBRARIES) and it also solves the problem of having them to tack on every target, as of no they come as a transitive dependency from llcommon --- indra/cmake/LLAddBuildTest.cmake | 2 - indra/cmake/Linking.cmake | 70 ++++++++++++++-------- .../llimage_libtest/CMakeLists.txt | 14 ----- .../integration_tests/llui_libtest/CMakeLists.txt | 16 ----- indra/llcommon/CMakeLists.txt | 13 +--- indra/llcorehttp/CMakeLists.txt | 2 - indra/llfilesystem/CMakeLists.txt | 9 +-- indra/llinventory/CMakeLists.txt | 2 +- indra/llmessage/CMakeLists.txt | 17 +----- indra/llplugin/slplugin/CMakeLists.txt | 8 --- indra/llui/CMakeLists.txt | 4 +- indra/llxml/CMakeLists.txt | 1 - indra/newview/CMakeLists.txt | 16 ----- indra/test/CMakeLists.txt | 2 - 14 files changed, 52 insertions(+), 124 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index a3c873b389..9412475640 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -46,8 +46,6 @@ INCLUDE(GoogleMock) SET(alltest_LIBRARIES llcommon ll::googlemock - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} ) IF(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 4a57a6a3ef..ccbb27ca42 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -55,32 +55,50 @@ endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS}) +create_target(ll::oslibraries) + if (LINUX) - set(DL_LIBRARY dl) - set(PTHREAD_LIBRARY pthread) -else (LINUX) - set(DL_LIBRARY "") - set(PTHREAD_LIBRARY "") -endif (LINUX) + set_target_libraries( ll::oslibraries + dl + pthread + rt) +elseif (WINDOWS) + set_target_libraries( ll::oslibraries + advapi32 + shell32 + ws2_32 + mswsock + psapi + winmm + netapi32 + wldap32 + gdi32 + user32 + ole32 + dbghelp + legacy_stdio_definitions + ) +else() + include(CMakeFindFrameworks) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CARBON_LIBRARY Carbon) + find_library(COCOA_LIBRARY Cocoa) + find_library(IOKIT_LIBRARY IOKit) + + find_library(AGL_LIBRARY AGL) + find_library(APPKIT_LIBRARY AppKit) + find_library(COREAUDIO_LIBRARY CoreAudio) + + set_target_libraries( ll::oslibraries + ${COCOA_LIBRARY} + ${IOKIT_LIBRARY} + ${COREFOUNDATION_LIBRARY} + ${CARBON_LIBRARY} + ${AGL_LIBRARY} + ${APPKITT_LIBRARY} + ${COREAUDIO_LIBRARY} + ) +endif() + -if (WINDOWS) - set(WINDOWS_LIBRARIES - advapi32 - shell32 - ws2_32 - mswsock - psapi - winmm - netapi32 - wldap32 - gdi32 - user32 - ole32 - dbghelp - ) -else (WINDOWS) - set(WINDOWS_LIBRARIES "") -endif (WINDOWS) - -mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES) diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index 9ac3498d09..00da3e7efc 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -48,19 +48,6 @@ set_target_properties(llimage_libtest FALSE ) -# OS-specific libraries -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - set(OS_LIBRARIES ${COREFOUNDATION_LIBRARY}) -elseif (WINDOWS) - set(OS_LIBRARIES) -elseif (LINUX) - set(OS_LIBRARIES) -else (DARWIN) - message(FATAL_ERROR "Unknown platform") -endif (DARWIN) - # Libraries on which this application depends on # Sort by high-level to low-level target_link_libraries(llimage_libtest @@ -71,7 +58,6 @@ target_link_libraries(llimage_libtest llimage llkdu llimagej2coj - ${OS_LIBRARIES} ) if (DARWIN) diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index baa814fb8b..ef6107fe66 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -57,21 +57,6 @@ list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES}) add_executable(llui_libtest ${llui_libtest_SOURCE_FILES}) -# Link with OS-specific libraries for LLWindow dependency -if (DARWIN) - find_library(COCOA_LIBRARY Cocoa) - find_library(IOKIT_LIBRARY IOKit) - set(OS_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY}) -elseif (WINDOWS) - #ll_stack_trace needs this now... - list(APPEND WINDOWS_LIBRARIES dbghelp) - set(OS_LIBRARIES ${WINDOWS_LIBRARIES}) -elseif (LINUX) - set(OS_LIBRARIES) -else (DARWIN) - message(FATAL_ERROR "unknown platform") -endif (DARWIN) - # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui_libtest @@ -83,7 +68,6 @@ target_link_libraries(llui_libtest llimage llkdu llimagej2coj - ${OS_LIBRARIES} ) if (WINDOWS) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index c934d47cc9..4673630a8e 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -278,21 +278,15 @@ target_link_libraries( ll::expat ll::jsoncpp ll::zlib-ng - ${WINDOWS_LIBRARIES} ll::boost ${GOOGLE_PERFTOOLS_LIBRARIES} ll::uriparser + ll::oslibraries ) set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(CARBON_LIBRARY Carbon) - target_link_libraries(llcommon ${CARBON_LIBRARY}) -endif (DARWIN) - add_dependencies(llcommon stage_third_party_libs) if (LL_TESTS) @@ -303,10 +297,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llcommon - ${WINDOWS_LIBRARIES} - ll::googlemock - ) + set(test_libs llcommon) LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}") LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}") diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index 041c90b174..0d45814d86 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -122,7 +122,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) # set(TEST_DEBUG on) set(test_libs llcorehttp - ${WINDOWS_LIBRARIES} llmessage llcommon ) @@ -188,7 +187,6 @@ endif (DARWIN) set(example_libs ${LEGACY_STDIO_LIBS} llcorehttp - ${WINDOWS_LIBRARIES} llmessage llcommon ) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index dfc290a48b..7274c3b450 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -65,13 +65,6 @@ target_link_libraries(llfilesystem ) set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COCOA_LIBRARY Cocoa) - target_link_libraries(llfilesystem ${COCOA_LIBRARY}) -endif (DARWIN) - - # Add tests if (LL_TESTS) include(LLAddBuildTest) @@ -87,7 +80,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon llfilesystem ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon llfilesystem ) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(lldir "" "${test_libs}") diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index ee14f0a46e..7d193f5512 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -71,7 +71,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES}) + set(test_libs llinventory llmath llcorehttp llfilesystem ) LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}") endif (LL_TESTS) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 5f48ea60dc..20435d991a 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -220,27 +220,14 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}") # set(TEST_DEBUG on) - -if (LINUX) - set(test_libs - ${WINDOWS_LIBRARIES} - llfilesystem - llmath - llcorehttp - llmessage - llcommon - rt - ) -else (LINUX) + set(test_libs - ${WINDOWS_LIBRARIES} llfilesystem llmath llcorehttp llmessage llcommon - ) -endif(LINUX) + ) #LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}") diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 7725489c3e..05e311f7e4 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -5,12 +5,6 @@ include(LLCommon) include(Linking) include(PluginAPI) -if (DARWIN) - include(CMakeFindFrameworks) - find_library(COCOA_LIBRARY Cocoa) -endif (DARWIN) - - ### SLPlugin set(SLPlugin_SOURCE_FILES @@ -60,8 +54,6 @@ target_link_libraries(SLPlugin ) if (DARWIN) - # Mac version needs to link against Carbon - target_link_libraries(SLPlugin ${COCOA_LIBRARY}) # Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later) add_custom_command( TARGET SLPlugin POST_BUILD diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 9035095d5f..5e71b673a5 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -272,7 +272,7 @@ target_link_libraries(llui # Add tests if(LL_TESTS) include(LLAddBuildTest) - set(test_libs llmessage llcorehttp llxml llrender llcommon ll::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llmessage llcorehttp llxml llrender llcommon ll::hunspell) SET(llui_TEST_SOURCE_FILES llurlmatch.cpp @@ -282,7 +282,7 @@ if(LL_TESTS) # INTEGRATION TESTS if(NOT LINUX) - set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell ${WINDOWS_LIBRARIES}) + set(test_libs llui llmessage llcorehttp llxml llrender llcommon ll::hunspell ) LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}") endif(NOT LINUX) endif(LL_TESTS) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 5953cb79e8..fc680e6da5 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -55,7 +55,6 @@ if (LL_TESTS) llxml llmath llcommon - ${WINDOWS_LIBRARIES} ) LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2be83c9900..e039828221 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1372,19 +1372,6 @@ if (DARWIN) COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness" ) - find_library(AGL_LIBRARY AGL) - find_library(APPKIT_LIBRARY AppKit) - find_library(COCOA_LIBRARY Cocoa) - find_library(IOKIT_LIBRARY IOKit) - find_library(COREAUDIO_LIBRARY CoreAudio) - - set(viewer_LIBRARIES - ${COCOA_LIBRARY} - ${AGL_LIBRARY} - ${IOKIT_LIBRARY} - ${COREAUDIO_LIBRARY} - ) - if (USE_BUGSPLAT) list(APPEND viewer_LIBRARIES bugsplat::bugsplat @@ -1558,7 +1545,6 @@ if (WINDOWS) # see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs) set(viewer_LIBRARIES opengl32 - ${WINDOWS_LIBRARIES} comdlg32 dxguid kernel32 @@ -1972,7 +1958,6 @@ target_link_libraries(${VIEWER_BINARY_NAME} ll::ndof ${SMARTHEAP_LIBRARY} ${UI_LIBRARIES} - ${WINDOWS_LIBRARIES} lllogin llprimitive llappearance @@ -2358,7 +2343,6 @@ if (LL_TESTS) set(test_libs - ${WINDOWS_LIBRARIES} llfilesystem llmath llcommon diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 1c2961a18a..822574210f 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -75,8 +75,6 @@ target_link_libraries(lltest llcommon llcorehttp ll::googlemock - ${WINDOWS_LIBRARIES} - ${DL_LIBRARY} ) if (WINDOWS) -- cgit v1.3 From bb35d5a59965235fa212299f11138da7b253760e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:30:09 +0200 Subject: Remove some more obsolete includes (UnixInstall) and include_directories() --- indra/llfilesystem/CMakeLists.txt | 10 ---------- indra/llmessage/CMakeLists.txt | 6 ------ indra/newview/CMakeLists.txt | 7 ------- 3 files changed, 23 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 7274c3b450..882f5b8fba 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -4,12 +4,6 @@ project(llfilesystem) include(00-Common) include(LLCommon) -include(UnixInstall) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) set(llfilesystem_SOURCE_FILES lldir.cpp @@ -73,10 +67,6 @@ if (LL_TESTS) lldiriterator.cpp ) - set_source_files_properties(lldiriterator.cpp - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${cache_BOOST_LIBRARIES}" - ) LL_ADD_PROJECT_UNIT_TESTS(llfilesystem "${llfilesystem_TEST_SOURCE_FILES}") # INTEGRATION TESTS diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 20435d991a..623798176b 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -15,12 +15,6 @@ include(JsonCpp) include_directories (${CMAKE_CURRENT_SOURCE_DIR}) -include_directories( - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ) - set(llmessage_SOURCE_FILES llassetstorage.cpp llavatarname.cpp diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3ec0c2179c..3d1d9e0266 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -40,7 +40,6 @@ include(PNG) include(TemplateCheck) include(ThreeJS) include(UI) -include(UnixInstall) include(ViewerMiscLibs) include(ViewerManager) include(VisualLeakDetector) @@ -1370,12 +1369,6 @@ if (DARWIN) COMPILE_FLAGS "-fmodules -fcxx-modules -Wno-nullability-completeness" ) - if (USE_BUGSPLAT) - list(APPEND viewer_LIBRARIES - bugsplat::bugsplat - ) - endif (USE_BUGSPLAT) - # Add resource files to the project. set(viewer_RESOURCE_FILES secondlife.icns -- cgit v1.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/cmake/APR.cmake | 2 +- indra/cmake/Audio.cmake | 2 +- indra/cmake/CEFPlugin.cmake | 8 ++++---- indra/cmake/CURL.cmake | 2 +- indra/cmake/EXPAT.cmake | 2 +- indra/cmake/FMODSTUDIO.cmake | 6 +++--- indra/cmake/FreeType.cmake | 2 +- indra/cmake/GLOD.cmake | 2 +- indra/cmake/GoogleMock.cmake | 4 ++-- indra/cmake/Hunspell.cmake | 2 +- indra/cmake/JPEG.cmake | 2 +- indra/cmake/JsonCpp.cmake | 2 +- indra/cmake/LLKDU.cmake | 2 +- indra/cmake/LLPhysicsExtensions.cmake | 2 +- indra/cmake/LLPrimitive.cmake | 2 +- indra/cmake/LLWindow.cmake | 2 +- indra/cmake/NGHTTP2.cmake | 2 +- indra/cmake/OPENAL.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 2 +- indra/cmake/OpenSSL.cmake | 2 +- indra/cmake/PNG.cmake | 2 +- indra/cmake/Prebuilt.cmake | 4 ---- indra/cmake/UI.cmake | 4 ++-- indra/cmake/URIPARSER.cmake | 2 +- indra/cmake/XmlRpcEpi.cmake | 2 +- indra/cmake/ZLIBNG.cmake | 2 +- indra/cmake/bugsplat.cmake | 2 +- indra/llappearance/CMakeLists.txt | 4 ++-- indra/llaudio/CMakeLists.txt | 2 +- indra/llcharacter/CMakeLists.txt | 2 +- indra/llcommon/CMakeLists.txt | 2 +- indra/llcorehttp/CMakeLists.txt | 2 +- indra/llfilesystem/CMakeLists.txt | 2 +- indra/llimage/CMakeLists.txt | 2 +- indra/llinventory/CMakeLists.txt | 2 +- indra/llkdu/CMakeLists.txt | 2 +- indra/llmath/CMakeLists.txt | 2 +- indra/llmessage/CMakeLists.txt | 2 +- indra/llplugin/CMakeLists.txt | 2 +- indra/llprimitive/CMakeLists.txt | 2 +- indra/llrender/CMakeLists.txt | 2 +- indra/llui/CMakeLists.txt | 2 +- indra/llwindow/CMakeLists.txt | 2 +- indra/llxml/CMakeLists.txt | 2 +- indra/media_plugins/base/CMakeLists.txt | 2 +- indra/media_plugins/cef/CMakeLists.txt | 2 +- indra/viewer_components/login/CMakeLists.txt | 2 +- 47 files changed, 54 insertions(+), 58 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index a389c09a37..a9500d2068 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -40,4 +40,4 @@ else (WINDOWS) rt ) endif (WINDOWS) -set_target_include_dirs( ll::apr ${LIBS_PREBUILT_DIR}/include/apr-1 ) +target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 ) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index 0441f370db..59a589cd0e 100644 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -5,7 +5,7 @@ include_guard() create_target(ll::vorbis) use_prebuilt_binary(ogg_vorbis) -set_target_include_dirs( ll::vorbis ${LIBS_PREBUILT_DIR}/include ) +target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) if (WINDOWS) target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static ) diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 41d1b521f7..2b5db1773b 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -3,13 +3,13 @@ include(Linking) include(Prebuilt) include_guard() -create_target( cef::cef ) +create_target( ll::cef ) use_prebuilt_binary(dullahan) -set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef) +target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef) if (WINDOWS) - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE libcef.lib libcef_dll_wrapper.lib dullahan.lib @@ -25,7 +25,7 @@ elseif (DARWIN) message(FATAL_ERROR "CEF not found") endif() - target_link_libraries( cef::cef INTERFACE + target_link_libraries( ll::cef INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index ee00113f75..ce7711e479 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -10,4 +10,4 @@ if (WINDOWS) else (WINDOWS) target_link_libraries(ll::libcurl INTERFACE libcurl.a) endif (WINDOWS) -set_target_include_dirs( ll::libcurl ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index 44e83c2e47..4947c40e02 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -16,4 +16,4 @@ else (WINDOWS) set(EXPAT_COPY libexpat.so.1 libexpat.so) endif () endif (WINDOWS) -set_target_include_dirs( ll::expat ${LIBS_PREBUILT_DIR}/include ) +target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake index aec86125e8..a3fd9c718a 100644 --- a/indra/cmake/FMODSTUDIO.cmake +++ b/indra/cmake/FMODSTUDIO.cmake @@ -23,8 +23,8 @@ if (USE_FMODSTUDIO) if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) # If the path have been specified in the arguments, use that - target_link_libraries(fmodstudio::fmodstudio INTERFACE ${FMODSTUDIO_LIBRARY}) - set_target_include_dirs(fmodstudio::fmodstudio ${FMODSTUDIO_INCLUDE_DIR}) + target_link_libraries(ll::fmodstudio INTERFACE ${FMODSTUDIO_LIBRARY}) + target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${FMODSTUDIO_INCLUDE_DIR}) else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) # If not, we're going to try to get the package listed in autobuild.xml # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) @@ -40,7 +40,7 @@ if (USE_FMODSTUDIO) target_link_libraries( ll::fmodstudio INTERFACE fmod) endif (WINDOWS) - set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio) + target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/fmodstudio) endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) else() set( USE_FMODSTUDIO "OFF") diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index d0e17050bd..c8454eb3b9 100644 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -5,6 +5,6 @@ include_guard() create_target( ll::freetype) use_prebuilt_binary(freetype) -set_target_include_dirs( ll::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/) +target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/) target_link_libraries( ll::freetype INTERFACE freetype ) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index f1532510c5..9070be302a 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -6,6 +6,6 @@ create_target( ll::glod ) use_prebuilt_binary(glod) -set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::glod SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) target_link_libraries( ll::glod INTERFACE GLOD ) target_compile_definitions( ll::glod INTERFACE LL_GLOD=1) \ No newline at end of file diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 23558364bb..01ef4de093 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -7,7 +7,7 @@ include_guard() use_prebuilt_binary(googlemock) create_target( ll::googlemock ) -set_target_include_dirs( ll::googlemock +target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) @@ -16,7 +16,7 @@ if (LINUX) target_link_libraries( ll::googlemock INTERFACE gmock gtest) elseif(WINDOWS) target_link_libraries( ll::googlemock INTERFACE gmock) - set_target_include_dirs( ll::googlemock + target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ${LIBS_PREBUILT_DIR}/include/gmock) elseif(DARWIN) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index e4352c6967..0994d2b5f4 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -12,5 +12,5 @@ elseif(DARWIN) elseif(LINUX) target_link_libraries( ll::hunspell INTERFACE hunspell-1.3) endif() -set_target_include_dirs( ll::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell) +target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index d51733b413..af984b6ac3 100644 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -14,4 +14,4 @@ elseif (DARWIN) elseif (WINDOWS) target_link_libraries( ll::jpeglib INTERFACE jpeglib) endif (LINUX) -set_target_include_dirs( ll::jpeglib ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::jpeglib SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 7d8c5cac62..1c354350c3 100644 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -12,4 +12,4 @@ elseif (DARWIN) elseif (LINUX) target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-4.1.3_libmt.a ) endif (WINDOWS) -set_target_include_dirs( ll::jsoncpp ${LIBS_PREBUILT_DIR}/include/json) +target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/json) diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake index 08a8229a33..bf358cc0eb 100644 --- a/indra/cmake/LLKDU.cmake +++ b/indra/cmake/LLKDU.cmake @@ -19,7 +19,7 @@ if (USE_KDU) target_link_libraries( ll::kdu INTERFACE libkdu.a) endif (WINDOWS) - set_target_include_dirs( ll::kdu + target_include_directories( ll::kdu SYSTEM INTERFACE ${AUTOBUILD_INSTALL_DIR}/include/kdu ${LIBS_OPEN_DIR}/llkdu ) diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake index 0f21ebb235..014ec6a98b 100644 --- a/indra/cmake/LLPhysicsExtensions.cmake +++ b/indra/cmake/LLPhysicsExtensions.cmake @@ -32,4 +32,4 @@ else (HAVOK) target_link_libraries( llphysicsextensions INTERFACE llphysicsextensionsstub) endif (HAVOK) -set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) +target_include_directories( llphysicsextensions INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index adb252b8ee..0026f183e6 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -29,7 +29,7 @@ else() endif() create_target( ll::colladadom ) -set_target_include_dirs( ll::colladadom +target_include_directories( ll::colladadom SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/collada ${LIBS_PREBUILT_DIR}/include/collada/1.4 ) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index 6ac2b58017..fdeb4aa434 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -9,7 +9,7 @@ create_target(ll::sdl) if (LINUX) use_prebuilt_binary(SDL) - set_target_include_dirs( ll::sdl ${LIBS_PREBUILT_DIR}/i686-linux) + target_include_directories( ll::sdl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/i686-linux) target_link_libraries( ll::sdl INTERFACE SDL directfb fusion direct X11) target_compile_definitions( ll::sdl INTERFACE LL_SDL=1) endif (LINUX) diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake index fdff9a72fa..7e59a7d9a7 100644 --- a/indra/cmake/NGHTTP2.cmake +++ b/indra/cmake/NGHTTP2.cmake @@ -12,4 +12,4 @@ elseif (DARWIN) else (WINDOWS) target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a ) endif (WINDOWS) -set_target_include_dirs( ll::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2) +target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index 8bbb657aea..faa247769b 100644 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -13,7 +13,7 @@ endif() if (USE_OPENAL) create_target( ll::openal ) - set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL") + target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL") target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1) use_prebuilt_binary(openal) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 139f6bc7d7..07dee5c23d 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -7,4 +7,4 @@ create_target( ll::openjpeg ) use_prebuilt_binary(openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjpeg ) -set_target_include_dirs( ll::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) +target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index c7be08624d..6c9abc9e7f 100644 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -12,5 +12,5 @@ elseif (LINUX) else() target_link_libraries(ll::openssl INTERFACE ssl crypto) endif (WINDOWS) -set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index ef4f492ec2..5a8d3e197d 100644 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -10,4 +10,4 @@ if (WINDOWS) else() target_link_libraries(ll::libpng INTERFACE png16 ) endif() -set_target_include_dirs( ll::libpng ${LIBS_PREBUILT_DIR}/include/libpng16) +target_include_directories( ll::libpng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/libpng16) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 95117c539d..593eb3958c 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -61,7 +61,3 @@ function( create_target name ) add_library( ${name} INTERFACE IMPORTED ) endfunction() -function( set_target_include_dirs target) - set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} ) -endfunction() - diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 57b33ce34b..c23fb6e8a7 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -43,7 +43,7 @@ if( WINDOWS ) ) endif() -set_target_include_dirs( ll::uilibraries +target_include_directories( ll::uilibraries SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include ) @@ -62,7 +62,7 @@ set_target_include_dirs( ll::uilibraries # pango-1.0 # ) #foreach(include ${${LL_ARCH}_INCLUDES}) -# set_target_include_dirs( ll::uilibraries +# target_include_directories( ll::uilibraries SYSTEM INTERFACE # ${LIBS_PREBUILT_DIR}/include/${include} # ) #endforeach(include) diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake index 72e4594cdd..8639eab891 100644 --- a/indra/cmake/URIPARSER.cmake +++ b/indra/cmake/URIPARSER.cmake @@ -13,4 +13,4 @@ elseif (LINUX) elseif (DARWIN) target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib) endif (WINDOWS) -set_target_include_dirs( ll::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser) +target_include_directories( ll::uriparser SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/uriparser) diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 417423f49c..aad9d1e476 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -6,4 +6,4 @@ create_target( ll::xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) -set_target_include_dirs( ll::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include) +target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake index a95005e368..a7779af3cd 100644 --- a/indra/cmake/ZLIBNG.cmake +++ b/indra/cmake/ZLIBNG.cmake @@ -11,4 +11,4 @@ if (WINDOWS) else() target_link_libraries( ll::zlib-ng INTERFACE z ) endif (WINDOWS) -set_target_include_dirs( ll::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng) +target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/zlib-ng) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 6f22815855..21a6e074fc 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -33,7 +33,7 @@ if (USE_BUGSPLAT) message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" ) endif() - set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat) + target_include_directories( ll::bugsplat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/bugsplat) set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT) else() set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name") diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 321c1e1798..4516a95d80 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -71,11 +71,11 @@ target_link_libraries(llappearance llcorehttp llcommon ) -set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llappearance INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) if (BUILD_HEADLESS) add_library (llappearanceheadless ${llappearance_SOURCE_FILES}) - set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories( llappearanceheadless INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llappearanceheadless llcharacter diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index 220b6d8cfb..b2b479b36f 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -57,7 +57,7 @@ set_source_files_properties(${llaudio_HEADER_FILES} list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES}) -set_target_include_dirs( llaudio ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llaudio INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llaudio llcommon llmath diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index 59e491748d..38720eb5da 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -63,7 +63,7 @@ set_source_files_properties(${llcharacter_HEADER_FILES} list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) -set_target_include_dirs( llcharacter ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcharacter INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llcharacter diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index d5c57bbeaf..61d6196f50 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -279,7 +279,7 @@ target_link_libraries( ll::oslibraries ) -set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) add_dependencies(llcommon stage_third_party_libs) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index e2bd9ae5b8..f93104b321 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -91,7 +91,7 @@ target_link_libraries( ll::openssl ll::nghttp2 ) -set_target_include_dirs( llcorehttp ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llcorehttp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 882f5b8fba..537f43007a 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -57,7 +57,7 @@ add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) target_link_libraries(llfilesystem llcommon ) -set_target_include_dirs( llfilesystem ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llfilesystem INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 7b3c1110a2..0984493941 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -49,7 +49,7 @@ set_source_files_properties(${llimage_HEADER_FILES} list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) add_library (llimage ${llimage_SOURCE_FILES}) -set_target_include_dirs( llimage ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llimage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level if (USE_KDU) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 7d193f5512..16724cca53 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -60,7 +60,7 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) -set_target_include_dirs( llinventory ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) #add unit tests if (LL_TESTS) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index 674ad04919..aef8dea53f 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -43,7 +43,7 @@ if (USE_KDU) add_library (llkdu ${llkdu_SOURCE_FILES}) target_link_libraries(llkdu ll::kdu llimage llcommon) - set_target_include_dirs( llkdu ${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories( llkdu INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests # ND: llkdu tests are very strange as they include stubs for KDU classes/methods diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 4c4e59811d..9d1b4f07f3 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -103,7 +103,7 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) target_link_libraries(llmath llcommon) -set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 623798176b..679ff43131 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -200,7 +200,7 @@ target_link_libraries( llcorehttp ll::xmlrpc-epi ) -set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llmessage INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests if (LL_TESTS) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 872d62a2bb..71801e05af 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,7 +46,7 @@ endif(NOT ADDRESS_SIZE EQUAL 32) list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES}) -set_target_include_dirs(llplugin ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llplugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( llplugin llcommon llmath llrender llmessage ) add_subdirectory(slplugin) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 79b54c9df8..d69b24a07f 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -53,7 +53,7 @@ set_source_files_properties(${llprimitive_HEADER_FILES} list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) add_library (llprimitive ${llprimitive_SOURCE_FILES}) -set_target_include_dirs( llprimitive ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llprimitive INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(llprimitive llcommon diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index 8f9089f4b7..db672303be 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -89,7 +89,7 @@ if (BUILD_HEADLESS) endif (BUILD_HEADLESS) add_library (llrender ${llrender_SOURCE_FILES}) -set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llrender INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 5e71b673a5..144923636b 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -252,7 +252,7 @@ set_source_files_properties(llurlentry.cpp list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES}) add_library (llui ${llui_SOURCE_FILES}) -set_target_include_dirs( llui ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llui INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Libraries on which this library depends, needed for Linux builds # Sort by high-level to low-level target_link_libraries(llui diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index 4c2f8149b4..826edf31cf 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -175,4 +175,4 @@ endif (llwindow_HEADER_FILES) ) target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} ll::sdl) -set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llwindow INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index fc680e6da5..5ac6aae78e 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -35,7 +35,7 @@ target_link_libraries( llxml llcommon ll::expat ) -set_target_include_dirs( llxml ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llxml INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # tests diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 9da249bd27..64b6a4228d 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -35,4 +35,4 @@ add_library(media_plugin_base ) target_link_libraries( media_plugin_base llplugin ) -set_target_include_dirs(media_plugin_base ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( media_plugin_base INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index c4cf292dde..ae3092fff4 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -62,7 +62,7 @@ add_library(media_plugin_cef target_link_libraries(media_plugin_cef media_plugin_base - cef::cef + ll::cef ) if (WINDOWS) 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.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/cmake/CMakeLists.txt | 3 --- indra/cmake/LLAddBuildTest.cmake | 1 - indra/integration_tests/llimage_libtest/CMakeLists.txt | 3 --- indra/integration_tests/llui_libtest/CMakeLists.txt | 3 --- indra/linux_crash_logger/CMakeLists.txt | 3 --- indra/llappearance/CMakeLists.txt | 3 --- indra/llaudio/CMakeLists.txt | 3 --- indra/llcharacter/CMakeLists.txt | 3 --- indra/llcommon/CMakeLists.txt | 3 --- indra/llcorehttp/CMakeLists.txt | 5 ----- indra/llcrashlogger/CMakeLists.txt | 3 --- indra/llfilesystem/CMakeLists.txt | 3 --- indra/llimage/CMakeLists.txt | 3 --- indra/llimagej2coj/CMakeLists.txt | 3 --- indra/llinventory/CMakeLists.txt | 3 --- indra/llkdu/CMakeLists.txt | 4 ---- indra/llmath/CMakeLists.txt | 3 --- indra/llmessage/CMakeLists.txt | 3 --- indra/llplugin/CMakeLists.txt | 4 ---- indra/llplugin/slplugin/CMakeLists.txt | 2 -- indra/llprimitive/CMakeLists.txt | 3 --- indra/llrender/CMakeLists.txt | 3 --- indra/llui/CMakeLists.txt | 3 --- indra/llwindow/CMakeLists.txt | 3 --- indra/llxml/CMakeLists.txt | 3 --- indra/media_plugins/cef/CMakeLists.txt | 3 --- indra/newview/CMakeLists.txt | 10 +--------- indra/test/CMakeLists.txt | 3 --- indra/viewer_components/login/CMakeLists.txt | 3 --- 29 files changed, 1 insertion(+), 94 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index c8e71b604f..0a084d8a1d 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -75,9 +75,6 @@ set(master_SOURCE_FILES source_group("Master Rules" FILES ${master_SOURCE_FILES}) -set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - add_library(cmake cmake_dummy.cpp ${cmake_SOURCE_FILES} diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index a97d2584ae..d3047ddc82 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -87,7 +87,6 @@ INCLUDE(GoogleMock) # Headers GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) - set_source_files_properties(${${name}_test_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) LIST(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES}) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}") diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt index a027860c0b..2f16fc6a1c 100644 --- a/indra/integration_tests/llimage_libtest/CMakeLists.txt +++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt @@ -31,9 +31,6 @@ set(llimage_libtest_HEADER_FILES llimage_libtest.h ) -set_source_files_properties(${llimage_libtest_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimage_libtest_SOURCE_FILES ${llimage_libtest_HEADER_FILES}) add_executable(llimage_libtest diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt index 51fe35df43..849eda1acf 100644 --- a/indra/integration_tests/llui_libtest/CMakeLists.txt +++ b/indra/integration_tests/llui_libtest/CMakeLists.txt @@ -50,9 +50,6 @@ set(llui_libtest_HEADER_FILES llwidgetreg.h ) -set_source_files_properties(${llui_libtest_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES}) add_executable(llui_libtest ${llui_libtest_SOURCE_FILES}) diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt index 594cb34ce4..1793aa82b9 100644 --- a/indra/linux_crash_logger/CMakeLists.txt +++ b/indra/linux_crash_logger/CMakeLists.txt @@ -45,9 +45,6 @@ set(linux_crash_logger_HEADER_FILES llcrashloggerlinux.h ) -set_source_files_properties(${linux_crash_logger_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND linux_crash_logger_SOURCE_FILES ${linux_crash_logger_HEADER_FILES} ) diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt index 4516a95d80..75c0e276eb 100644 --- a/indra/llappearance/CMakeLists.txt +++ b/indra/llappearance/CMakeLists.txt @@ -52,9 +52,6 @@ set(llappearance_HEADER_FILES llavatarappearancedefines.h ) -set_source_files_properties(${llappearance_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES}) add_library (llappearance ${llappearance_SOURCE_FILES}) diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt index b2b479b36f..d6846ddf99 100644 --- a/indra/llaudio/CMakeLists.txt +++ b/indra/llaudio/CMakeLists.txt @@ -51,9 +51,6 @@ if (TARGET ll::openal) ) endif () -set_source_files_properties(${llaudio_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES}) add_library (llaudio ${llaudio_SOURCE_FILES}) diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt index 38720eb5da..bc45eb474a 100644 --- a/indra/llcharacter/CMakeLists.txt +++ b/indra/llcharacter/CMakeLists.txt @@ -57,9 +57,6 @@ set(llcharacter_HEADER_FILES llvisualparam.h ) -set_source_files_properties(${llcharacter_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES}) add_library (llcharacter ${llcharacter_SOURCE_FILES}) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 61d6196f50..f3e4f7f7f9 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -244,9 +244,6 @@ set(llcommon_HEADER_FILES StackWalker.h ) -set_source_files_properties(${llcommon_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) if(LLCOMMON_LINK_SHARED) diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index f93104b321..481e58993a 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -73,8 +73,6 @@ set(llcorehttp_HEADER_FILES _thread.h ) -set_source_files_properties(${llcorehttp_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) if (DARWIN OR LINUX) # Boost headers define unused members in condition_variable so... set_source_files_properties(${llcorehttp_SOURCE_FILES} @@ -112,9 +110,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS) tests/test_bufferstream.hpp ) - set_source_files_properties(${llcorehttp_TEST_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcorehttp_TEST_SOURCE_FILES ${llcorehttp_TEST_HEADER_FILES}) # LL_ADD_PROJECT_UNIT_TESTS(llcorehttp "${llcorehttp_TEST_SOURCE_FILES}") diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt index 0e357b249f..6ac73c0d32 100644 --- a/indra/llcrashlogger/CMakeLists.txt +++ b/indra/llcrashlogger/CMakeLists.txt @@ -17,9 +17,6 @@ set(llcrashlogger_HEADER_FILES llcrashlock.h ) -set_source_files_properties(${llcrashlogger_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES}) add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES}) diff --git a/indra/llfilesystem/CMakeLists.txt b/indra/llfilesystem/CMakeLists.txt index 537f43007a..9f24f75eab 100644 --- a/indra/llfilesystem/CMakeLists.txt +++ b/indra/llfilesystem/CMakeLists.txt @@ -47,9 +47,6 @@ if (WINDOWS) LIST(APPEND llfilesystem_HEADER_FILES lldir_win32.h) endif (WINDOWS) -set_source_files_properties(${llfilesystem_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llfilesystem_SOURCE_FILES ${llfilesystem_HEADER_FILES}) add_library (llfilesystem ${llfilesystem_SOURCE_FILES}) diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt index 57703818c9..cc75c463bc 100644 --- a/indra/llimage/CMakeLists.txt +++ b/indra/llimage/CMakeLists.txt @@ -43,9 +43,6 @@ set(llimage_HEADER_FILES llpngwrapper.h ) -set_source_files_properties(${llimage_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimage_SOURCE_FILES ${llimage_HEADER_FILES}) add_library (llimage ${llimage_SOURCE_FILES}) diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt index ff7d75b709..93e85668dd 100644 --- a/indra/llimagej2coj/CMakeLists.txt +++ b/indra/llimagej2coj/CMakeLists.txt @@ -17,9 +17,6 @@ set(llimagej2coj_HEADER_FILES llimagej2coj.h ) -set_source_files_properties(${llimagej2coj_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES}) add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES}) diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 16724cca53..93a586759f 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -52,9 +52,6 @@ set(llinventory_HEADER_FILES lluserrelations.h ) -set_source_files_properties(${llinventory_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt index aef8dea53f..7cd9f5eb24 100644 --- a/indra/llkdu/CMakeLists.txt +++ b/indra/llkdu/CMakeLists.txt @@ -21,14 +21,10 @@ set(llkdu_SOURCE_FILES set(llkdu_HEADER_FILES CMakeLists.txt - llimagej2ckdu.h llkdumem.h ) -set_source_files_properties(${llkdu_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llkdu_SOURCE_FILES ${llkdu_HEADER_FILES}) # Our KDU package is built with KDU_X86_INTRINSICS in its .vcxproj file. diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 9d1b4f07f3..dcc7d4fb2e 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -95,9 +95,6 @@ set(llmath_HEADER_FILES xform.h ) -set_source_files_properties(${llmath_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 679ff43131..7340752fb2 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -185,9 +185,6 @@ set(llmessage_HEADER_FILES sound_ids.h ) -set_source_files_properties(${llmessage_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES}) add_library (llmessage ${llmessage_SOURCE_FILES}) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 71801e05af..14a69afe6e 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -20,7 +20,6 @@ set(llplugin_SOURCE_FILES set(llplugin_HEADER_FILES CMakeLists.txt - llpluginclassmedia.h llpluginclassmediaowner.h llplugininstance.h @@ -32,9 +31,6 @@ set(llplugin_HEADER_FILES llpluginsharedmemory.h ) -set_source_files_properties(${llplugin_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) ##add_definitions(/FIXED:NO) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 1fa4f0346d..5b80d80c9b 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -21,8 +21,6 @@ if (DARWIN) endif (DARWIN) if (SLPlugin_HEADER_FILES) - set_source_files_properties(${SLPlugin_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND SLPlugin_SOURCE_FILES ${SLPlugin_HEADER_FILES}) endif (SLPlugin_HEADER_FILES) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 698d523dd3..bf35500bad 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -47,9 +47,6 @@ set(llprimitive_HEADER_FILES material_codes.h object_flags.h ) - -set_source_files_properties(${llprimitive_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) list(APPEND llprimitive_SOURCE_FILES ${llprimitive_HEADER_FILES}) diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt index bb22a969f5..c5cf1100d5 100644 --- a/indra/llrender/CMakeLists.txt +++ b/indra/llrender/CMakeLists.txt @@ -64,9 +64,6 @@ set(llrender_HEADER_FILES llglcommonfunc.h ) -set_source_files_properties(${llrender_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES}) if (BUILD_HEADLESS) diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt index 144923636b..9108c6143c 100644 --- a/indra/llui/CMakeLists.txt +++ b/indra/llui/CMakeLists.txt @@ -236,9 +236,6 @@ set(llui_HEADER_FILES llxyvector.h ) -set_source_files_properties(${llui_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - SET(llurlentry_TEST_DEPENDENCIES llurlmatch.cpp llurlregistry.cpp diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt index a2044f374c..d09e5387b9 100644 --- a/indra/llwindow/CMakeLists.txt +++ b/indra/llwindow/CMakeLists.txt @@ -142,9 +142,6 @@ if (SOLARIS) ) endif (SOLARIS) -set_source_files_properties(${llwindow_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - if (BUILD_HEADLESS) set(llwindowheadless_SOURCE_FILES llwindowmesaheadless.cpp diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt index 5ac6aae78e..508c2b919b 100644 --- a/indra/llxml/CMakeLists.txt +++ b/indra/llxml/CMakeLists.txt @@ -21,9 +21,6 @@ set(llxml_HEADER_FILES llxmltree.h ) -set_source_files_properties(${llxml_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llxml_SOURCE_FILES ${llxml_HEADER_FILES}) add_library (llxml ${llxml_SOURCE_FILES}) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index ae3092fff4..d8ae099eca 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -46,9 +46,6 @@ elseif (WINDOWS) list(APPEND media_plugin_cef_SOURCE_FILES windows_volume_catcher.cpp) endif (LINUX) -set_source_files_properties(${media_plugin_cef_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND media_plugin_cef_SOURCE_FILES ${media_plugin_cef_HEADER_FILES}) add_library(media_plugin_cef diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index d0a8fe7571..328d3a0148 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1382,12 +1382,7 @@ if (DARWIN) Japanese.lproj/language.txt Korean.lproj/language.txt ) - set_source_files_properties( - ${viewer_RESOURCE_FILES} - PROPERTIES - HEADER_FILE_ONLY TRUE - #MACOSX_PACKAGE_LOCATION Resources #don't do this! this tells cmake to copy the files. - ) + SOURCE_GROUP("Resources" FILES ${viewer_RESOURCE_FILES}) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) endif (DARWIN) @@ -1652,9 +1647,6 @@ endif() list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) -set_source_files_properties(${viewer_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - add_executable(${VIEWER_BINARY_NAME} WIN32 MACOSX_BUNDLE diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index aae299e6ca..2f033616a7 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -53,9 +53,6 @@ if (NOT WINDOWS) ) endif (NOT WINDOWS) -set_source_files_properties(${test_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) 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.3 From 1c0d47843664e0766e04f60674cb66aab4197f0f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 17 Jan 2023 20:56:21 +0200 Subject: SL-18773 Crash incrementing directory_iterator make_iterator_range doesn't verify errors, replaced with basic increments --- indra/llfilesystem/lldiskcache.cpp | 51 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'indra/llfilesystem') diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index 6de99dfbff..4b7363c8e5 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -35,7 +35,6 @@ #include "llassettype.h" #include "lldir.h" #include -#include #include #include "lldiskcache.h" @@ -100,19 +99,20 @@ void LLDiskCache::purge() #endif if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed()) { - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {})) + boost::filesystem::directory_iterator iter(cache_path, ec); + while (iter != boost::filesystem::directory_iterator() && !ec.failed()) { - if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) + if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { - if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos) + if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos) { - uintmax_t file_size = boost::filesystem::file_size(entry, ec); + uintmax_t file_size = boost::filesystem::file_size(*iter, ec); if (ec.failed()) { continue; } - const std::string file_path = entry.path().string(); - const std::time_t file_time = boost::filesystem::last_write_time(entry, ec); + const std::string file_path = (*iter).path().string(); + const std::time_t file_time = boost::filesystem::last_write_time(*iter, ec); if (ec.failed()) { continue; @@ -121,6 +121,7 @@ void LLDiskCache::purge() file_info.push_back(file_info_t(file_time, { file_size, file_path })); } } + iter.increment(ec); } } @@ -348,19 +349,21 @@ void LLDiskCache::clearCache() #endif if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed()) { - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {})) + boost::filesystem::directory_iterator iter(cache_path, ec); + while (iter != boost::filesystem::directory_iterator() && !ec.failed()) { - if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) + if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { - if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos) + if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos) { - boost::filesystem::remove(entry, ec); + boost::filesystem::remove(*iter, ec); if (ec.failed()) { - LL_WARNS() << "Failed to delete cache file " << entry << ": " << ec.message() << LL_ENDL; + LL_WARNS() << "Failed to delete cache file " << *iter << ": " << ec.message() << LL_ENDL; } } } + iter.increment(ec); } } } @@ -379,20 +382,22 @@ void LLDiskCache::removeOldVFSFiles() #endif if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed()) { - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {})) + boost::filesystem::directory_iterator iter(cache_path, ec); + while (iter != boost::filesystem::directory_iterator() && !ec.failed()) { - if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) + if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { - if ((entry.path().string().find(CACHE_FORMAT) != std::string::npos) || - (entry.path().string().find(DB_FORMAT) != std::string::npos)) + if (((*iter).path().string().find(CACHE_FORMAT) != std::string::npos) || + ((*iter).path().string().find(DB_FORMAT) != std::string::npos)) { - boost::filesystem::remove(entry, ec); + boost::filesystem::remove(*iter, ec); if (ec.failed()) { - LL_WARNS() << "Failed to delete cache file " << entry << ": " << ec.message() << LL_ENDL; + LL_WARNS() << "Failed to delete cache file " << *iter << ": " << ec.message() << LL_ENDL; } } } + iter.increment(ec); } } } @@ -418,19 +423,21 @@ uintmax_t LLDiskCache::dirFileSize(const std::string dir) #endif if (boost::filesystem::is_directory(dir_path, ec) && !ec.failed()) { - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(dir_path, ec), {})) + boost::filesystem::directory_iterator iter(dir_path, ec); + while (iter != boost::filesystem::directory_iterator() && !ec.failed()) { - if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) + if (boost::filesystem::is_regular_file(*iter, ec) && !ec.failed()) { - if (entry.path().string().find(mCacheFilenamePrefix) != std::string::npos) + if ((*iter).path().string().find(mCacheFilenamePrefix) != std::string::npos) { - uintmax_t file_size = boost::filesystem::file_size(entry, ec); + uintmax_t file_size = boost::filesystem::file_size(*iter, ec); if (!ec.failed()) { total_file_size += file_size; } } } + iter.increment(ec); } } -- cgit v1.3