summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-17 18:04:57 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-17 18:04:57 +0200
commite0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe (patch)
tree52edc824cb295c92f668b7912e7fbcbf272132aa /indra/cmake
parent6d0bba9c03da0d8aca5e88fcb9289cb2f89f3467 (diff)
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.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/APR.cmake2
-rw-r--r--indra/cmake/Audio.cmake2
-rw-r--r--indra/cmake/CEFPlugin.cmake8
-rw-r--r--indra/cmake/CURL.cmake2
-rw-r--r--indra/cmake/EXPAT.cmake2
-rw-r--r--indra/cmake/FMODSTUDIO.cmake6
-rw-r--r--indra/cmake/FreeType.cmake2
-rw-r--r--indra/cmake/GLOD.cmake2
-rw-r--r--indra/cmake/GoogleMock.cmake4
-rw-r--r--indra/cmake/Hunspell.cmake2
-rw-r--r--indra/cmake/JPEG.cmake2
-rw-r--r--indra/cmake/JsonCpp.cmake2
-rw-r--r--indra/cmake/LLKDU.cmake2
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake2
-rw-r--r--indra/cmake/LLPrimitive.cmake2
-rw-r--r--indra/cmake/LLWindow.cmake2
-rw-r--r--indra/cmake/NGHTTP2.cmake2
-rw-r--r--indra/cmake/OPENAL.cmake2
-rw-r--r--indra/cmake/OpenJPEG.cmake2
-rw-r--r--indra/cmake/OpenSSL.cmake2
-rw-r--r--indra/cmake/PNG.cmake2
-rw-r--r--indra/cmake/Prebuilt.cmake4
-rw-r--r--indra/cmake/UI.cmake4
-rw-r--r--indra/cmake/URIPARSER.cmake2
-rw-r--r--indra/cmake/XmlRpcEpi.cmake2
-rw-r--r--indra/cmake/ZLIBNG.cmake2
-rw-r--r--indra/cmake/bugsplat.cmake2
27 files changed, 33 insertions, 37 deletions
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")