summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
committerNicky <nicky.dasmijn@gmail.com>2022-04-06 16:32:52 +0200
commit786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch)
treeed7386562337f06b212e0e95753c891ec7efbb3a
parent7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff)
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.
-rw-r--r--indra/cmake/00-Common.cmake25
-rw-r--r--indra/cmake/APR.cmake51
-rw-r--r--indra/cmake/Atmosphere.cmake5
-rw-r--r--indra/cmake/Audio.cmake33
-rw-r--r--indra/cmake/Boost.cmake103
-rw-r--r--indra/cmake/CEFPlugin.cmake13
-rw-r--r--indra/cmake/CMakeLists.txt17
-rw-r--r--indra/cmake/CURL.cmake14
-rw-r--r--indra/cmake/EXPAT.cmake12
-rw-r--r--indra/cmake/FMODSTUDIO.cmake26
-rw-r--r--indra/cmake/FreeType.cmake10
-rw-r--r--indra/cmake/GLOD.cmake11
-rw-r--r--indra/cmake/Hunspell.cmake14
-rw-r--r--indra/cmake/JPEG.cmake15
-rw-r--r--indra/cmake/JsonCpp.cmake17
-rw-r--r--indra/cmake/LLAddBuildTest.cmake38
-rw-r--r--indra/cmake/LLAppearance.cmake12
-rw-r--r--indra/cmake/LLAudio.cmake7
-rw-r--r--indra/cmake/LLCharacter.cmake7
-rw-r--r--indra/cmake/LLCommon.cmake35
-rw-r--r--indra/cmake/LLCoreHttp.cmake14
-rw-r--r--indra/cmake/LLCrashLogger.cmake7
-rw-r--r--indra/cmake/LLFileSystem.cmake7
-rw-r--r--indra/cmake/LLImage.cmake9
-rw-r--r--indra/cmake/LLImageJ2COJ.cmake5
-rw-r--r--indra/cmake/LLInventory.cmake7
-rw-r--r--indra/cmake/LLKDU.cmake18
-rw-r--r--indra/cmake/LLLogin.cmake7
-rw-r--r--indra/cmake/LLMessage.cmake13
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake16
-rw-r--r--indra/cmake/LLPlugin.cmake14
-rw-r--r--indra/cmake/LLPrimitive.cmake66
-rw-r--r--indra/cmake/LLRender.cmake20
-rw-r--r--indra/cmake/LLUI.cmake7
-rw-r--r--indra/cmake/LLWindow.cmake12
-rw-r--r--indra/cmake/LLXML.cmake14
-rw-r--r--indra/cmake/LibVLCPlugin.cmake17
-rw-r--r--indra/cmake/MediaPluginBase.cmake8
-rw-r--r--indra/cmake/NDOF.cmake14
-rw-r--r--indra/cmake/NGHTTP2.cmake16
-rw-r--r--indra/cmake/NVAPI.cmake3
-rw-r--r--indra/cmake/OPENAL.cmake12
-rw-r--r--indra/cmake/OpenJPEG.cmake18
-rw-r--r--indra/cmake/OpenSSL.cmake21
-rw-r--r--indra/cmake/PNG.cmake26
-rw-r--r--indra/cmake/Prebuilt.cmake11
-rw-r--r--indra/cmake/URIPARSER.cmake29
-rw-r--r--indra/cmake/XmlRpcEpi.cmake17
-rw-r--r--indra/cmake/ZLIBNG.cmake33
-rw-r--r--indra/cmake/bugsplat.cmake10
-rw-r--r--indra/llappearance/CMakeLists.txt64
-rw-r--r--indra/llaudio/CMakeLists.txt48
-rw-r--r--indra/llcharacter/CMakeLists.txt29
-rw-r--r--indra/llcommon/CMakeLists.txt37
-rw-r--r--indra/llcommon/stringize.h2
-rw-r--r--indra/llcorehttp/CMakeLists.txt53
-rw-r--r--indra/llcrashlogger/CMakeLists.txt19
-rw-r--r--indra/llfilesystem/CMakeLists.txt11
-rw-r--r--indra/llimage/CMakeLists.txt30
-rw-r--r--indra/llimagej2coj/CMakeLists.txt13
-rw-r--r--indra/llinventory/CMakeLists.txt16
-rw-r--r--indra/llkdu/CMakeLists.txt18
-rw-r--r--indra/llmath/CMakeLists.txt13
-rw-r--r--indra/llmessage/CMakeLists.txt92
-rw-r--r--indra/llplugin/CMakeLists.txt22
-rw-r--r--indra/llplugin/slplugin/CMakeLists.txt19
-rw-r--r--indra/llprimitive/CMakeLists.txt42
-rw-r--r--indra/llrender/CMakeLists.txt56
-rw-r--r--indra/llui/CMakeLists.txt59
-rw-r--r--indra/llwindow/CMakeLists.txt38
-rw-r--r--indra/llxml/CMakeLists.txt32
-rw-r--r--indra/media_plugins/base/CMakeLists.txt20
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt30
-rw-r--r--indra/media_plugins/example/CMakeLists.txt35
-rw-r--r--indra/media_plugins/gstreamer010/CMakeLists.txt30
-rw-r--r--indra/media_plugins/libvlc/CMakeLists.txt43
-rw-r--r--indra/newview/CMakeLists.txt238
-rw-r--r--indra/test/CMakeLists.txt38
-rw-r--r--indra/viewer_components/login/CMakeLists.txt31
79 files changed, 626 insertions, 1488 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0ab7fa2456..45c81b1b30 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -70,12 +70,6 @@ if (WINDOWS)
if( ADDRESS_SIZE EQUAL 32 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
endif()
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo"
- CACHE STRING "C++ compiler release-with-debug options" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE
- "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo"
- CACHE STRING "C++ compiler release options" FORCE)
# zlib has assembly-language object files incompatible with SAFESEH
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099")
@@ -87,15 +81,16 @@ if (WINDOWS)
# /DDOM_DYNAMIC # For shared library colladadom
)
add_compile_options(
- /GS
- /TP
- /W3
- /c
- /Zc:forScope
- /nologo
- /Oy-
-# /arch:SSE2
- /fp:fast
+
+ /Zo
+ /GS
+ /TP
+ /W3
+ /c
+ /Zc:forScope
+ /nologo
+ /Oy-
+ /fp:fast
)
# Nicky: x64 implies SSE2
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 9b64bc6160..5a7c504af8 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -1,11 +1,11 @@
include(Linking)
include(Prebuilt)
-set(APR_FIND_QUIETLY ON)
-set(APR_FIND_REQUIRED ON)
+if( TARGET apr::apr )
+ return()
+endif()
-set(APRUTIL_FIND_QUIETLY ON)
-set(APRUTIL_FIND_REQUIRED ON)
+create_target( apr::apr)
if (USESYSTEMLIBS)
include(FindAPR)
@@ -17,18 +17,11 @@ else (USESYSTEMLIBS)
else (LLCOMMON_LINK_SHARED)
set(APR_selector "")
endif (LLCOMMON_LINK_SHARED)
- set(APR_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
- )
- set(APRICONV_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
- )
- set(APRUTIL_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
- )
+ set_target_libraries( apr::apr
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
+ )
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
@@ -37,18 +30,20 @@ else (USESYSTEMLIBS)
set(APR_selector "a")
set(APRUTIL_selector "a")
endif (LLCOMMON_LINK_SHARED)
- set(APR_LIBRARIES libapr-1.${APR_selector})
- set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector})
- set(APRICONV_LIBRARIES iconv)
+
+ set_target_libraries( apr::apr
+ libapr-1.${APR_selector}
+ libaprutil-1.${APRUTIL_selector}
+ iconv
+ )
else (WINDOWS)
- set(APR_LIBRARIES apr-1)
- set(APRUTIL_LIBRARIES aprutil-1)
- set(APRICONV_LIBRARIES iconv)
+ set_target_libraries( apr::apr
+ apr-1
+ aprutil-1
+ iconv
+ uuid
+ rt
+ )
endif (WINDOWS)
- set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
-
- if (LINUX)
- list(APPEND APRUTIL_LIBRARIES uuid)
- list(APPEND APRUTIL_LIBRARIES rt)
- endif (LINUX)
+ set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 )
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/Atmosphere.cmake b/indra/cmake/Atmosphere.cmake
deleted file mode 100644
index 9c14df2a11..0000000000
--- a/indra/cmake/Atmosphere.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-use_prebuilt_binary(libatmosphere)
-set(LIBATMOSPHERE_LIBRARIES atmosphere)
-set(LIBATMOSPHERE_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/atmosphere)
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index f95439245a..bc11e62de5 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if(TARGET vorbis::vorbis)
+ return()
+endif()
+create_target(vorbis::vorbis)
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(OGG REQUIRED ogg)
@@ -9,34 +14,12 @@ if (USESYSTEMLIBS)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
else (USESYSTEMLIBS)
use_prebuilt_binary(ogg_vorbis)
- set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
- set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
- set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
+ set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include )
if (WINDOWS)
- set(OGG_LIBRARIES
- optimized ogg_static
- debug ogg_static_d)
- set(VORBIS_LIBRARIES
- optimized vorbis_static
- debug vorbis_static_d)
- set(VORBISENC_LIBRARIES
- optimized vorbisenc_static
- debug vorbisenc_static_d)
- set(VORBISFILE_LIBRARIES
- optimized vorbisfile_static
- debug vorbisfile_static_d)
+ set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static )
else (WINDOWS)
- set(OGG_LIBRARIES ogg)
- set(VORBIS_LIBRARIES vorbis)
- set(VORBISENC_LIBRARIES vorbisenc)
- set(VORBISFILE_LIBRARIES vorbisfile)
+ set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile )
endif (WINDOWS)
endif (USESYSTEMLIBS)
-link_directories(
- ${VORBIS_LIBRARY_DIRS}
- ${VORBISENC_LIBRARY_DIRS}
- ${VORBISFILE_LIBRARY_DIRS}
- ${OGG_LIBRARY_DIRS}
- )
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 0a61e33532..00bfedfb71 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET boost::boost )
+ return()
+endif()
+create_target( boost::boost )
+
set(Boost_FIND_QUIETLY ON)
set(Boost_FIND_REQUIRED ON)
@@ -24,80 +29,34 @@ else (USESYSTEMLIBS)
set(addrsfx "-x${ADDRESS_SIZE}")
if (WINDOWS)
- set(BOOST_CONTEXT_LIBRARY
- optimized libboost_context-mt${addrsfx}
- debug libboost_context-mt${addrsfx}-gd)
- set(BOOST_FIBER_LIBRARY
- optimized libboost_fiber-mt${addrsfx}
- debug libboost_fiber-mt${addrsfx}-gd)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized libboost_filesystem-mt${addrsfx}
- debug libboost_filesystem-mt${addrsfx}-gd)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized libboost_program_options-mt${addrsfx}
- debug libboost_program_options-mt${addrsfx}-gd)
- set(BOOST_REGEX_LIBRARY
- optimized libboost_regex-mt${addrsfx}
- debug libboost_regex-mt${addrsfx}-gd)
- set(BOOST_SIGNALS_LIBRARY
- optimized libboost_signals-mt${addrsfx}
- debug libboost_signals-mt${addrsfx}-gd)
- set(BOOST_SYSTEM_LIBRARY
- optimized libboost_system-mt${addrsfx}
- debug libboost_system-mt${addrsfx}-gd)
- set(BOOST_THREAD_LIBRARY
- optimized libboost_thread-mt${addrsfx}
- debug libboost_thread-mt${addrsfx}-gd)
+ set_target_libraries( boost::boost
+ libboost_context-mt${addrsfx}
+ libboost_fiber-mt${addrsfx}
+ libboost_filesystem-mt${addrsfx}
+ libboost_program_options-mt${addrsfx}
+ libboost_regex-mt${addrsfx}
+ libboost_system-mt${addrsfx}
+ libboost_thread-mt${addrsfx})
elseif (LINUX)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx}-d)
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx}-d)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx}-d)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx}-d)
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx}-d)
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx}-d)
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx}-d)
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx}-d)
+ set_target_libraries( boost::boost
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_signals-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
elseif (DARWIN)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx}-d)
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx}-d)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx}-d)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx}-d)
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx}-d)
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx}-d)
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx}-d)
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx}-d)
+ set_target_libraries( boost::boost
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_signals-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
endif (WINDOWS)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 7d8bfb1b0f..706730b226 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -2,18 +2,21 @@
include(Linking)
include(Prebuilt)
+if(TARGET cef::cef)
+ return()
+endif()
+create_target( cef::cef )
+
if (USESYSTEMLIBS)
set(CEFPLUGIN OFF CACHE BOOL
"CEFPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS)
use_prebuilt_binary(dullahan)
- set(CEFPLUGIN ON CACHE BOOL
- "CEFPLUGIN support for the llplugin/llmedia test apps.")
- set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef)
+ set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef)
endif (USESYSTEMLIBS)
if (WINDOWS)
- set(CEF_PLUGIN_LIBRARIES
+ set_target_libraries( cef::cef
libcef.lib
libcef_dll_wrapper.lib
dullahan.lib
@@ -29,7 +32,7 @@ elseif (DARWIN)
message(FATAL_ERROR "CEF not found")
endif()
- set(CEF_PLUGIN_LIBRARIES
+ set_target_libraries( cef::cef
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
${APPKIT_LIBRARY}
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 6778e90ca8..812e35390f 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -39,37 +39,22 @@ set(cmake_SOURCE_FILES
GLEXT.cmake
GLH.cmake
GLOD.cmake
-## GStreamer010Plugin.cmake
GoogleMock.cmake
Havok.cmake
Hunspell.cmake
- JPEG.cmake
- JsonCpp.cmake
+ JsonCpp.cmake
LLAddBuildTest.cmake
LLAppearance.cmake
LLAudio.cmake
- LLCharacter.cmake
LLCommon.cmake
- LLCrashLogger.cmake
LLImage.cmake
- LLImageJ2COJ.cmake
- LLInventory.cmake
LLKDU.cmake
- LLLogin.cmake
- LLMath.cmake
- LLMessage.cmake
LLPhysicsExtensions.cmake
- LLPlugin.cmake
LLPrimitive.cmake
- LLRender.cmake
LLSharedLibs.cmake
LLTestCommand.cmake
- LLUI.cmake
- LLFileSystem.cmake
LLWindow.cmake
- LLXML.cmake
Linking.cmake
- MediaPluginBase.cmake
NDOF.cmake
OPENAL.cmake
OpenGL.cmake
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index 04afae594d..d91eb2e2fd 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,19 +1,19 @@
# -*- cmake -*-
include(Prebuilt)
-set(CURL_FIND_QUIETLY ON)
-set(CURL_FIND_REQUIRED ON)
+if( TARGET libcurl::libcurl )
+ return()
+endif()
+create_target(libcurl::libcurl)
if (USESYSTEMLIBS)
include(FindCURL)
else (USESYSTEMLIBS)
use_prebuilt_binary(curl)
if (WINDOWS)
- set(CURL_LIBRARIES
- debug libcurld.lib
- optimized libcurl.lib)
+ set_target_libraries(libcurl::libcurl libcurl.lib)
else (WINDOWS)
- set(CURL_LIBRARIES libcurl.a)
+ set_target_libraries(libcurl::libcurl libcurl.a)
endif (WINDOWS)
- set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index cddc71b227..6f6503ca4d 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -1,23 +1,25 @@
# -*- cmake -*-
include(Prebuilt)
-set(EXPAT_FIND_QUIETLY ON)
-set(EXPAT_FIND_REQUIRED ON)
+if( TARGET expat::expat )
+ return()
+endif()
+create_target( expat::expat INTERFACE IMPORTED )
if (USESYSTEMLIBS)
include(FindEXPAT)
else (USESYSTEMLIBS)
use_prebuilt_binary(expat)
if (WINDOWS)
- set(EXPAT_LIBRARIES libexpatMT)
+ set_target_libraries( expat::expat libexpatMT )
set(EXPAT_COPY libexpatMT.dll)
else (WINDOWS)
- set(EXPAT_LIBRARIES expat)
+ set_target_libraries( expat::expat expat )
if (DARWIN)
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
else ()
set(EXPAT_COPY libexpat.so.1 libexpat.so)
endif ()
endif (WINDOWS)
- set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include )
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
index 8840354ac6..e8699cdecd 100644
--- a/indra/cmake/FMODSTUDIO.cmake
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -8,9 +8,17 @@ if (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (FMODSTUDIO)
+ if( TARGET fmodstudio::fmodstudio )
+ return()
+ endif()
+ create_target( fmodstudio::fmodstudio )
+ set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If the path have been specified in the arguments, use that
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
+
+ set_target_libraries(fmodstudio::fmodstudio ${FMODSTUDIO_LIBRARY})
+ set_target_include_dirs(fmodstudio::fmodstudio ${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)
@@ -18,21 +26,15 @@ if (FMODSTUDIO)
include(Prebuilt)
use_prebuilt_binary(fmodstudio)
if (WINDOWS)
- set(FMODSTUDIO_LIBRARY
- debug fmodL_vc
- optimized fmod_vc)
+ set_target_libraries( fmodstudio::fmodstudio fmod_vc)
elseif (DARWIN)
#despite files being called libfmod.dylib, we are searching for fmod
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
elseif (LINUX)
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
endif (WINDOWS)
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
- set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
+
+ set_target_include_dirs(fmodstudio::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
endif (FMODSTUDIO)
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index a36485f6d0..66f4ae0140 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -1,14 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET freetype::freetype )
+ return()
+endif()
+create_target( freetype::freetype)
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(FREETYPE REQUIRED freetype2)
else (USESYSTEMLIBS)
use_prebuilt_binary(freetype)
- set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2/)
- set(FREETYPE_LIBRARIES freetype)
+ set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/)
+ set_target_libraries( freetype::freetype freetype )
endif (USESYSTEMLIBS)
-link_directories(${FREETYPE_LIBRARY_DIRS})
diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake
index 6f42b44ab8..8d41db4ea3 100644
--- a/indra/cmake/GLOD.cmake
+++ b/indra/cmake/GLOD.cmake
@@ -1,11 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET glod::glod )
+ return()
+endif()
+create_target( glod::glod )
+
if (NOT USESYSTEMLIBS)
use_prebuilt_binary(glod)
endif (NOT USESYSTEMLIBS)
+
+
set(GLODLIB ON CACHE BOOL "Using GLOD library")
-set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-set(GLOD_LIBRARIES GLOD)
+set_target_include_dirs( glod::glod ${LIBS_PREBUILT_DIR}/include)
+set_target_libraries( glod::glod GLOD )
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index 06227b3fe2..970b06b81f 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,22 +1,24 @@
# -*- cmake -*-
include(Prebuilt)
-set(HUNSPELL_FIND_QUIETLY ON)
-set(HUNSPELL_FIND_REQUIRED ON)
+if( TARGET hunspell::hunspell )
+ return()
+endif()
+create_target( hunspell::hunspell )
if (USESYSTEMLIBS)
include(FindHUNSPELL)
else (USESYSTEMLIBS)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- set(HUNSPELL_LIBRARY libhunspell)
+ set_target_libraries( hunspell::hunspell libhunspell)
elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
elseif(LINUX)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
else()
message(FATAL_ERROR "Invalid platform")
endif()
- set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
use_prebuilt_binary(dictionaries)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index d6da22aecc..7245ca7b36 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -2,19 +2,22 @@
include(Prebuilt)
include(Linking)
-set(JPEG_FIND_QUIETLY ON)
-set(JPEG_FIND_REQUIRED ON)
+
+if( TARGET jpeglib::jpeglib )
+ return()
+endif()
+create_target(jpeglib::jpeglib)
if (USESYSTEMLIBS)
include(FindJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(jpeglib)
if (LINUX)
- set(JPEG_LIBRARIES jpeg)
+ set_target_libraries( jpeglib::jpeglib jpeg)
elseif (DARWIN)
- set(JPEG_LIBRARIES jpeg)
+ set_target_libraries( jpeglib::jpeglib jpeg)
elseif (WINDOWS)
- set(JPEG_LIBRARIES jpeglib)
+ set_target_libraries( jpeglib::jpeglib jpeglib)
endif (LINUX)
- set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 079619adf8..14bfd32b6b 100644
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -1,22 +1,21 @@
# -*- cmake -*-
include(Prebuilt)
-
-set(JSONCPP_FIND_QUIETLY ON)
-set(JSONCPP_FIND_REQUIRED ON)
+if( TARGET jsoncpp::jsoncpp )
+ return()
+endif()
+create_target( jsoncpp::jsoncpp)
if (USESYSTEMLIBS)
include(FindJsonCpp)
else (USESYSTEMLIBS)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
- set(JSONCPP_LIBRARIES
- debug json_libmdd.lib
- optimized json_libmd.lib)
+ set_target_libraries( jsoncpp::jsoncpp json_libmd.lib )
elseif (DARWIN)
- set(JSONCPP_LIBRARIES libjson_darwin_libmt.a)
+ set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a )
elseif (LINUX)
- set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
+ set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
endif (WINDOWS)
- set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
+ set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4937c2a9d7..6860b1f316 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -36,30 +36,29 @@ INCLUDE(GoogleMock)
)
SET(alltest_DEP_TARGETS
# needed by the test harness itself
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
llcommon
)
+
+ SET(alltest_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/test
+ ${GOOGLEMOCK_INCLUDE_DIRS}
+ )
+ SET(alltest_LIBRARIES
+ llcommon
+ ${GOOGLEMOCK_LIBRARIES}
+ ${PTHREAD_LIBRARY}
+ ${WINDOWS_LIBRARIES}
+ )
IF(NOT "${project}" STREQUAL "llmath")
# add llmath as a dep unless the tested module *is* llmath!
LIST(APPEND alltest_DEP_TARGETS
- llmath
- )
+ llmath
+ )
+ LIST(APPEND alltest_LIBRARIES
+ llmath
+ )
ENDIF(NOT "${project}" STREQUAL "llmath")
- SET(alltest_INCLUDE_DIRS
- ${LLMATH_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LIBS_OPEN_DIR}/test
- ${GOOGLEMOCK_INCLUDE_DIRS}
- )
- SET(alltest_LIBRARIES
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- ${GOOGLEMOCK_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- )
+
# Headers, for convenience in targets.
SET(alltest_HEADER_FILES
${CMAKE_SOURCE_DIR}/test/test.h
@@ -126,7 +125,8 @@ INCLUDE(GoogleMock)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}")
ENDIF(LL_TEST_VERBOSE)
# Add to project
- TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${alltest_DEP_TARGETS} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} )
+ add_dependencies( PROJECT_${project}_TEST_${name} ${alltest_DEP_TARGETS})
# Compile-time Definitions
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS)
SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name}
diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake
index 675330ec72..99399d349a 100644
--- a/indra/cmake/LLAppearance.cmake
+++ b/indra/cmake/LLAppearance.cmake
@@ -2,26 +2,14 @@
include(Variables)
include(Boost)
-include(LLMessage)
include(LLCoreHttp)
-set(LLAPPEARANCE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llappearance
- )
-
if (BUILD_HEADLESS)
set(LLAPPEARANCE_HEADLESS_LIBRARIES
llappearanceheadless
)
endif (BUILD_HEADLESS)
-set(LLAPPEARANCE_LIBRARIES llappearance
- llmessage
- llcorehttp
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- )
diff --git a/indra/cmake/LLAudio.cmake b/indra/cmake/LLAudio.cmake
index 7c248dfc72..c842c69bfe 100644
--- a/indra/cmake/LLAudio.cmake
+++ b/indra/cmake/LLAudio.cmake
@@ -1,10 +1,3 @@
# -*- cmake -*-
include(Audio)
-
-set(LLAUDIO_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llaudio
- )
-
-# be exhaustive here
-set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
diff --git a/indra/cmake/LLCharacter.cmake b/indra/cmake/LLCharacter.cmake
deleted file mode 100644
index 9b2f5c4956..0000000000
--- a/indra/cmake/LLCharacter.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLCHARACTER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcharacter
- )
-
-set(LLCHARACTER_LIBRARIES llcharacter)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 9c8740793a..6d2468695f 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -4,36 +4,5 @@ include(APR)
include(Boost)
include(EXPAT)
include(ZLIBNG)
-
-set(LLCOMMON_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcommon
- ${APRUTIL_INCLUDE_DIR}
- ${APR_INCLUDE_DIR}
- )
-set(LLCOMMON_SYSTEM_INCLUDE_DIRS
- ${Boost_INCLUDE_DIRS}
- )
-
-if (LINUX)
- # In order to support using ld.gold on linux, we need to explicitely
- # specify all libraries that llcommon uses.
- # llcommon uses `clock_gettime' which is provided by librt on linux.
- set(LLCOMMON_LIBRARIES llcommon
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- rt
- )
-else (LINUX)
- set(LLCOMMON_LIBRARIES llcommon
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY} )
-endif (LINUX)
-
-set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
-if(LLCOMMON_LINK_SHARED)
- add_definitions(-DLL_COMMON_LINK_SHARED=1)
-endif(LLCOMMON_LINK_SHARED)
+include(JsonCpp)
+include(XmlRpcEpi) \ No newline at end of file
diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake
index 613453ab5d..a166c96043 100644
--- a/indra/cmake/LLCoreHttp.cmake
+++ b/indra/cmake/LLCoreHttp.cmake
@@ -2,16 +2,4 @@
include(CURL)
include(OpenSSL)
-include(Boost)
-
-set(LLCOREHTTP_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcorehttp
- ${CURL_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- )
-
-set(LLCOREHTTP_LIBRARIES llcorehttp
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY})
+include(NGHTTP2) \ No newline at end of file
diff --git a/indra/cmake/LLCrashLogger.cmake b/indra/cmake/LLCrashLogger.cmake
deleted file mode 100644
index f2cb83eb8b..0000000000
--- a/indra/cmake/LLCrashLogger.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLCRASHLOGGER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcrashlogger
- )
-
-set(LLCRASHLOGGER_LIBRARIES llcrashlogger)
diff --git a/indra/cmake/LLFileSystem.cmake b/indra/cmake/LLFileSystem.cmake
deleted file mode 100644
index 2e6c42c30c..0000000000
--- a/indra/cmake/LLFileSystem.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLFILESYSTEM_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llfilesystem
- )
-
-set(LLFILESYSTEM_LIBRARIES llfilesystem)
diff --git a/indra/cmake/LLImage.cmake b/indra/cmake/LLImage.cmake
index ec3da89081..8e0b44dfe4 100644
--- a/indra/cmake/LLImage.cmake
+++ b/indra/cmake/LLImage.cmake
@@ -1,11 +1,4 @@
# -*- cmake -*-
-include(JPEG)
+#include(JPEG)
include(PNG)
-
-set(LLIMAGE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llimage
- ${JPEG_INCLUDE_DIRS}
- )
-
-set(LLIMAGE_LIBRARIES llimage)
diff --git a/indra/cmake/LLImageJ2COJ.cmake b/indra/cmake/LLImageJ2COJ.cmake
deleted file mode 100644
index 1bcf205f2d..0000000000
--- a/indra/cmake/LLImageJ2COJ.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- cmake -*-
-
-include(OpenJPEG)
-
-set(LLIMAGEJ2COJ_LIBRARIES llimagej2coj)
diff --git a/indra/cmake/LLInventory.cmake b/indra/cmake/LLInventory.cmake
deleted file mode 100644
index c3dc077a2b..0000000000
--- a/indra/cmake/LLInventory.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLINVENTORY_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llinventory
- )
-
-set(LLINVENTORY_LIBRARIES llinventory)
diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake
index e478b01f84..25762ab066 100644
--- a/indra/cmake/LLKDU.cmake
+++ b/indra/cmake/LLKDU.cmake
@@ -7,15 +7,23 @@ if (INSTALL_PROPRIETARY)
set(USE_KDU ON CACHE BOOL "Use Kakadu library.")
endif (INSTALL_PROPRIETARY)
+if( TARGET kdu::kdu )
+ return()
+endif()
+create_target( kdu::kdu )
+
if (USE_KDU)
include(Prebuilt)
use_prebuilt_binary(kdu)
if (WINDOWS)
- set(KDU_LIBRARY kdu.lib)
+ set_target_libraries( kdu::kdu kdu.lib)
else (WINDOWS)
- set(KDU_LIBRARY libkdu.a)
+ set_target_libraries( kdu::kdu libkdu.a)
endif (WINDOWS)
- set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
- set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
- set(LLKDU_LIBRARIES llkdu)
+ set_target_libraries( kdu::kdu kdu.lib)
+
+ set_target_include_dirs( kdu::kdu
+ ${AUTOBUILD_INSTALL_DIR}/include/kdu
+ ${LIBS_OPEN_DIR}/llkdu
+ )
endif (USE_KDU)
diff --git a/indra/cmake/LLLogin.cmake b/indra/cmake/LLLogin.cmake
deleted file mode 100644
index 47d171876a..0000000000
--- a/indra/cmake/LLLogin.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLLOGIN_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/viewer_components/login
- )
-
-set(LLLOGIN_LIBRARIES lllogin)
diff --git a/indra/cmake/LLMessage.cmake b/indra/cmake/LLMessage.cmake
deleted file mode 100644
index 7be53ec0ec..0000000000
--- a/indra/cmake/LLMessage.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- cmake -*-
-
-include(CURL)
-include(OpenSSL)
-include(XmlRpcEpi)
-
-set(LLMESSAGE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llmessage
- ${CURL_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIRS}
- )
-
-set(LLMESSAGE_LIBRARIES llmessage)
diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake
index e6afee762e..c46a04129a 100644
--- a/indra/cmake/LLPhysicsExtensions.cmake
+++ b/indra/cmake/LLPhysicsExtensions.cmake
@@ -10,6 +10,11 @@ if (INSTALL_PROPRIETARY)
set(HAVOK ON CACHE BOOL "Use Havok physics library")
endif (INSTALL_PROPRIETARY)
+if(TARGET llphysicsextensions )
+ return()
+endif()
+create_target(llphysicsextensions)
+
# Note that the use_prebuilt_binary macros below do not in fact include binaries;
# the llphysicsextensions_* packages are source only and are built here.
@@ -19,17 +24,14 @@ if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions)
-
+ set_target_libraries( llphysicsextensions llphysicsextensions)
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv)
-
+ set_target_libraries( llphysicsextensions llphysicsextensions_tpv)
else (HAVOK)
use_prebuilt_binary(llphysicsextensions_stub)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensionsstub)
-
+ set_target_libraries( llphysicsextensions llphysicsextensionsstub)
endif (HAVOK)
-set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
+set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake
deleted file mode 100644
index 399cb332dd..0000000000
--- a/indra/cmake/LLPlugin.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- cmake -*-
-
-
-set(LLPLUGIN_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llplugin
- )
-
-if (LINUX)
- # In order to support using ld.gold on linux, we need to explicitely
- # specify all libraries that llplugin uses.
- set(LLPLUGIN_LIBRARIES llplugin pthread)
-else (LINUX)
- set(LLPLUGIN_LIBRARIES llplugin)
-endif (LINUX)
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 4e34951215..799afc77d1 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -4,49 +4,41 @@
include(Prebuilt)
include(Boost)
+if( TARGET colladadom::colladadom )
+ return()
+endif()
+
use_prebuilt_binary(colladadom)
use_prebuilt_binary(minizip-ng) # needed for colladadom
use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml2)
-set(LLPRIMITIVE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llprimitive
- )
+create_target( pcre::pcre )
+set_target_libraries( pcre::pcre pcrecpp pcre )
+
+create_target( minizip-ng::minizip-ng )
if (WINDOWS)
- set(LLPRIMITIVE_LIBRARIES
- debug llprimitive
- optimized llprimitive
- debug libcollada14dom23-sd
- optimized libcollada14dom23-s
- libxml2_a
- debug pcrecppd
- optimized pcrecpp
- debug pcred
- optimized pcre
- debug libminizip
- optimized libminizip
- ${BOOST_SYSTEM_LIBRARIES}
+ set_target_libraries( minizip-ng::minizip-ng libminizip )
+else()
+ set_target_libraries( minizip-ng::minizip-ng minizip )
+endif()
+
+create_target( libxml::libxml )
+if (WINDOWS)
+ set_target_libraries( libxml::libxml libxml2_a)
+else()
+ set_target_libraries( libxml::libxml xml2)
+endif()
+
+create_target( colladadom::colladadom )
+set_target_include_dirs( colladadom::colladadom
+ ${LIBS_PREBUILT_DIR}/include/collada
+ ${LIBS_PREBUILT_DIR}/include/collada/1.4
)
+if (WINDOWS)
+ set_target_libraries(colladadom::colladadom libcollada14dom23-s libxml::libxml minizip-ng::minizip-ng )
elseif (DARWIN)
- set(LLPRIMITIVE_LIBRARIES
- llprimitive
- debug collada14dom-d
- optimized collada14dom
- minizip # for collada libminizip.a
- xml2
- pcrecpp
- pcre
- iconv # Required by libxml2
- )
+ set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng)
elseif (LINUX)
- set(LLPRIMITIVE_LIBRARIES
- llprimitive
- debug collada14dom-d
- optimized collada14dom
- minizip
- xml2
- pcrecpp
- pcre
- )
-endif (WINDOWS)
-
+ set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng)
+endif() \ No newline at end of file
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
deleted file mode 100644
index 868922451f..0000000000
--- a/indra/cmake/LLRender.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- cmake -*-
-
-include(Variables)
-include(FreeType)
-include(GLH)
-
-set(LLRENDER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llrender
- ${GLH_INCLUDE_DIR}
- )
-
-if (BUILD_HEADLESS)
- set(LLRENDER_HEADLESS_LIBRARIES
- llrenderheadless
- )
-endif (BUILD_HEADLESS)
-set(LLRENDER_LIBRARIES
- llrender
- )
-
diff --git a/indra/cmake/LLUI.cmake b/indra/cmake/LLUI.cmake
deleted file mode 100644
index 34de57108b..0000000000
--- a/indra/cmake/LLUI.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLUI_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llui
- )
-
-set(LLUI_LIBRARIES llui)
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 80af7ff2ab..ac14ead0de 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -26,17 +26,5 @@ if (SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
endif (SDL_FOUND)
-set(LLWINDOW_INCLUDE_DIRS
- ${GLEXT_INCLUDE_DIR}
- ${LIBS_OPEN_DIR}/llwindow
- )
-if (BUILD_HEADLESS)
- set(LLWINDOW_HEADLESS_LIBRARIES
- llwindowheadless
- )
-endif (BUILD_HEADLESS)
- set(LLWINDOW_LIBRARIES
- llwindow
- )
diff --git a/indra/cmake/LLXML.cmake b/indra/cmake/LLXML.cmake
deleted file mode 100644
index b093c76297..0000000000
--- a/indra/cmake/LLXML.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- cmake -*-
-
-include(Boost)
-include(EXPAT)
-
-set(LLXML_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llxml
- ${EXPAT_INCLUDE_DIRS}
- )
-set(LLXML_SYSTEM_INCLUDE_DIRS
- ${Boost_INCLUDE_DIRS}
- )
-
-set(LLXML_LIBRARIES llxml)
diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index df829b615a..a7acd64d62 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -2,6 +2,11 @@
include(Linking)
include(Prebuilt)
+if( TARGET libvlc::libvlc )
+ return()
+endif()
+create_target( libvlc::libvlc )
+
if (USESYSTEMLIBS)
set(LIBVLCPLUGIN OFF CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
@@ -13,18 +18,18 @@ else (USESYSTEMLIBS)
endif (USESYSTEMLIBS)
if (WINDOWS)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.lib
- libvlccore.lib
+ set_target_libraries( libvlc::libvlc
+ libvlc.lib
+ libvlccore.lib
)
elseif (DARWIN)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.dylib
+ set_target_libraries( libvlc::libvlc
+`` libvlc.dylib
libvlccore.dylib
)
elseif (LINUX)
# Specify a full path to make sure we get a static link
- set(VLC_PLUGIN_LIBRARIES
+ set_target_libraries( liblvc::libvlc
${LIBS_PREBUILT_DIR}/lib/libvlc.a
${LIBS_PREBUILT_DIR}/lib/libvlccore.a
)
diff --git a/indra/cmake/MediaPluginBase.cmake b/indra/cmake/MediaPluginBase.cmake
deleted file mode 100644
index 2be035b641..0000000000
--- a/indra/cmake/MediaPluginBase.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- cmake -*-
-
-
-set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/media_plugins/base/
- )
-
-set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 388df16a52..f22e2246aa 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -3,6 +3,11 @@ include(Prebuilt)
set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
+if ( TARGET ndof::ndof )
+ return()
+endif()
+create_target( ndof::ndof )
+
if (NDOF)
if (USESYSTEMLIBS)
set(NDOF_FIND_REQUIRED ON)
@@ -15,22 +20,17 @@ if (NDOF)
endif (WINDOWS OR DARWIN)
if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
+ set_target_libraries( ndof::ndof libndofdev)
elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
+ set_target_libraries( ndof::ndof ndofdev)
endif (WINDOWS)
-
- set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
set(NDOF_FOUND 1)
endif (USESYSTEMLIBS)
endif (NDOF)
if (NDOF_FOUND)
add_definitions(-DLIB_NDOF=1)
- include_directories(${NDOF_INCLUDE_DIR})
else (NDOF_FOUND)
message(STATUS "Building without N-DoF joystick support")
- set(NDOF_INCLUDE_DIR "")
- set(NDOF_LIBRARY "")
endif (NDOF_FOUND)
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index df191ff3c1..5215af5dd9 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -1,20 +1,20 @@
include(Prebuilt)
-set(NGHTTP2_FIND_QUIETLY ON)
-set(NGHTTP2_FIND_REQUIRED ON)
+if( TARGET nghttp2::nghttp2 )
+ return()
+endif()
+create_target( nghttp2::nghttp2 )
if (USESYSTEMLIBS)
include(FindNGHTTP2)
else (USESYSTEMLIBS)
use_prebuilt_binary(nghttp2)
if (WINDOWS)
- set(NGHTTP2_LIBRARIES
- ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib
- )
+ set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
elseif (DARWIN)
- set(NGHTTP2_LIBRARIES libnghttp2.dylib)
+ set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib)
else (WINDOWS)
- set(NGHTTP2_LIBRARIES libnghttp2.a)
+ set_target_libraries( nghttp2::nghttp2 libnghttp2.a )
endif (WINDOWS)
- set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2)
+ set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake
index 105f442a30..1eea96784f 100644
--- a/indra/cmake/NVAPI.cmake
+++ b/indra/cmake/NVAPI.cmake
@@ -5,8 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.")
if (NVAPI)
if (WINDOWS)
+ create_target( nvapi::nvapi )
+ set_target_libraries( nvapi::nvapi nvapi)
use_prebuilt_binary(nvapi)
- set(NVAPI_LIBRARY nvapi)
else (WINDOWS)
set(NVAPI_LIBRARY "")
endif (WINDOWS)
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 1bbfff6f98..ab2d258a12 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -9,7 +9,12 @@ else (LINUX)
endif (LINUX)
if (OPENAL)
- set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
+ if( TARGET openal::openal )
+ return()
+ endif()
+ create_target( openal::openal )
+ set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
include(FindOpenAL)
@@ -18,13 +23,14 @@ if (OPENAL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openal)
endif (USESYSTEMLIBS)
+
if(WINDOWS)
- set(OPENAL_LIBRARIES
+ set_target_libraries( openal::openal
OpenAL32
alut
)
else()
- set(OPENAL_LIBRARIES
+ set_target_libraries( openal::openal
openal
alut
)
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake
index bf0bde2ba7..67292250bb 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -1,22 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
-set(OPENJPEG_FIND_QUIETLY ON)
-set(OPENJPEG_FIND_REQUIRED ON)
+if( TARGET openjpeg::openjpeg )
+ return()
+endif()
+create_target( openjpeg::openjpeg )
if (USESYSTEMLIBS)
include(FindOpenJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
- if(WINDOWS)
- # Windows has differently named release and debug openjpeg(d) libs.
- set(OPENJPEG_LIBRARIES
- debug openjpegd
- optimized openjpeg)
- else(WINDOWS)
- set(OPENJPEG_LIBRARIES openjpeg)
- endif(WINDOWS)
-
- set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg)
+ set_target_libraries(openjpeg::openjpeg openjpeg )
+ set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 32400f5e4e..80b419c36e 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,23 +1,22 @@
# -*- cmake -*-
include(Prebuilt)
-set(OpenSSL_FIND_QUIETLY ON)
-set(OpenSSL_FIND_REQUIRED ON)
+if( TARGET openssl::openssl )
+ return()
+endif()
+create_target(openssl::openssl)
if (USESYSTEMLIBS)
include(FindOpenSSL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openssl)
if (WINDOWS)
- set(OPENSSL_LIBRARIES libssl libcrypto)
- else (WINDOWS)
- set(OPENSSL_LIBRARIES ssl crypto)
+ set_target_libraries(openssl::openssl libssl libcrypto)
+ elseif (LINUX)
+ set_target_libraries(openssl::openssl ssl crypto dl)
+ else()
+ set_target_libraries(openssl::openssl ssl crypto)
endif (WINDOWS)
- set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
-if (LINUX)
- set(CRYPTO_LIBRARIES crypto dl)
-elseif (DARWIN)
- set(CRYPTO_LIBRARIES crypto)
-endif (LINUX)
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake
index 248a875a19..54b2438425 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET libpng::libpng )
+ return()
+endif()
+create_target(libpng::libpng)
+
set(PNG_FIND_QUIETLY ON)
set(PNG_FIND_REQUIRED ON)
@@ -9,26 +14,9 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(libpng)
if (WINDOWS)
- set(PNG_LIBRARIES libpng16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
- elseif(DARWIN)
- set(PNG_LIBRARIES png16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
+ set_target_libraries(libpng::libpng libpng16)
else()
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-lpng16 here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(PNG_PRELOAD_ARCHIVES -Wl,--whole-archive png16 -Wl,--no-whole-archive)
set(PNG_LIBRARIES png16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
endif()
+ set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake
index 33a6d76916..9125f2f80f 100644
--- a/indra/cmake/Prebuilt.cmake
+++ b/indra/cmake/Prebuilt.cmake
@@ -61,4 +61,15 @@ macro (use_prebuilt_binary _binary)
endif (NOT USESYSTEMLIBS_${_binary})
endmacro (use_prebuilt_binary _binary)
+function( create_target name )
+ add_library( ${name} INTERFACE IMPORTED )
+endfunction()
+function( set_target_libraries target )
+ set_property( TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES ${ARGN} )
+endfunction()
+function( set_target_include_dirs target)
+ set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} )
+endfunction()
+
+
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake
index ecc5b74ef1..55b38fca28 100644
--- a/indra/cmake/URIPARSER.cmake
+++ b/indra/cmake/URIPARSER.cmake
@@ -1,7 +1,9 @@
# -*- cmake -*-
-set(URIPARSER_FIND_QUIETLY ON)
-set(URIPARSER_FIND_REQUIRED ON)
+if( TARGET uriparser::uriparser )
+ return()
+endif()
+create_target( uriparser::uriparser )
include(Prebuilt)
@@ -10,26 +12,11 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(uriparser)
if (WINDOWS)
- set(URIPARSER_LIBRARIES
- debug uriparserd
- optimized uriparser)
+ set_target_libraries( uriparser::uriparser uriparser)
elseif (LINUX)
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it.
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-luriparser here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(URIPARSER_PRELOAD_ARCHIVES -Wl,--whole-archive uriparser -Wl,--no-whole-archive)
- set(URIPARSER_LIBRARIES uriparser)
+ set_target_libraries( uriparser::uriparser uriparser)
elseif (DARWIN)
- set(URIPARSER_LIBRARIES liburiparser.dylib)
+ set_target_libraries( uriparser::uriparser liburiparser.dylib)
endif (WINDOWS)
- set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser)
+ set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
index 8c3790ea89..75b94acc50 100644
--- a/indra/cmake/XmlRpcEpi.cmake
+++ b/indra/cmake/XmlRpcEpi.cmake
@@ -1,20 +1,15 @@
# -*- cmake -*-
include(Prebuilt)
-set(XMLRPCEPI_FIND_QUIETLY ON)
-set(XMLRPCEPI_FIND_REQUIRED ON)
+if( TARGET xmlrpc-epi::xmlrpc-epi )
+ return()
+endif()
+create_target( xmlrpc-epi::xmlrpc-epi )
if (USESYSTEMLIBS)
include(FindXmlRpcEpi)
else (USESYSTEMLIBS)
use_prebuilt_binary(xmlrpc-epi)
- if (WINDOWS)
- set(XMLRPCEPI_LIBRARIES
- debug xmlrpc-epid
- optimized xmlrpc-epi
- )
- else (WINDOWS)
- set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
- endif (WINDOWS)
- set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi )
+ set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake
index 1f46a23d92..5aaca60664 100644
--- a/indra/cmake/ZLIBNG.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -1,35 +1,20 @@
# -*- cmake -*-
-set(ZLIBNG_FIND_QUIETLY ON)
-set(ZLIBNG_FIND_REQUIRED ON)
-
include(Prebuilt)
+if( TARGET zlib-ng::zlib-ng )
+ return()
+endif()
+create_target(zlib-ng::zlib-ng)
+
if (USESYSTEMLIBS)
include(FindZLIBNG)
else (USESYSTEMLIBS)
use_prebuilt_binary(zlib-ng)
if (WINDOWS)
- set(ZLIBNG_LIBRARIES
- debug zlib
- optimized zlib)
- elseif (LINUX)
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-lz here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
- set(ZLIBNG_LIBRARIES z)
- elseif (DARWIN)
- set(ZLIBNG_LIBRARIES z)
+ set_target_libraries( zlib-ng::zlib-ng zlib )
+ else()
+ set_target_libraries( zlib-ng::zlib-ng z )
endif (WINDOWS)
- set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
+ set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 4edc4c59cd..ded109f9f1 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -10,28 +10,30 @@ else (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (USE_BUGSPLAT)
+ create_target(bugsplat::bugsplat)
if (NOT USESYSTEMLIBS)
include(Prebuilt)
use_prebuilt_binary(bugsplat)
if (WINDOWS)
- set(BUGSPLAT_LIBRARIES
+ set_target_libraries( bugsplat::bugsplat
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
)
elseif (DARWIN)
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
+ set_target_libraries( bugsplat::bugsplat
+ ${BUGSPLAT_LIBRARIES}
+ )
else (WINDOWS)
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
endif (WINDOWS)
else (NOT USESYSTEMLIBS)
- set(BUGSPLAT_FIND_QUIETLY ON)
- set(BUGSPLAT_FIND_REQUIRED ON)
include(FindBUGSPLAT)
endif (NOT USESYSTEMLIBS)
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
- set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
+ set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat)
set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
endif (USE_BUGSPLAT)
diff --git a/indra/llappearance/CMakeLists.txt b/indra/llappearance/CMakeLists.txt
index 268849ad74..321c1e1798 100644
--- a/indra/llappearance/CMakeLists.txt
+++ b/indra/llappearance/CMakeLists.txt
@@ -4,30 +4,11 @@ project(llappearance)
include(00-Common)
include(LLCommon)
-include(LLCharacter)
include(LLImage)
-include(LLInventory)
-include(LLMath)
-include(LLMessage)
include(LLCoreHttp)
-include(LLRender)
-include(LLFileSystem)
include(LLWindow)
-include(LLXML)
include(Linking)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCHARACTER_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLINVENTORY_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
-
set(llappearance_SOURCE_FILES
llavatarappearance.cpp
llavatarjoint.cpp
@@ -79,33 +60,32 @@ list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES})
add_library (llappearance ${llappearance_SOURCE_FILES})
target_link_libraries(llappearance
- ${LLCHARACTER_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLRENDER_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
+ llcharacter
+ llinventory
+ llimage
+ llrender
+ llfilesystem
+ llmath
+ llxml
+ llmessage
+ llcorehttp
+ llcommon
)
+set_target_include_dirs( llappearance ${CMAKE_CURRENT_SOURCE_DIR})
if (BUILD_HEADLESS)
add_library (llappearanceheadless ${llappearance_SOURCE_FILES})
-
+ set_target_include_dirs( llappearanceheadless ${CMAKE_CURRENT_SOURCE_DIR})
+
target_link_libraries(llappearanceheadless
- ${LLCHARACTER_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLRENDERHEADLESS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
+ llcharacter
+ llinventory
+ llimage
+ llfilesystem
+ llmath
+ llxml
+ llmessage
+ llcorehttp
+ llcommon
)
endif (BUILD_HEADLESS)
diff --git a/indra/llaudio/CMakeLists.txt b/indra/llaudio/CMakeLists.txt
index 92a5cfe22f..16576ddbad 100644
--- a/indra/llaudio/CMakeLists.txt
+++ b/indra/llaudio/CMakeLists.txt
@@ -7,23 +7,6 @@ include(LLAudio)
include(FMODSTUDIO)
include(OPENAL)
include(LLCommon)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-
-include_directories(
- ${LLAUDIO_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${OGG_INCLUDE_DIRS}
- ${VORBISENC_INCLUDE_DIRS}
- ${VORBISFILE_INCLUDE_DIRS}
- ${VORBIS_INCLUDE_DIRS}
- ${OPENAL_LIB_INCLUDE_DIRS}
- ${FREEAULT_LIB_INCLUDE_DIRS}
- )
set(llaudio_SOURCE_FILES
llaudioengine.cpp
@@ -43,9 +26,6 @@ set(llaudio_HEADER_FILES
)
if (FMODSTUDIO)
- include_directories(
- ${FMODSTUDIO_INCLUDE_DIR}
- )
list(APPEND llaudio_SOURCE_FILES
llaudioengine_fmodstudio.cpp
lllistener_fmodstudio.cpp
@@ -60,10 +40,6 @@ if (FMODSTUDIO)
endif (FMODSTUDIO)
if (OPENAL)
- include_directories(
- ${OPENAL_LIBRARIES}
- )
-
list(APPEND llaudio_SOURCE_FILES
llaudioengine_openal.cpp
lllistener_openal.cpp
@@ -81,14 +57,18 @@ set_source_files_properties(${llaudio_HEADER_FILES}
list(APPEND llaudio_SOURCE_FILES ${llaudio_HEADER_FILES})
add_library (llaudio ${llaudio_SOURCE_FILES})
-target_link_libraries(
- llaudio
- ${LLCOMMON_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${VORBISENC_LIBRARIES}
- ${VORBISFILE_LIBRARIES}
- ${VORBIS_LIBRARIES}
- ${OGG_LIBRARIES}
+set_target_include_dirs( llaudio ${CMAKE_CURRENT_SOURCE_DIR})
+target_link_libraries( llaudio
+ llcommon
+ llmath
+ llmessage
+ llfilesystem
+ vorbis::vorbis
)
+
+if( TARGET openal::openal )
+ target_link_libraries( llaudio openal::openal )
+endif()
+if( TARGET fmodstudio::fmodstudio )
+ target_link_libraries( llaudio fmodstudio::fmodstudio )
+endif() \ No newline at end of file
diff --git a/indra/llcharacter/CMakeLists.txt b/indra/llcharacter/CMakeLists.txt
index d90ffb5543..59e491748d 100644
--- a/indra/llcharacter/CMakeLists.txt
+++ b/indra/llcharacter/CMakeLists.txt
@@ -4,22 +4,6 @@ project(llcharacter)
include(00-Common)
include(LLCommon)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-include(LLXML)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llcharacter_SOURCE_FILES
llanimationstates.cpp
@@ -79,12 +63,13 @@ 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_link_libraries(
- llcharacter
- ${LLCOMMON_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLXML_LIBRARIES}
+ llcharacter
+ llcommon
+ llmath
+ llmessage
+ llfilesystem
+ llxml
)
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 68378222d9..901686c815 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -13,14 +13,6 @@ include(Copy3rdPartyLibs)
include(ZLIBNG)
include(URIPARSER)
-include_directories(
- ${EXPAT_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIR}
- ${ZLIBNG_INCLUDE_DIRS}
- ${URIPARSER_INCLUDE_DIRS}
- )
-
# add_executable(lltreeiterators lltreeiterators.cpp)
#
# target_link_libraries(lltreeiterators
@@ -286,22 +278,19 @@ else(LLCOMMON_LINK_SHARED)
endif(LLCOMMON_LINK_SHARED)
target_link_libraries(
- llcommon
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${ZLIBNG_LIBRARIES}
+ llcommon
+ apr::apr
+ expat::expat
+ jsoncpp::jsoncpp
+ zlib-ng::zlib-ng
${WINDOWS_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ boost::boost
${GOOGLE_PERFTOOLS_LIBRARIES}
- ${URIPARSER_LIBRARIES}
+ uriparser::uriparser
)
+set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR})
+
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
@@ -319,13 +308,9 @@ if (LL_TESTS)
#set(TEST_DEBUG on)
set(test_libs llcommon
- ${LLCOMMON_LIBRARIES}
- ${WINDOWS_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
${GOOGLEMOCK_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY})
+ )
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/llcommon/stringize.h b/indra/llcommon/stringize.h
index 38dd198ad3..174c9051a8 100644
--- a/indra/llcommon/stringize.h
+++ b/indra/llcommon/stringize.h
@@ -30,7 +30,7 @@
#define LL_STRINGIZE_H
#include <sstream>
-#include <llstring.h>
+#include "llstring.h"
/**
* gstringize(item) encapsulates an idiom we use constantly, using
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index c591680250..271ddbcd2d 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -10,18 +10,11 @@ include(NGHTTP2)
include(ZLIBNG)
include(LLCoreHttp)
include(LLAddBuildTest)
-include(LLMessage)
include(LLCommon)
include(Tut)
include(bugsplat)
-include_directories (${CMAKE_CURRENT_SOURCE_DIR})
-
-include_directories(
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- )
+include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../llmessage )
set(llcorehttp_SOURCE_FILES
bufferarray.cpp
@@ -92,14 +85,14 @@ list(APPEND llcorehttp_SOURCE_FILES ${llcorehttp_HEADER_FILES})
add_library (llcorehttp ${llcorehttp_SOURCE_FILES})
target_link_libraries(
- llcorehttp
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ llcommon
+ libcurl::libcurl
+ openssl::openssl
+ nghttp2::nghttp2
)
+set_target_include_dirs( llcorehttp ${CMAKE_CURRENT_SOURCE_DIR})
+
# tests
set(LLCOREHTTP_TESTS ON CACHE BOOL
@@ -128,17 +121,10 @@ if (LL_TESTS AND LLCOREHTTP_TESTS)
# set(TEST_DEBUG on)
set(test_libs
- ${LLCOREHTTP_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ ${WINDOWS_LIBRARIES}
+ llmessage
+ llcommon
)
# If http_proxy is in the current environment (e.g. to fetch s3-proxy
@@ -201,17 +187,10 @@ endif (DARWIN)
set(example_libs
${LEGACY_STDIO_LIBS}
- ${LLCOREHTTP_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${CURL_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ llcorehttp
+ ${WINDOWS_LIBRARIES}
+ llmessage
+ llcommon
)
add_executable(http_texture_load
diff --git a/indra/llcrashlogger/CMakeLists.txt b/indra/llcrashlogger/CMakeLists.txt
index d70a1e0fb0..0e357b249f 100644
--- a/indra/llcrashlogger/CMakeLists.txt
+++ b/indra/llcrashlogger/CMakeLists.txt
@@ -5,23 +5,6 @@ project(llcrashlogger)
include(00-Common)
include(LLCoreHttp)
include(LLCommon)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-include(LLXML)
-
-include_directories(
- ${LLCOREHTTP_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llcrashlogger_SOURCE_FILES
llcrashlogger.cpp
@@ -30,7 +13,6 @@ set(llcrashlogger_SOURCE_FILES
set(llcrashlogger_HEADER_FILES
CMakeLists.txt
-
llcrashlogger.h
llcrashlock.h
)
@@ -41,3 +23,4 @@ set_source_files_properties(${llcrashlogger_HEADER_FILES}
list(APPEND llcrashlogger_SOURCE_FILES ${llcrashlogger_HEADER_FILES})
add_library(llcrashlogger ${llcrashlogger_SOURCE_FILES})
+target_link_libraries( llcrashlogger llcommon llmessage llcorehttp llxml 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}")
diff --git a/indra/llimage/CMakeLists.txt b/indra/llimage/CMakeLists.txt
index 436b8dd1a2..5387a22601 100644
--- a/indra/llimage/CMakeLists.txt
+++ b/indra/llimage/CMakeLists.txt
@@ -5,24 +5,13 @@ project(llimage)
include(00-Common)
include(LLCommon)
include(LLImage)
-include(LLMath)
-include(LLFileSystem)
+include(JPEG)
include(LLKDU)
-include(LLImageJ2COJ)
include(ZLIBNG)
include(LLAddBuildTest)
include(bugsplat)
include(Tut)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${PNG_INCLUDE_DIRS}
- ${ZLIBNG_INCLUDE_DIRS}
- )
-
set(llimage_SOURCE_FILES
llimagebmp.cpp
llimage.cpp
@@ -60,21 +49,22 @@ 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})
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
if (USE_KDU)
- target_link_libraries(llimage ${LLKDU_LIBRARIES})
+ target_link_libraries(llimage llkdu)
else (USE_KDU)
- target_link_libraries(llimage ${LLIMAGEJ2COJ_LIBRARIES})
+ target_link_libraries(llimage llimagej2coj)
endif (USE_KDU)
target_link_libraries(llimage
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${JPEG_LIBRARIES}
- ${PNG_LIBRARIES}
- ${ZLIBNG_LIBRARIES}
+ llfilesystem
+ llmath
+ llcommon
+ zlib-ng::zlib-ng
+ libpng::libpng
+ jpeglib::jpeglib
)
# Add tests
diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt
index c9423d50dd..6880b09025 100644
--- a/indra/llimagej2coj/CMakeLists.txt
+++ b/indra/llimagej2coj/CMakeLists.txt
@@ -7,12 +7,6 @@ include(LLCommon)
include(LLImage)
include(OpenJPEG)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${OPENJPEG_INCLUDE_DIR}
- )
-
set(llimagej2coj_SOURCE_FILES
llimagej2coj.cpp
)
@@ -30,8 +24,9 @@ list(APPEND llimagej2coj_SOURCE_FILES ${llimagej2coj_HEADER_FILES})
add_library (llimagej2coj ${llimagej2coj_SOURCE_FILES})
-target_link_libraries(
- llimagej2coj
- ${OPENJPEG_LIBRARIES}
+target_link_libraries( llimagej2coj
+ llcommon
+ llimage
+ openjpeg::openjpeg
)
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 04975940aa..ee14f0a46e 100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -5,17 +5,6 @@ project(llinventory)
include(00-Common)
include(LLCommon)
include(LLCoreHttp)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-include(LLXML)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
set(llinventory_SOURCE_FILES
llcategory.cpp
@@ -70,7 +59,8 @@ 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})
#add unit tests
if (LL_TESTS)
@@ -81,7 +71,7 @@ if (LL_TESTS)
LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
- set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLFILESYSTEM_LIBRARIES} ${LLCOREHTTP_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES})
LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/llkdu/CMakeLists.txt b/indra/llkdu/CMakeLists.txt
index cb0e204e91..035fc746cf 100644
--- a/indra/llkdu/CMakeLists.txt
+++ b/indra/llkdu/CMakeLists.txt
@@ -13,15 +13,7 @@ include(00-Common)
include(LLCommon)
include(LLImage)
include(LLKDU)
-include(LLMath)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${KDU_INCLUDE_DIR}
- ${LLKDU_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- )
set(llkdu_SOURCE_FILES
llimagej2ckdu.cpp
@@ -51,9 +43,8 @@ set_source_files_properties(${llkdu_SOURCE_FILES}
if (USE_KDU)
add_library (llkdu ${llkdu_SOURCE_FILES})
- target_link_libraries(llkdu
- ${KDU_LIBRARY})
-
+ target_link_libraries(llkdu kdu::kdu )
+
# Add tests
if (LL_TESTS)
include(LLAddBuildTest)
@@ -66,10 +57,7 @@ if (USE_KDU)
llkdumem.h
lltut.h
)
- SET(llkdu_test_additional_INCLUDE_DIRS
- ${KDU_INCLUDE_DIR}
- ${LLKDU_INCLUDE_DIRS}
- )
+
LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}")
endif (LL_TESTS)
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index 552e820127..c385a4cff6 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -107,9 +107,8 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES})
add_library (llmath ${llmath_SOURCE_FILES})
-target_link_libraries(llmath
- ${LLCOMMON_LIBRARIES}
- )
+target_link_libraries(llmath llcommon)
+set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR})
# Add tests
if (LL_TESTS)
@@ -124,15 +123,11 @@ if (LL_TESTS)
v4color.cpp
v4coloru.cpp
)
- set_source_files_properties(
- ${llmath_TEST_SOURCE_FILES}
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_THREAD_LIBRARY}"
- )
+
LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}")
# INTEGRATION TESTS
- set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES})
+ set(test_libs llmath llcommon ${WINDOWS_LIBRARIES})
# TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests.
LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}")
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt
index f0a1dfe940..6be0262b25 100644
--- a/indra/llmessage/CMakeLists.txt
+++ b/indra/llmessage/CMakeLists.txt
@@ -7,9 +7,6 @@ include(GoogleMock)
include(LLAddBuildTest)
include(LLCommon)
include(LLCoreHttp)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
include(LLAddBuildTest)
include(Python)
include(Tut)
@@ -19,12 +16,9 @@ include(JsonCpp)
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
${LLCOREHTTP_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
${LLMESSAGE_INCLUDE_DIRS}
${LLFILESYSTEM_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIR}
)
set(llmessage_SOURCE_FILES
@@ -204,42 +198,18 @@ list(APPEND llmessage_SOURCE_FILES ${llmessage_HEADER_FILES})
add_library (llmessage ${llmessage_SOURCE_FILES})
-if (LINUX)
-target_link_libraries(
- llmessage
- ${CURL_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${XMLRPCEPI_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- rt
- )
-else (LINUX)
target_link_libraries(
- llmessage
- ${CURL_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${XMLRPCEPI_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- )
-endif(LINUX)
+ llmessage
+ libcurl::libcurl
+ llcommon
+ llfilesystem
+ llmath
+ openssl::openssl
+ xmlrpc-epi::xmlrpc-epi
+ llcorehttp
+ nghttp2::nghttp2
+)
+set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR})
# tests
if (LL_TESTS)
@@ -249,41 +219,29 @@ if (LL_TESTS)
lltrustedmessageservice.cpp
lltemplatemessagedispatcher.cpp
)
+ set_property( SOURCE ${llmessage_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES llmath llcorehttp)
LL_ADD_PROJECT_UNIT_TESTS(llmessage "${llmessage_TEST_SOURCE_FILES}")
-
# set(TEST_DEBUG on)
if (LINUX)
set(test_libs
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${CURL_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- rt
- ${GOOGLEMOCK_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ llfilesystem
+ llmath
+ llcorehttp
+ llmessage
+ llcommon
+ rt
)
else (LINUX)
set(test_libs
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${CURL_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${GOOGLEMOCK_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ llfilesystem
+ llmath
+ llcorehttp
+ llmessage
+ llcommon
)
endif(LINUX)
diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt
index 5cc129a267..872d62a2bb 100644
--- a/indra/llplugin/CMakeLists.txt
+++ b/indra/llplugin/CMakeLists.txt
@@ -6,26 +6,7 @@ include(00-Common)
include(CURL)
include(LLCommon)
include(LLImage)
-include(LLMath)
-include(LLMessage)
-include(LLRender)
-include(LLXML)
include(LLWindow)
-include(Boost)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llplugin_SOURCE_FILES
llpluginclassmedia.cpp
@@ -65,6 +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_link_libraries( llplugin llcommon llmath llrender llmessage )
add_subdirectory(slplugin)
diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt
index e4f64448c5..7725489c3e 100644
--- a/indra/llplugin/slplugin/CMakeLists.txt
+++ b/indra/llplugin/slplugin/CMakeLists.txt
@@ -2,19 +2,8 @@ project(SLPlugin)
include(00-Common)
include(LLCommon)
-include(LLPlugin)
include(Linking)
include(PluginAPI)
-include(LLMessage)
-
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
if (DARWIN)
include(CMakeFindFrameworks)
@@ -63,10 +52,10 @@ set_target_properties(SLPlugin
endif ()
target_link_libraries(SLPlugin
- ${LEGACY_STDIO_LIBS}
- ${LLPLUGIN_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
+ ${LEGACY_STDIO_LIBS}
+ llplugin
+ llmessage
+ llcommon
${PLUGIN_API_WINDOWS_LIBRARIES}
)
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 7b6d04b096..fb81f19206 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -4,27 +4,9 @@ project(llprimitive)
include(00-Common)
include(LLCommon)
-include(LLMath)
-include(LLMessage)
include(LLCoreHttp)
-include(LLXML)
include(LLPhysicsExtensions)
-include(LLCharacter)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include/collada
- ${LIBS_PREBUILT_DIR}/include/collada/1.4
- ${LLCHARACTER_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
- )
+include(LLPrimitive)
set(llprimitive_SOURCE_FILES
lldaeloader.cpp
@@ -71,19 +53,19 @@ 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_link_libraries(llprimitive
- ${LLCOMMON_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLPHYSICSEXTENSIONS_LIBRARIES}
- ${LLCHARACTER_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- )
-
+ llcommon
+ llmath
+ llmessage
+ llcorehttp
+ llxml
+ llcharacter
+ llphysicsextensions
+ colladadom::colladadom
+ pcre::pcre
+ )
#add unit tests
if (LL_TESTS)
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index baab09a104..7d42043613 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -7,26 +7,7 @@ include(OpenGL)
include(FreeType)
include(LLCommon)
include(LLImage)
-include(LLMath)
-include(LLRender)
include(LLWindow)
-include(LLXML)
-include(LLFileSystem)
-
-include_directories(
- ${FREETYPE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llrender_SOURCE_FILES
llatmosphere.cpp
@@ -98,18 +79,17 @@ if (BUILD_HEADLESS)
)
target_link_libraries(llrenderheadless
- ${LLCOMMON_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLRENDER_HEADLESS_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLWINDOW_HEADLESS_LIBRARIES}
- ${OPENGL_HEADLESS_LIBRARIES})
-
+ llcommon
+ llimage
+ llmath
+ llrender
+ llxml
+ llfilesystem
+ )
endif (BUILD_HEADLESS)
add_library (llrender ${llrender_SOURCE_FILES})
+set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR})
if (SDL_FOUND)
set_property(TARGET llrender
@@ -119,13 +99,15 @@ endif (SDL_FOUND)
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
-target_link_libraries(llrender
- ${LLCOMMON_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLWINDOW_LIBRARIES}
- ${FREETYPE_LIBRARIES}
- ${OPENGL_LIBRARIES})
+target_link_libraries(llrender
+ llcommon
+ llimage
+ llmath
+ llfilesystem
+ llxml
+ llwindow
+ freetype::freetype
+ OpenGL::GL
+ OpenGL::GLU
+ )
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index d96824bbf8..04103b1a94 100644
--- a/indra/llui/CMakeLists.txt
+++ b/indra/llui/CMakeLists.txt
@@ -6,33 +6,9 @@ include(00-Common)
include(Hunspell)
include(LLCommon)
include(LLImage)
-include(LLInventory)
-include(LLMath)
-include(LLMessage)
include(LLCoreHttp)
-include(LLRender)
include(LLWindow)
include(LLCoreHttp)
-include(LLFileSystem)
-include(LLXML)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLINVENTORY_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LIBS_PREBUILD_DIR}/include/hunspell
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llui_SOURCE_FILES
llaccordionctrl.cpp
@@ -276,38 +252,37 @@ 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})
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
target_link_libraries(llui
- ${LLRENDER_LIBRARIES}
- ${LLWINDOW_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLXUIXML_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${HUNSPELL_LIBRARY}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOMMON_LIBRARIES} # must be after llimage, llwindow, llrender
+ llrender
+ llwindow
+ llimage
+ llinventory
+ llmessage
+ llcorehttp
+ llfilesystem
+ llxml
+ llmath
+ hunspell::hunspell
+ llcommon
)
# Add tests
if(LL_TESTS)
include(LLAddBuildTest)
+ set(test_libs llmessage llcorehttp llxml llrender llcommon hunspell::hunspell ${WINDOWS_LIBRARIES})
+
SET(llui_TEST_SOURCE_FILES
llurlmatch.cpp
)
+ set_property( SOURCE ${llui_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES ${test_libs})
LL_ADD_PROJECT_UNIT_TESTS(llui "${llui_TEST_SOURCE_FILES}")
# INTEGRATION TESTS
- set(test_libs llui llmessage llcorehttp llcommon
- ${HUNSPELL_LIBRARY}
- ${LLCOMMON_LIBRARIES}
- ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY}
- ${WINDOWS_LIBRARIES})
+
if(NOT LINUX)
+ set(test_libs llui llmessage llcorehttp llxml llrender llcommon hunspell::hunspell ${WINDOWS_LIBRARIES})
LL_ADD_INTEGRATION_TEST(llurlentry llurlentry.cpp "${test_libs}")
endif(NOT LINUX)
endif(LL_TESTS)
diff --git a/indra/llwindow/CMakeLists.txt b/indra/llwindow/CMakeLists.txt
index 70eb99c86c..952fbbb56f 100644
--- a/indra/llwindow/CMakeLists.txt
+++ b/indra/llwindow/CMakeLists.txt
@@ -14,26 +14,9 @@ include(00-Common)
include(DragDrop)
include(LLCommon)
include(LLImage)
-include(LLMath)
-include(LLRender)
-include(LLFileSystem)
include(LLWindow)
-include(LLXML)
include(UI)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
set(llwindow_SOURCE_FILES
llcursortypes.cpp
@@ -64,17 +47,18 @@ set(viewer_HEADER_FILES
llmousehandler.h
)
+set(llwindow_LINK_LIBRARIES
+ llcommon
+ llimage
+ llmath
+ llrender
+ llfilesystem
+ llxml
+ )
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
if (LINUX)
- set(llwindow_LINK_LIBRARIES
- ${LLCOMMON_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLRENDER_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLWINDOW_LIBRARIES}
- ${LLXML_LIBRARIES}
+ set(llwindow_LINK_LIBRARIES APPEND
${UI_LIBRARIES} # for GTK
${SDL_LIBRARY}
fontconfig # For FCInit and other FC* functions.
@@ -196,5 +180,5 @@ if (SDL_FOUND)
)
endif (SDL_FOUND)
- target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
-
+target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
+set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index 3a7a54e51d..b585dbd26e 100644
--- a/indra/llxml/CMakeLists.txt
+++ b/indra/llxml/CMakeLists.txt
@@ -4,18 +4,6 @@ project(llxml)
include(00-Common)
include(LLCommon)
-include(LLMath)
-include(LLFileSystem)
-include(LLXML)
-
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- )
-include_directories(
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
set(llxml_SOURCE_FILES
llcontrol.cpp
@@ -42,11 +30,13 @@ add_library (llxml ${llxml_SOURCE_FILES})
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
target_link_libraries( llxml
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${EXPAT_LIBRARIES}
+ llfilesystem
+ llmath
+ llcommon
+ expat::expat
)
+set_target_include_dirs( llxml ${CMAKE_CURRENT_SOURCE_DIR})
+
# tests
@@ -62,11 +52,11 @@ if (LL_TESTS)
# set(TEST_DEBUG on)
set(test_libs
- ${LLXML_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- )
+ llxml
+ llmath
+ llcommon
+ ${WINDOWS_LIBRARIES}
+ )
LL_ADD_INTEGRATION_TEST(llcontrol "" "${test_libs}")
endif (LL_TESTS)
diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt
index 7f2b82ffdd..9da249bd27 100644
--- a/indra/media_plugins/base/CMakeLists.txt
+++ b/indra/media_plugins/base/CMakeLists.txt
@@ -5,25 +5,9 @@ project(media_plugin_base)
include(00-Common)
include(LLCommon)
include(LLImage)
-include(LLPlugin)
-include(LLMath)
-include(LLRender)
include(LLWindow)
include(Linking)
include(PluginAPI)
-include(OpenGL)
-
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
### media_plugin_base
@@ -48,5 +32,7 @@ set(media_plugin_base_HEADER_FILES
add_library(media_plugin_base
${media_plugin_base_SOURCE_FILES}
- )
+ )
+target_link_libraries( media_plugin_base llplugin )
+set_target_include_dirs(media_plugin_base ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 854ba55731..8d14714020 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -5,29 +5,12 @@ project(media_plugin_cef)
include(Boost)
include(00-Common)
include(LLCommon)
-include(LLPlugin)
-include(LLMath)
-include(LLRender)
include(LLWindow)
include(Linking)
include(PluginAPI)
-include(MediaPluginBase)
include(CEFPlugin)
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${CEF_INCLUDE_DIR}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
-
### media_plugin_cef
@@ -47,13 +30,6 @@ set(media_plugin_cef_HEADER_FILES
volume_catcher.h
)
-set (media_plugin_cef_LINK_LIBRARIES
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- ${CEF_PLUGIN_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${PLUGIN_API_WINDOWS_LIBRARIES})
-
# Select which VolumeCatcher implementation to use
if (LINUX)
message(FATAL_ERROR "CEF plugin has been enabled for a Linux compile.\n"
@@ -62,7 +38,7 @@ elseif (DARWIN)
list(APPEND media_plugin_cef_SOURCE_FILES mac_volume_catcher_null.cpp)
find_library(CORESERVICES_LIBRARY CoreServices)
find_library(AUDIOUNIT_LIBRARY AudioUnit)
- list(APPEND media_plugin_cef_LINK_LIBRARIES
+ set( media_plugin_cef_LINK_LIBRARIES
${CORESERVICES_LIBRARY} # for Component Manager calls
${AUDIOUNIT_LIBRARY} # for AudioUnit calls
)
@@ -85,7 +61,9 @@ add_library(media_plugin_cef
#)
target_link_libraries(media_plugin_cef
- ${media_plugin_cef_LINK_LIBRARIES}
+ media_plugin_base
+ cef::cef
+ ${media_plugin_cef_LINK_LIBRARIES}
)
if (WINDOWS)
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index eb067a7f6e..7d3e7f663b 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -5,31 +5,12 @@ project(media_plugin_example)
include(00-Common)
include(LLCommon)
include(LLImage)
-include(LLPlugin)
-include(LLMath)
-include(LLRender)
include(LLWindow)
include(Linking)
include(PluginAPI)
-include(MediaPluginBase)
-include(OpenGL)
include(ExamplePlugin)
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
-
-
### media_plugin_example
if(NOT ADDRESS_SIZE EQUAL 32)
@@ -49,21 +30,7 @@ add_library(media_plugin_example
${media_plugin_example_SOURCE_FILES}
)
-target_link_libraries(media_plugin_example
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${EXAMPLE_PLUGIN_LIBRARIES}
- ${PLUGIN_API_WINDOWS_LIBRARIES}
-)
-
-add_dependencies(media_plugin_example
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- # Using ${LLCOMMON_LIBRARIES} here drags in a whole bunch of Boost stuff
- # that only produces CMake warnings about nonexistent dependencies.
- llcommon
-)
+target_link_libraries(media_plugin_example media_plugin_base )
if (WINDOWS)
set_target_properties(
diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt
index 571eb57b24..c66b5d0d2e 100644
--- a/indra/media_plugins/gstreamer010/CMakeLists.txt
+++ b/indra/media_plugins/gstreamer010/CMakeLists.txt
@@ -16,20 +16,6 @@ include(OpenGL)
include(GStreamer010Plugin)
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${GSTREAMER010_INCLUDE_DIRS}
- ${GSTREAMER010_PLUGINS_BASE_INCLUDE_DIRS}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
### media_plugin_gstreamer010
@@ -59,17 +45,5 @@ add_library(media_plugin_gstreamer010
)
target_link_libraries(media_plugin_gstreamer010
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${PLUGIN_API_WINDOWS_LIBRARIES}
- ${GSTREAMER010_LIBRARIES}
-)
-
-add_dependencies(media_plugin_gstreamer010
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
-)
-
-
+ media_plugin_base
+ )
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index 97392bbe08..cae1c4f92b 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -5,32 +5,12 @@ project(media_plugin_libvlc)
include(00-Common)
include(LLCommon)
include(LLImage)
-include(LLPlugin)
-include(LLMath)
-include(LLRender)
include(LLWindow)
include(Linking)
include(PluginAPI)
-include(MediaPluginBase)
-include(OpenGL)
include(LibVLCPlugin)
-include_directories(
- ${LLPLUGIN_INCLUDE_DIRS}
- ${MEDIA_PLUGIN_BASE_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${VLC_INCLUDE_DIR}
-)
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
-
-
### media_plugin_libvlc
if(NOT ADDRESS_SIZE EQUAL 32)
@@ -51,27 +31,8 @@ add_library(media_plugin_libvlc
)
target_link_libraries(media_plugin_libvlc
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${VLC_PLUGIN_LIBRARIES}
- ${PLUGIN_API_WINDOWS_LIBRARIES}
-)
-
-add_dependencies(media_plugin_libvlc
- ${LLPLUGIN_LIBRARIES}
- ${MEDIA_PLUGIN_BASE_LIBRARIES}
-##${LLCOMMON_LIBRARIES}
- # Just say 'llcommon' here. LLCOMMON_LIBRARIES is specified for use in
- # target_link_libraries: it includes several Boost libraries, which are
- # absolutely NOT dependencies in the sense intended here. Those Boost
- # library macros, in turn, specify 'debug' and 'optimized' and a different
- # library name for each, producing several wordy errors:
- # Policy CMP0046 is not set: Error on non-existent dependency in
- # add_dependencies.
- # Really, the only dependency we should mention from LLCOMMON_LIBRARIES is
- # llcommon itself.
- llcommon
+ media_plugin_base
+ libvlc::libvlc
)
if (WINDOWS)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 85e39bbb2d..9168941014 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -24,24 +24,13 @@ include(JsonCpp)
include(LLAppearance)
include(LLAudio)
include(LLCA)
-include(LLCharacter)
include(LLCommon)
include(LLCoreHttp)
include(LLImage)
-include(LLImageJ2COJ)
-include(LLInventory)
include(LLKDU)
-include(LLLogin)
-include(LLMath)
-include(LLMessage)
include(LLPhysicsExtensions)
-include(LLPlugin)
include(LLPrimitive)
-include(LLRender)
-include(LLUI)
-include(LLFileSystem)
include(LLWindow)
-include(LLXML)
include(NDOF)
include(NVAPI)
include(OPENAL)
@@ -57,57 +46,17 @@ include(ViewerManager)
include(VisualLeakDetector)
include(ZLIBNG)
include(URIPARSER)
+include(LLPrimitive)
+
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
if (NOT HAVOK_TPV)
# When using HAVOK_TPV, the library is precompiled, so no need for this
add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
+ cmake_policy( SET CMP0079 NEW)
+ target_link_libraries(llphysicsextensionsstub llcommon llmath)
endif (NOT HAVOK_TPV)
-if(FMODSTUDIO)
- include_directories(${FMODSTUDIO_INCLUDE_DIR})
-endif(FMODSTUDIO)
-
-include_directories(
- ${DBUSGLIB_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIR}
- ${GLOD_INCLUDE_DIR}
- ${LLAUDIO_INCLUDE_DIRS}
- ${LLCHARACTER_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- ${LLPHYSICS_INCLUDE_DIRS}
- ${LLIMAGE_INCLUDE_DIRS}
- ${LLKDU_INCLUDE_DIRS}
- ${LLINVENTORY_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLPLUGIN_INCLUDE_DIRS}
- ${LLPRIMITIVE_INCLUDE_DIRS}
- ${LLRENDER_INCLUDE_DIRS}
- ${LLUI_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLWINDOW_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LLLOGIN_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include/collada
- ${LIBS_PREBUILD_DIR}/include/hunspell
- ${OPENAL_LIB_INCLUDE_DIRS}
- ${LIBS_PREBUILT_DIR}/include/collada/1.4
- ${LLAPPEARANCE_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}
- )
-
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
- )
-
-if (USE_BUGSPLAT)
- include_directories(AFTER
- ${BUGSPLAT_INCLUDE_DIR}
- )
-endif (USE_BUGSPLAT)
set(viewer_SOURCE_FILES
groupchatlistener.cpp
@@ -1428,7 +1377,7 @@ if (DARWIN)
if (USE_BUGSPLAT)
list(APPEND viewer_LIBRARIES
- ${BUGSPLAT_LIBRARIES}
+ bugsplat::bugsplat
)
endif (USE_BUGSPLAT)
@@ -2023,54 +1972,41 @@ endif (WINDOWS)
# modern version.
target_link_libraries(${VIEWER_BINARY_NAME}
- ${LEGACY_STDIO_LIBS}
- ${PNG_PRELOAD_ARCHIVES}
- ${ZLIBNG_PRELOAD_ARCHIVES}
- ${URIPARSER_PRELOAD_ARCHIVES}
- ${GOOGLE_PERFTOOLS_LIBRARIES}
- ${LLAUDIO_LIBRARIES}
- ${LLCHARACTER_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLPLUGIN_LIBRARIES}
- ${LLPRIMITIVE_LIBRARIES}
- ${LLRENDER_LIBRARIES}
- ${FREETYPE_LIBRARIES}
- ${LLUI_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLWINDOW_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${NDOF_LIBRARY}
- ${NVAPI_LIBRARY}
- ${HUNSPELL_LIBRARY}
- ${viewer_LIBRARIES}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${DBUSGLIB_LIBRARIES}
- ${OPENGL_LIBRARIES}
- ${FMODWRAPPER_LIBRARY} # must come after LLAudio
- ${GLOD_LIBRARIES}
- ${OPENGL_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${SDL_LIBRARY}
- ${SMARTHEAP_LIBRARY}
- ${UI_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${XMLRPCEPI_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${LLLOGIN_LIBRARIES}
- ${LLPHYSICS_LIBRARIES}
- ${LLPHYSICSEXTENSIONS_LIBRARIES}
- ${LLAPPEARANCE_LIBRARIES}
- )
+ ${LEGACY_STDIO_LIBS}
+ llaudio
+ llcharacter
+ llimage
+ llinventory
+ llmessage
+ llplugin
+ llprimitive
+ llrender
+ llui
+ llfilesystem
+ llwindow
+ llxml
+ llmath
+ llcorehttp
+ llcommon
+ ${viewer_LIBRARIES}
+ ${FMODWRAPPER_LIBRARY} # must come after LLAudio
+ glod::glod
+ ndof::ndof
+ ${SDL_LIBRARY}
+ ${SMARTHEAP_LIBRARY}
+ ${UI_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ lllogin
+ llprimitive
+ llappearance
+ ${LLPHYSICS_LIBRARIES}
+ ${LLPHYSICSEXTENSIONS_LIBRARIES}
+ )
+
+if( TARGET nvapi::nvapi )
+ target_link_libraries(${VIEWER_BINARY_NAME} nvapi::nvapi )
+endif()
+
if (USE_BUGSPLAT)
target_link_libraries(${VIEWER_BINARY_NAME}
@@ -2386,10 +2322,15 @@ if (LL_TESTS)
)
set(test_libs
- ${LLCOMMON_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${CURL_LIBRARIES}
- ${NGHTTP2_LIBRARIES}
+ llcommon
+ llfilesystem
+ llxml
+ llmessage
+ llcharacter
+ llui
+ lllogin
+ llplugin
+ llappearance
)
set_source_files_properties(
@@ -2398,17 +2339,6 @@ if (LL_TESTS)
LL_TEST_ADDITIONAL_LIBRARIES "${test_libs}"
)
- set_source_files_properties(
- llviewerhelputil.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
- )
-
- set_source_files_properties(
- llremoteparcelrequest.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
- )
set_source_files_properties(
llworldmap.cpp
@@ -2416,27 +2346,23 @@ if (LL_TESTS)
PROPERTIES
LL_TEST_ADDITIONAL_SOURCE_FILES
tests/llviewertexture_stub.cpp
- #llviewertexturelist.cpp
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
)
set_source_files_properties(
llmediadataclient.cpp
PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${LLPRIMITIVE_LIBRARIES}"
- )
-
- set_source_files_properties(
- llagentaccess.cpp
- PROPERTIES
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
+ LL_TEST_ADDITIONAL_LIBRARIES llprimitive
)
set_source_files_properties(
lllogininstance.cpp
PROPERTIES
LL_TEST_ADDITIONAL_SOURCE_FILES llversioninfo.cpp
- LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_SYSTEM_LIBRARY}"
+ )
+ set_property( SOURCE
+ ${viewer_TEST_SOURCE_FILES}
+ PROPERTY
+ LL_TEST_ADDITIONAL_LIBRARIES ${test_libs}
)
##################################################
@@ -2458,41 +2384,29 @@ if (LL_TESTS)
# if(USE_PRECOMPILED_HEADERS)
# set(test_sources "${test_sources}" llviewerprecompiledheaders.cpp)
# endif(USE_PRECOMPILED_HEADERS)
- set(test_libs
- ${LLMESSAGE_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- )
- if (LINUX)
- # llcommon uses `clock_gettime' which is provided by librt on linux.
- set(LIBRT_LIBRARY
- rt
- )
- endif (LINUX)
set(test_libs
- ${WINDOWS_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${CRYPTO_LIBRARIES}
- ${LIBRT_LIBRARY}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- )
+ ${WINDOWS_LIBRARIES}
+ llfilesystem
+ llmath
+ llcommon
+ llmessage
+ llcorehttp
+ llxml
+ llui
+ llplugin
+ llappearance
+ lllogin
+ llprimitive
+ lllogin
+ )
LL_ADD_INTEGRATION_TEST(cppfeatures
""
"${test_libs}"
)
+
LL_ADD_INTEGRATION_TEST(llsechandler_basic
llsechandler_basic.cpp
"${test_libs}"
@@ -2508,7 +2422,6 @@ if (LL_TESTS)
llviewernetwork.cpp
)
-
LL_ADD_INTEGRATION_TEST(llslurl
"${llslurl_test_sources}"
"${test_libs}"
@@ -2531,15 +2444,6 @@ if (LL_TESTS)
#ADD_VIEWER_BUILD_TEST(lltextureinfo viewer)
#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer)
-include(LLAddBuildTest)
-SET(viewer_TEST_SOURCE_FILES
- llagentaccess.cpp
- )
-set_source_files_properties(
- ${viewer_TEST_SOURCE_FILES}
- PROPERTIES
- LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp
- )
endif (LL_TESTS)
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 084aa8d9f7..1e9fdfa003 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -5,11 +5,6 @@ project (lltest)
include(00-Common)
include(LLCommon)
include(LLCoreHttp)
-include(LLInventory)
-include(LLMath)
-include(LLMessage)
-include(LLFileSystem)
-include(LLXML)
include(Linking)
include(Tut)
include(LLAddBuildTest)
@@ -88,27 +83,18 @@ if (USE_BUGSPLAT)
endif (USE_BUGSPLAT)
target_link_libraries(lltest
- ${LEGACY_STDIO_LIBS}
- ${LLDATABASE_LIBRARIES}
- ${LLINVENTORY_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LSCRIPT_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- ${DL_LIBRARY}
- )
+ ${LEGACY_STDIO_LIBS}
+ ${LLDATABASE_LIBRARIES}
+ llinventory
+ llmessage
+ llmath
+ llfilesystem
+ llxml
+ llcommon
+ llcorehttp
+ ${WINDOWS_LIBRARIES}
+ ${DL_LIBRARY}
+ )
if (WINDOWS)
set_target_properties(lltest
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}")