summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/CMakeLists.txt4
-rw-r--r--indra/cmake/00-Common.cmake169
-rw-r--r--indra/cmake/APR.cmake85
-rw-r--r--indra/cmake/Atmosphere.cmake5
-rw-r--r--indra/cmake/Audio.cmake47
-rw-r--r--indra/cmake/Boost.cmake131
-rw-r--r--indra/cmake/BuildPackagesInfo.cmake2
-rw-r--r--indra/cmake/BuildVersion.cmake44
-rw-r--r--indra/cmake/CEFPlugin.cmake18
-rw-r--r--indra/cmake/CMakeLists.txt31
-rw-r--r--indra/cmake/CURL.cmake24
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake10
-rw-r--r--indra/cmake/DBusGlib.cmake29
-rw-r--r--indra/cmake/DragDrop.cmake16
-rw-r--r--indra/cmake/EXPAT.cmake34
-rw-r--r--indra/cmake/ExamplePlugin.cmake7
-rw-r--r--indra/cmake/FMODSTUDIO.cmake24
-rw-r--r--indra/cmake/FindAPR.cmake94
-rw-r--r--indra/cmake/FindGLH.cmake30
-rw-r--r--indra/cmake/FindGooglePerfTools.cmake66
-rw-r--r--indra/cmake/FindHUNSPELL.cmake38
-rw-r--r--indra/cmake/FindJsonCpp.cmake60
-rw-r--r--indra/cmake/FindNDOF.cmake39
-rw-r--r--indra/cmake/FindOpenJPEG.cmake50
-rw-r--r--indra/cmake/FindURIPARSER.cmake46
-rw-r--r--indra/cmake/FindXmlRpcEpi.cmake48
-rw-r--r--indra/cmake/FindZLIBNG.cmake46
-rw-r--r--indra/cmake/FreeType.cmake14
-rw-r--r--indra/cmake/GLEXT.cmake12
-rw-r--r--indra/cmake/GLH.cmake6
-rw-r--r--indra/cmake/GLOD.cmake11
-rw-r--r--indra/cmake/GStreamer010Plugin.cmake10
-rw-r--r--indra/cmake/GoogleMock.cmake27
-rw-r--r--indra/cmake/Havok.cmake4
-rw-r--r--indra/cmake/Hunspell.cmake30
-rw-r--r--indra/cmake/JPEG.cmake27
-rw-r--r--indra/cmake/JsonCpp.cmake29
-rw-r--r--indra/cmake/LLAddBuildTest.cmake61
-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.cmake15
-rw-r--r--indra/cmake/LLLogin.cmake7
-rw-r--r--indra/cmake/LLMessage.cmake13
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake14
-rw-r--r--indra/cmake/LLPlugin.cmake14
-rw-r--r--indra/cmake/LLPrimitive.cmake64
-rw-r--r--indra/cmake/LLRender.cmake20
-rw-r--r--indra/cmake/LLUI.cmake7
-rw-r--r--indra/cmake/LLWindow.cmake41
-rw-r--r--indra/cmake/LLXML.cmake14
-rw-r--r--indra/cmake/LibVLCPlugin.cmake28
-rw-r--r--indra/cmake/Linking.cmake18
-rw-r--r--indra/cmake/MediaPluginBase.cmake8
-rw-r--r--indra/cmake/NDOF.cmake41
-rw-r--r--indra/cmake/NGHTTP2.cmake28
-rw-r--r--indra/cmake/NVAPI.cmake7
-rw-r--r--indra/cmake/OPENAL.cmake34
-rw-r--r--indra/cmake/OpenJPEG.cmake24
-rw-r--r--indra/cmake/OpenSSL.cmake29
-rw-r--r--indra/cmake/PNG.cmake39
-rw-r--r--indra/cmake/Prebuilt.cmake15
-rw-r--r--indra/cmake/PulseAudio.cmake27
-rw-r--r--indra/cmake/Tut.cmake4
-rw-r--r--indra/cmake/UI.cmake87
-rw-r--r--indra/cmake/URIPARSER.cmake41
-rw-r--r--indra/cmake/Variables.cmake6
-rw-r--r--indra/cmake/ViewerMiscLibs.cmake14
-rw-r--r--indra/cmake/XmlRpcEpi.cmake21
-rw-r--r--indra/cmake/ZLIBNG.cmake41
-rw-r--r--indra/cmake/bugsplat.cmake34
-rw-r--r--indra/integration_tests/llimage_libtest/CMakeLists.txt19
-rw-r--r--indra/integration_tests/llui_libtest/CMakeLists.txt39
-rw-r--r--indra/linux_crash_logger/CMakeLists.txt19
-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.txt47
-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.txt29
-rw-r--r--indra/llimagej2coj/CMakeLists.txt13
-rw-r--r--indra/llinventory/CMakeLists.txt16
-rw-r--r--indra/llkdu/CMakeLists.txt31
-rw-r--r--indra/llmath/CMakeLists.txt18
-rw-r--r--indra/llmessage/CMakeLists.txt88
-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.txt63
-rw-r--r--indra/llui/CMakeLists.txt59
-rw-r--r--indra/llwindow/CMakeLists.txt44
-rw-r--r--indra/llxml/CMakeLists.txt32
-rw-r--r--indra/media_plugins/base/CMakeLists.txt20
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt31
-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.txt321
-rwxr-xr-xindra/newview/viewer_manifest.py4
-rw-r--r--indra/test/CMakeLists.txt57
-rw-r--r--indra/viewer_components/login/CMakeLists.txt31
-rwxr-xr-xscripts/packages-formatter.py5
112 files changed, 963 insertions, 2733 deletions
diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 1ab5888914..d06ea58549 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -4,7 +4,9 @@
# other commands to guarantee full compatibility
# with the version specified
## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support
-cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
+# 3.13/12 is needed for add_link_options/add_compile_definitions
+# 3.16 is needed for target_precompile_headers
+cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
"The root project/makefile/solution name. Defaults to SecondLife.")
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0ab7fa2456..ec0e195b56 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -12,9 +12,7 @@
# Also realize that CMAKE_CXX_FLAGS may already be partially populated on
# entry to this file.
#*****************************************************************************
-
-if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
-set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
+include_guard()
include(Variables)
@@ -27,25 +25,22 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
# as well?
# Portable compilation flags.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}")
+add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE})
# Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds")
set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
if(RELEASE_CRASH_REPORTING)
- set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DLL_SEND_CRASH_REPORTS=1")
+ add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
endif()
if(NON_RELEASE_CRASH_REPORTING)
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1")
- set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1")
-endif()
-
-# Don't bother with a MinSizeRel build.
-set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
- "Supported build types." FORCE)
+ add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
+endif()
+# Don't bother with a MinSizeRel or Debug build.
+set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE)
# Platform-specific compilation flags.
@@ -66,93 +61,86 @@ if (WINDOWS)
# CP changed to only append the flag for 32bit builds - on 64bit builds,
# locally at least, the build output is spammed with 1000s of 'D9002'
# warnings about this switch being ignored.
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
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")
-
- set(CMAKE_CXX_STANDARD_LIBRARIES "")
- set(CMAKE_C_STANDARD_LIBRARIES "")
+ add_link_options(/LARGEADDRESSAWARE
+ /SAFESEH:NO
+ /NODEFAULTLIB:LIBCMT
+ /IGNORE:4099)
add_definitions(
- /DNOMINMAX
+ -DNOMINMAX
# /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
+ /MP
)
# Nicky: x64 implies SSE2
if( ADDRESS_SIZE EQUAL 32 )
- add_definitions( /arch:SSE2 )
+ add_compile_options( /arch:SSE2 )
endif()
# Are we using the crummy Visual Studio KDU build workaround?
if (NOT VS_DISABLE_FATAL_WARNINGS)
- add_definitions(/WX)
+ add_compile_options(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS)
+
+ #ND: When using something like buildcache (https://github.com/mbitsnbites/buildcache)
+ # to make those wrappers work /Zi must be changed to /Z7, as /Zi due to it's nature is not compatible with caching
+ if( ${CMAKE_CXX_COMPILER_LAUNCHER} MATCHES ".*cache.*")
+ add_compile_options( /Z7 )
+ string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+ string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+ string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+ endif()
endif (WINDOWS)
if (LINUX)
set(CMAKE_SKIP_RPATH TRUE)
- add_definitions(-D_FORTIFY_SOURCE=2)
-
- set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
-
- # gcc 4.3 and above don't like the LL boost and also
- # cause warnings due to our use of deprecated headers
- add_definitions(-Wno-parentheses)
-
- add_definitions(
- -D_REENTRANT
- )
+ add_compile_definitions(
+ -D_REENTRANT
+ -D_FORTIFY_SOURCE=2
+ -DEXTERNAL_TOS
+ -DAPPID=secondlife
+ -DLL_IGNORE_SIGCHLD
+ )
add_compile_options(
- -fexceptions
- -fno-math-errno
- -fno-strict-aliasing
- -fsigned-char
- -msse2
- -mfpmath=sse
- -pthread
- )
-
- # force this platform to accept TOS via external browser
- add_definitions(-DEXTERNAL_TOS)
+ -fexceptions
+ -fno-math-errno
+ -fno-strict-aliasing
+ -fsigned-char
+ -msse2
+ -mfpmath=sse
+ -pthread
+ -Wno-parentheses
+ -Wno-deprecated
+ -fvisibility=hidden
+ )
- add_definitions(-DAPPID=secondlife)
- add_compile_options(-fvisibility=hidden)
- # don't catch SIGCHLD in our base application class for the viewer - some of
- # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
- # viewer doesn't need to catch SIGCHLD anyway.
- add_definitions(-DLL_IGNORE_SIGCHLD)
if (ADDRESS_SIZE EQUAL 32)
add_compile_options(-march=pentium4)
endif (ADDRESS_SIZE EQUAL 32)
- #add_compile_options(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2
- if (NOT USESYSTEMLIBS)
- # this stops us requiring a really recent glibc at runtime
- add_compile_options(-fno-stack-protector)
- # linking can be very memory-hungry, especially the final viewer link
- set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
- endif (NOT USESYSTEMLIBS)
+
+ # this stops us requiring a really recent glibc at runtime
+ add_compile_options(-fno-stack-protector)
+ # linking can be very memory-hungry, especially the final viewer link
+ set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
endif (LINUX)
@@ -189,41 +177,24 @@ if (LINUX OR DARWIN)
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif (CMAKE_CXX_COMPILER MATCHES ".*clang")
- if (CMAKE_COMPILER_IS_GNUCXX)
- set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
- elseif (CMAKE_COMPILER_IS_CLANGXX)
- set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
- endif()
+ set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
if (NOT GCC_DISABLE_FATAL_WARNINGS)
- set(GCC_WARNINGS "${GCC_WARNINGS} -Werror")
+ list(APPEND GCC_WARNINGS -Werror)
endif (NOT GCC_DISABLE_FATAL_WARNINGS)
- set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor")
+ list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-but-set-variable -Wno-unused-variable )
- set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}")
- set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}")
-
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}")
+ add_compile_options(${GCC_WARNINGS})
+ add_compile_options(-m${ADDRESS_SIZE})
endif (LINUX OR DARWIN)
-if (USESYSTEMLIBS)
- add_definitions(-DLL_USESYSTEMLIBS=1)
-
- if (LINUX AND ADDRESS_SIZE EQUAL 32)
- add_definitions(-march=pentiumpro)
- endif (LINUX AND ADDRESS_SIZE EQUAL 32)
-
-else (USESYSTEMLIBS)
- set(${ARCH}_linux_INCLUDES
- atk-1.0
- glib-2.0
- gstreamer-0.10
- gtk-2.0
- pango-1.0
- )
-endif (USESYSTEMLIBS)
+set(${ARCH}_linux_INCLUDES
+ atk-1.0
+ glib-2.0
+ gstreamer-0.10
+ gtk-2.0
+ pango-1.0
+ )
-endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 9b64bc6160..269b0f3000 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -1,54 +1,43 @@
include(Linking)
include(Prebuilt)
-set(APR_FIND_QUIETLY ON)
-set(APR_FIND_REQUIRED ON)
+include_guard()
-set(APRUTIL_FIND_QUIETLY ON)
-set(APRUTIL_FIND_REQUIRED ON)
+create_target( ll::apr)
-if (USESYSTEMLIBS)
- include(FindAPR)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(apr_suite)
- if (WINDOWS)
- if (LLCOMMON_LINK_SHARED)
- set(APR_selector "lib")
- 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}
- )
- elseif (DARWIN)
- if (LLCOMMON_LINK_SHARED)
- set(APR_selector "0.dylib")
- set(APRUTIL_selector "0.dylib")
- else (LLCOMMON_LINK_SHARED)
- 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)
- else (WINDOWS)
- set(APR_LIBRARIES apr-1)
- set(APRUTIL_LIBRARIES aprutil-1)
- set(APRICONV_LIBRARIES iconv)
- endif (WINDOWS)
- set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
+use_prebuilt_binary(apr_suite)
+if (WINDOWS)
+ if (LLCOMMON_LINK_SHARED)
+ set(APR_selector "lib")
+ else (LLCOMMON_LINK_SHARED)
+ set(APR_selector "")
+ endif (LLCOMMON_LINK_SHARED)
+ set_target_libraries( ll::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")
+ set(APRUTIL_selector "0.dylib")
+ else (LLCOMMON_LINK_SHARED)
+ set(APR_selector "a")
+ set(APRUTIL_selector "a")
+ endif (LLCOMMON_LINK_SHARED)
- if (LINUX)
- list(APPEND APRUTIL_LIBRARIES uuid)
- list(APPEND APRUTIL_LIBRARIES rt)
- endif (LINUX)
-endif (USESYSTEMLIBS)
+ set_target_libraries( ll::apr
+ libapr-1.${APR_selector}
+ libaprutil-1.${APRUTIL_selector}
+ iconv
+ )
+else (WINDOWS)
+ set_target_libraries( ll::apr
+ apr-1
+ aprutil-1
+ iconv
+ uuid
+ rt
+ )
+endif (WINDOWS)
+set_target_include_dirs( ll::apr ${LIBS_PREBUILT_DIR}/include/apr-1 )
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..e533d1ac00 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,42 +1,15 @@
# -*- cmake -*-
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
- pkg_check_modules(OGG REQUIRED ogg)
- pkg_check_modules(VORBIS REQUIRED vorbis)
- pkg_check_modules(VORBISENC REQUIRED vorbisenc)
- 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})
+include_guard()
+create_target(ll::vorbis)
- 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)
- else (WINDOWS)
- set(OGG_LIBRARIES ogg)
- set(VORBIS_LIBRARIES vorbis)
- set(VORBISENC_LIBRARIES vorbisenc)
- set(VORBISFILE_LIBRARIES vorbisfile)
- endif (WINDOWS)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(ogg_vorbis)
+set_target_include_dirs( ll::vorbis ${LIBS_PREBUILT_DIR}/include )
+
+if (WINDOWS)
+ set_target_libraries(ll::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static )
+else (WINDOWS)
+ set_target_libraries(ll::vorbis ogg vorbis vorbisenc vorbisfile )
+endif (WINDOWS)
-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..ac6151ffe3 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -1,105 +1,44 @@
# -*- cmake -*-
include(Prebuilt)
-set(Boost_FIND_QUIETLY ON)
-set(Boost_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::boost )
-if (USESYSTEMLIBS)
- include(FindBoost)
+use_prebuilt_binary(boost)
- set(BOOST_CONTEXT_LIBRARY boost_context-mt)
- set(BOOST_FIBER_LIBRARY boost_fiber-mt)
- set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
- set(BOOST_REGEX_LIBRARY boost_regex-mt)
- set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
- set(BOOST_SYSTEM_LIBRARY boost_system-mt)
- set(BOOST_THREAD_LIBRARY boost_thread-mt)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(boost)
- set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
+# with the address size.
+set(addrsfx "-x${ADDRESS_SIZE}")
- # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
- # with the address size.
- 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)
- 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)
- 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)
- endif (WINDOWS)
-endif (USESYSTEMLIBS)
+if (WINDOWS)
+ set_target_libraries( ll::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_target_libraries( ll::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_target_libraries( ll::boost
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
+endif (WINDOWS)
if (LINUX)
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)
diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake
index 8f8b6b2330..659ba9d579 100644
--- a/indra/cmake/BuildPackagesInfo.cmake
+++ b/indra/cmake/BuildPackagesInfo.cmake
@@ -16,5 +16,5 @@ add_custom_command(OUTPUT packages-info.txt
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE}
${PYTHON_EXECUTABLE}
- ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt
+ ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" "${AUTOBUILD_INSTALL_DIR}" > packages-info.txt
)
diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake
index 157fdd07e4..b531f29ee2 100644
--- a/indra/cmake/BuildVersion.cmake
+++ b/indra/cmake/BuildVersion.cmake
@@ -19,33 +19,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}")
else (DEFINED ENV{revision})
- find_program(MERCURIAL
- NAMES hg
- PATHS [HKEY_LOCAL_MACHINE\\Software\\TortoiseHG]
- PATH_SUFFIXES Mercurial)
- mark_as_advanced(MERCURIAL)
- if (MERCURIAL)
- execute_process(COMMAND ${MERCURIAL} identify --num --rev tip
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
- RESULT_VARIABLE hg_id_result
- ERROR_VARIABLE hg_id_error
- OUTPUT_VARIABLE VIEWER_VERSION_REVISION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT ${hg_id_result} EQUAL 0)
- message(SEND_ERROR "Revision number generation failed with output:\n${hg_id_error}")
- else (NOT ${hg_id_result} EQUAL 0)
- string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION})
- endif (NOT ${hg_id_result} EQUAL 0)
- if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
- message(STATUS "Revision (from hg) ${VIEWER_VERSION_REVISION}")
- else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
- message(STATUS "Revision not set (repository not found?); using 0")
- set(VIEWER_VERSION_REVISION 0 )
- endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
- else (MERCURIAL)
- message(STATUS "Revision not set: mercurial not found; using 0")
- set(VIEWER_VERSION_REVISION 0)
- endif (MERCURIAL)
+ find_program(GIT git)
+ if (DEFINED GIT )
+ execute_process(
+ COMMAND ${GIT} rev-list --count HEAD
+ OUTPUT_VARIABLE VIEWER_VERSION_REVISION
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
+ message(STATUS "Revision (from git) ${VIEWER_VERSION_REVISION}")
+ else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
+ message(STATUS "Revision not set (repository not found?); using 0")
+ set(VIEWER_VERSION_REVISION 0 )
+ endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
+ else (DEFINED GIT )
+ message(STATUS "Revision not set: 'git' found; using 0")
+ set(VIEWER_VERSION_REVISION 0)
+ endif (DEFINED GIT)
endif (DEFINED ENV{revision})
message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 7d8bfb1b0f..6dba5e26ac 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -2,18 +2,14 @@
include(Linking)
include(Prebuilt)
-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)
-endif (USESYSTEMLIBS)
+include_guard()
+create_target( cef::cef )
+
+use_prebuilt_binary(dullahan)
+set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef)
if (WINDOWS)
- set(CEF_PLUGIN_LIBRARIES
+ set_target_libraries( cef::cef
libcef.lib
libcef_dll_wrapper.lib
dullahan.lib
@@ -29,7 +25,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..48b08b31d6 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -23,53 +23,28 @@ set(cmake_SOURCE_FILES
DeploySharedLibs.cmake
DragDrop.cmake
EXPAT.cmake
- FindAPR.cmake
- FindAutobuild.cmake
- FindGLH.cmake
- FindHUNSPELL.cmake
- FindJsonCpp.cmake
- FindNDOF.cmake
- FindOpenJPEG.cmake
- FindSCP.cmake
- FindURIPARSER.cmake
- FindXmlRpcEpi.cmake
- FindZLIBNG.cmake
- FMODSTUDIO.cmake
+ FindAutobuild.cmake
+ FMODSTUDIO.cmake
FreeType.cmake
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..2a5ea67ff3 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,19 +1,13 @@
# -*- cmake -*-
include(Prebuilt)
-set(CURL_FIND_QUIETLY ON)
-set(CURL_FIND_REQUIRED ON)
+include_guard()
+create_target(ll::libcurl)
-if (USESYSTEMLIBS)
- include(FindCURL)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(curl)
- if (WINDOWS)
- set(CURL_LIBRARIES
- debug libcurld.lib
- optimized libcurl.lib)
- else (WINDOWS)
- set(CURL_LIBRARIES libcurl.a)
- endif (WINDOWS)
- set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(curl)
+if (WINDOWS)
+ set_target_libraries(ll::libcurl libcurl.lib)
+else (WINDOWS)
+ set_target_libraries(ll::libcurl libcurl.a)
+endif (WINDOWS)
+set_target_include_dirs( ll::libcurl ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index b20d23cead..d5b8e6c712 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -280,9 +280,7 @@ to_staging_dirs(
${release_files}
)
-if(NOT USESYSTEMLIBS)
- add_custom_target(
- stage_third_party_libs ALL
- DEPENDS ${third_party_targets}
- )
-endif(NOT USESYSTEMLIBS)
+add_custom_target(
+ stage_third_party_libs ALL
+ DEPENDS ${third_party_targets}
+)
diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake
index 5e46b6711a..7c95bf8c20 100644
--- a/indra/cmake/DBusGlib.cmake
+++ b/indra/cmake/DBusGlib.cmake
@@ -1,24 +1,17 @@
# -*- cmake -*-
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
-
- pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
-
-elseif (LINUX)
- use_prebuilt_binary(dbus_glib)
- set(DBUSGLIB_FOUND ON FORCE BOOL)
- set(DBUSGLIB_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include/dbus
- )
- # We don't need to explicitly link against dbus-glib itself, because
- # the viewer probes for the system's copy at runtime.
- set(DBUSGLIB_LIBRARIES
- gobject-2.0
- glib-2.0
- )
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(dbus_glib)
+set(DBUSGLIB_FOUND ON FORCE BOOL)
+set(DBUSGLIB_INCLUDE_DIRS
+ ${LIBS_PREBUILT_DIR}/include/dbus
+ )
+# We don't need to explicitly link against dbus-glib itself, because
+# the viewer probes for the system's copy at runtime.
+set(DBUSGLIB_LIBRARIES
+ gobject-2.0
+ glib-2.0
+ )
if (DBUSGLIB_FOUND)
set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.")
diff --git a/indra/cmake/DragDrop.cmake b/indra/cmake/DragDrop.cmake
index 73ef59b18f..cbbf5747a7 100644
--- a/indra/cmake/DragDrop.cmake
+++ b/indra/cmake/DragDrop.cmake
@@ -1,20 +1,16 @@
# -*- cmake -*-
- set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
-
- if (OS_DRAG_DROP)
+set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
+if (OS_DRAG_DROP)
if (WINDOWS)
- add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
+ add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (WINDOWS)
-
if (DARWIN)
- add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
+ add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (DARWIN)
-
if (LINUX)
- add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
+ add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
endif (LINUX)
-
- endif (OS_DRAG_DROP)
+endif (OS_DRAG_DROP)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index cddc71b227..85bb146a4a 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -1,23 +1,19 @@
# -*- cmake -*-
include(Prebuilt)
-set(EXPAT_FIND_QUIETLY ON)
-set(EXPAT_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::expat INTERFACE IMPORTED )
-if (USESYSTEMLIBS)
- include(FindEXPAT)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(expat)
- if (WINDOWS)
- set(EXPAT_LIBRARIES libexpatMT)
- set(EXPAT_COPY libexpatMT.dll)
- else (WINDOWS)
- set(EXPAT_LIBRARIES 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)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(expat)
+if (WINDOWS)
+ set_target_libraries( ll::expat libexpatMT )
+ set(EXPAT_COPY libexpatMT.dll)
+else (WINDOWS)
+ set_target_libraries( ll::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_target_include_dirs( ll::expat ${LIBS_PREBUILT_DIR}/include )
diff --git a/indra/cmake/ExamplePlugin.cmake b/indra/cmake/ExamplePlugin.cmake
index 5d826c1f66..c7ffaf024e 100644
--- a/indra/cmake/ExamplePlugin.cmake
+++ b/indra/cmake/ExamplePlugin.cmake
@@ -2,13 +2,8 @@
include(Linking)
include(Prebuilt)
-if (USESYSTEMLIBS)
- set(EXAMPLEPLUGIN OFF CACHE BOOL
+set(EXAMPLEPLUGIN ON CACHE BOOL
"EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
-else (USESYSTEMLIBS)
- set(EXAMPLEPLUGIN ON CACHE BOOL
- "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
-endif (USESYSTEMLIBS)
if (WINDOWS)
elseif (DARWIN)
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
index 8840354ac6..653d96f86a 100644
--- a/indra/cmake/FMODSTUDIO.cmake
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -1,5 +1,7 @@
# -*- cmake -*-
+include_guard()
+
# FMODSTUDIO can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON
# When building using proprietary binaries though (i.e. having access to LL private servers),
# we always build with FMODSTUDIO.
@@ -8,9 +10,13 @@ if (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (FMODSTUDIO)
+ create_target( ll::fmodstudio )
+
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 +24,15 @@ if (FMODSTUDIO)
include(Prebuilt)
use_prebuilt_binary(fmodstudio)
if (WINDOWS)
- set(FMODSTUDIO_LIBRARY
- debug fmodL_vc
- optimized fmod_vc)
+ set_target_libraries( ll::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( ll::fmodstudio fmod)
elseif (LINUX)
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( ll::fmodstudio fmod)
endif (WINDOWS)
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
- set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
+
+ set_target_include_dirs(ll::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
endif (FMODSTUDIO)
diff --git a/indra/cmake/FindAPR.cmake b/indra/cmake/FindAPR.cmake
deleted file mode 100644
index 906b6c9452..0000000000
--- a/indra/cmake/FindAPR.cmake
+++ /dev/null
@@ -1,94 +0,0 @@
-# -*- cmake -*-
-
-# - Find Apache Portable Runtime
-# Find the APR includes and libraries
-# This module defines
-# APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
-# APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
-# APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
-# also defined, but not for general use are
-# APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
-
-# APR first.
-
-FIND_PATH(APR_INCLUDE_DIR apr.h
-/usr/local/include/apr-1
-/usr/local/include/apr-1.0
-/usr/include/apr-1
-/usr/include/apr-1.0
-)
-
-SET(APR_NAMES ${APR_NAMES} apr-1)
-FIND_LIBRARY(APR_LIBRARY
- NAMES ${APR_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (APR_LIBRARY AND APR_INCLUDE_DIR)
- SET(APR_LIBRARIES ${APR_LIBRARY})
- SET(APR_FOUND "YES")
-ELSE (APR_LIBRARY AND APR_INCLUDE_DIR)
- SET(APR_FOUND "NO")
-ENDIF (APR_LIBRARY AND APR_INCLUDE_DIR)
-
-
-IF (APR_FOUND)
- IF (NOT APR_FIND_QUIETLY)
- MESSAGE(STATUS "Found APR: ${APR_LIBRARIES}")
- ENDIF (NOT APR_FIND_QUIETLY)
-ELSE (APR_FOUND)
- IF (APR_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find APR library")
- ENDIF (APR_FIND_REQUIRED)
-ENDIF (APR_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- APR_LIBRARY
- APR_INCLUDE_DIR
- )
-
-# Next, APRUTIL.
-
-FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
-/usr/local/include/apr-1
-/usr/local/include/apr-1.0
-/usr/include/apr-1
-/usr/include/apr-1.0
-)
-
-SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1)
-FIND_LIBRARY(APRUTIL_LIBRARY
- NAMES ${APRUTIL_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
- SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})
- SET(APRUTIL_FOUND "YES")
-ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
- SET(APRUTIL_FOUND "NO")
-ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
-
-
-IF (APRUTIL_FOUND)
- IF (NOT APRUTIL_FIND_QUIETLY)
- MESSAGE(STATUS "Found APRUTIL: ${APRUTIL_LIBRARIES}")
- ENDIF (NOT APRUTIL_FIND_QUIETLY)
-ELSE (APRUTIL_FOUND)
- IF (APRUTIL_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find APRUTIL library")
- ENDIF (APRUTIL_FIND_REQUIRED)
-ENDIF (APRUTIL_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- APRUTIL_LIBRARY
- APRUTIL_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindGLH.cmake b/indra/cmake/FindGLH.cmake
deleted file mode 100644
index 3d16adaf03..0000000000
--- a/indra/cmake/FindGLH.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- cmake -*-
-
-# - Find GLH
-# Find the Graphic Library Helper includes.
-# This module defines
-# GLH_INCLUDE_DIR, where to find glh/glh_linear.h.
-# GLH_FOUND, If false, do not try to use GLH.
-
-find_path(GLH_INCLUDE_DIR glh/glh_linear.h
- NO_SYSTEM_ENVIRONMENT_PATH
- )
-
-if (GLH_INCLUDE_DIR)
- set(GLH_FOUND "YES")
-else (GLH_INCLUDE_DIR)
- set(GLH_FOUND "NO")
-endif (GLH_INCLUDE_DIR)
-
-if (GLH_FOUND)
- if (NOT GLH_FIND_QUIETLY)
- message(STATUS "Found GLH: ${GLH_INCLUDE_DIR}")
- set(GLH_FIND_QUIETLY TRUE) # Only alert us the first time
- endif (NOT GLH_FIND_QUIETLY)
-else (GLH_FOUND)
- if (GLH_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find GLH")
- endif (GLH_FIND_REQUIRED)
-endif (GLH_FOUND)
-
-mark_as_advanced(GLH_INCLUDE_DIR)
diff --git a/indra/cmake/FindGooglePerfTools.cmake b/indra/cmake/FindGooglePerfTools.cmake
deleted file mode 100644
index bb125d538e..0000000000
--- a/indra/cmake/FindGooglePerfTools.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-# -*- cmake -*-
-
-# - Find Google perftools
-# Find the Google perftools includes and libraries
-# This module defines
-# GOOGLE_PERFTOOLS_INCLUDE_DIR, where to find heap-profiler.h, etc.
-# GOOGLE_PERFTOOLS_FOUND, If false, do not try to use Google perftools.
-# also defined for general use are
-# TCMALLOC_LIBRARIES, where to find the tcmalloc library.
-# STACKTRACE_LIBRARIES, where to find the stacktrace library.
-# PROFILER_LIBRARIES, where to find the profiler library.
-
-FIND_PATH(GOOGLE_PERFTOOLS_INCLUDE_DIR google/heap-profiler.h
-/usr/local/include
-/usr/include
-)
-
-SET(TCMALLOC_NAMES ${TCMALLOC_NAMES} tcmalloc)
-FIND_LIBRARY(TCMALLOC_LIBRARY
- NAMES ${TCMALLOC_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
- SET(TCMALLOC_LIBRARIES ${TCMALLOC_LIBRARY})
- SET(GOOGLE_PERFTOOLS_FOUND "YES")
-ELSE (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
- SET(GOOGLE_PERFTOOLS_FOUND "NO")
-ENDIF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
-
-SET(STACKTRACE_NAMES ${STACKTRACE_NAMES} stacktrace)
-FIND_LIBRARY(STACKTRACE_LIBRARY
- NAMES ${STACKTRACE_LIBRARY}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
- SET(STACKTRACE_LIBRARIES ${STACKTRACE_LIBRARY})
-ENDIF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
-
-SET(PROFILER_NAMES ${PROFILER_NAMES} profiler)
-FIND_LIBRARY(PROFILER_LIBRARY
- NAMES ${PROFILER_LIBRARY}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
- SET(PROFILER_LIBRARIES ${PROFILER_LIBRARY})
-ENDIF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
-
-IF (GOOGLE_PERFTOOLS_FOUND)
- IF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY)
- MESSAGE(STATUS "Found Google perftools: ${GOOGLE_PERFTOOLS_LIBRARIES}")
- ENDIF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY)
-ELSE (GOOGLE_PERFTOOLS_FOUND)
- IF (GOOGLE_PERFTOOLS_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find Google perftools library")
- ENDIF (GOOGLE_PERFTOOLS_FIND_REQUIRED)
-ENDIF (GOOGLE_PERFTOOLS_FOUND)
-
-MARK_AS_ADVANCED(
- TCMALLOC_LIBRARY
- STACKTRACE_LIBRARY
- PROFILER_LIBRARY
- GOOGLE_PERFTOOLS_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake
deleted file mode 100644
index d411bdb9e5..0000000000
--- a/indra/cmake/FindHUNSPELL.cmake
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- cmake -*-
-
-# - Find HUNSPELL
-# This module defines
-# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc.
-# HUNSPELL_LIBRARY, the library needed to use HUNSPELL.
-# HUNSPELL_FOUND, If false, do not try to use HUNSPELL.
-
-find_path(HUNSPELL_INCLUDE_DIR hunspell.h
- PATH_SUFFIXES hunspell
- )
-
-set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell)
-find_library(HUNSPELL_LIBRARY
- NAMES ${HUNSPELL_NAMES}
- )
-
-if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
- set(HUNSPELL_FOUND "YES")
-else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
- set(HUNSPELL_FOUND "NO")
-endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
-
-
-if (HUNSPELL_FOUND)
- if (NOT HUNSPELL_FIND_QUIETLY)
- message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ")
- endif (NOT HUNSPELL_FIND_QUIETLY)
-else (HUNSPELL_FOUND)
- if (HUNSPELL_FIND_REQUIRED)
- message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *")
- endif (HUNSPELL_FIND_REQUIRED)
-endif (HUNSPELL_FOUND)
-
-mark_as_advanced(
- HUNSPELL_LIBRARY
- HUNSPELL_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake
deleted file mode 100644
index 9398779cff..0000000000
--- a/indra/cmake/FindJsonCpp.cmake
+++ /dev/null
@@ -1,60 +0,0 @@
-# -*- cmake -*-
-
-# - Find JSONCpp
-# Find the JSONCpp includes and library
-# This module defines
-# JSONCPP_INCLUDE_DIR, where to find json.h, etc.
-# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
-# JSONCPP_FOUND, If false, do not try to use jsoncpp.
-# also defined, but not for general use are
-# JSONCPP_LIBRARY, where to find the jsoncpp library.
-
-FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h
-/usr/local/include
-/usr/include
-)
-
-# Get the GCC compiler version
-EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
- OUTPUT_VARIABLE _gcc_COMPILER_VERSION
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
-# Try to find a library that was compiled with the same compiler version as we currently use.
-SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
-IF (USESYSTEMLIBS)
- # On standalone, assume that the system installed library was compiled with the used compiler.
- SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
-ENDIF (USESYSTEMLIBS)
-FIND_LIBRARY(JSONCPP_LIBRARY
- NAMES ${JSONCPP_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
- SET(JSONCPP_FOUND "YES")
-ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
- SET(JSONCPP_FOUND "NO")
-ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
-
-
-IF (JSONCPP_FOUND)
- IF (NOT JSONCPP_FIND_QUIETLY)
- MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}")
- ENDIF (NOT JSONCPP_FIND_QUIETLY)
-ELSE (JSONCPP_FOUND)
- IF (JSONCPP_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
- ENDIF (JSONCPP_FIND_REQUIRED)
-ENDIF (JSONCPP_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- JSONCPP_LIBRARY
- JSONCPP_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindNDOF.cmake b/indra/cmake/FindNDOF.cmake
deleted file mode 100644
index 6dcf590a53..0000000000
--- a/indra/cmake/FindNDOF.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- cmake -*-
-
-# - Find NDOF
-# Find the NDOF includes and library
-# This module defines
-# NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
-# NDOF_LIBRARY, the library needed to use NDOF.
-# NDOF_FOUND, If false, do not try to use NDOF.
-
-find_path(NDOF_INCLUDE_DIR ndofdev_external.h
- PATH_SUFFIXES ndofdev
- )
-
-set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
-find_library(NDOF_LIBRARY
- NAMES ${NDOF_NAMES}
- )
-
-if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
- set(NDOF_FOUND "YES")
-else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
- set(NDOF_FOUND "NO")
-endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
-
-
-if (NDOF_FOUND)
- if (NOT NDOF_FIND_QUIETLY)
- message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
- endif (NOT NDOF_FIND_QUIETLY)
-else (NDOF_FOUND)
- if (NDOF_FIND_REQUIRED)
- message(FATAL_ERROR " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *")
- endif (NDOF_FIND_REQUIRED)
-endif (NDOF_FOUND)
-
-mark_as_advanced(
- NDOF_LIBRARY
- NDOF_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindOpenJPEG.cmake b/indra/cmake/FindOpenJPEG.cmake
deleted file mode 100644
index 949384eec4..0000000000
--- a/indra/cmake/FindOpenJPEG.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- cmake -*-
-
-# - Find OpenJPEG
-# Find the OpenJPEG includes and library
-# This module defines
-# OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc.
-# OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG.
-# OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
-# also defined, but not for general use are
-# OPENJPEG_LIBRARY, where to find the OpenJPEG library.
-
-FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
-/usr/local/include/openjpeg
-/usr/local/include
-/usr/include/openjpeg
-/usr/include
-)
-
-SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
-FIND_LIBRARY(OPENJPEG_LIBRARY
- NAMES ${OPENJPEG_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
- SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
- SET(OPENJPEG_FOUND "YES")
-ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
- SET(OPENJPEG_FOUND "NO")
-ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
-
-
-IF (OPENJPEG_FOUND)
- IF (NOT OPENJPEG_FIND_QUIETLY)
- MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}")
- ENDIF (NOT OPENJPEG_FIND_QUIETLY)
-ELSE (OPENJPEG_FOUND)
- IF (OPENJPEG_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find OpenJPEG library")
- ENDIF (OPENJPEG_FIND_REQUIRED)
-ENDIF (OPENJPEG_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- OPENJPEG_LIBRARY
- OPENJPEG_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindURIPARSER.cmake b/indra/cmake/FindURIPARSER.cmake
deleted file mode 100644
index 8ab9f0f4ed..0000000000
--- a/indra/cmake/FindURIPARSER.cmake
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- cmake -*-
-
-# - Find uriparser
-# Find the URIPARSER includes and library
-# This module defines
-# URIPARSER_INCLUDE_DIRS, where to find uriparser.h, etc.
-# URIPARSER_LIBRARIES, the libraries needed to use uriparser.
-# URIPARSER_FOUND, If false, do not try to use uriparser.
-#
-# This FindURIPARSER is about 43 times as fast the one provided with cmake (2.8.x),
-# because it doesn't look up the version of uriparser, resulting in a dramatic
-# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
-#
-# Note: Since this file is only used for standalone, the windows
-# specific parts were left out.
-
-FIND_PATH(URIPARSER_INCLUDE_DIR uriparser/uri.h
- NO_SYSTEM_ENVIRONMENT_PATH
- )
-
-FIND_LIBRARY(URIPARSER_LIBRARY uriparser)
-
-if (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
- SET(URIPARSER_INCLUDE_DIRS ${URIPARSER_INCLUDE_DIR})
- SET(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY})
- SET(URIPARSER_FOUND "YES")
-else (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
- SET(URIPARSER_FOUND "NO")
-endif (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
-
-if (URIPARSER_FOUND)
- if (NOT URIPARSER_FIND_QUIETLY)
- message(STATUS "Found URIPARSER: ${URIPARSER_LIBRARIES}")
- SET(URIPARSER_FIND_QUIETLY TRUE)
- endif (NOT URIPARSER_FIND_QUIETLY)
-else (URIPARSER_FOUND)
- if (URIPARSER_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find URIPARSER library")
- endif (URIPARSER_FIND_REQUIRED)
-endif (URIPARSER_FOUND)
-
-mark_as_advanced(
- URIPARSER_LIBRARY
- URIPARSER_INCLUDE_DIR
- )
-
diff --git a/indra/cmake/FindXmlRpcEpi.cmake b/indra/cmake/FindXmlRpcEpi.cmake
deleted file mode 100644
index ba217e7467..0000000000
--- a/indra/cmake/FindXmlRpcEpi.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- cmake -*-
-
-# - Find XMLRPC-EPI
-# Find the XMLRPC-EPI includes and library
-# This module defines
-# XMLRPCEPI_INCLUDE_DIR, where to find jpeglib.h, etc.
-# XMLRPCEPI_LIBRARIES, the libraries needed to use XMLRPC-EPI.
-# XMLRPCEPI_FOUND, If false, do not try to use XMLRPC-EPI.
-# also defined, but not for general use are
-# XMLRPCEPI_LIBRARY, where to find the XMLRPC-EPI library.
-
-FIND_PATH(XMLRPCEPI_INCLUDE_DIR xmlrpc-epi/xmlrpc.h
-/usr/local/include
-/usr/include
-)
-
-SET(XMLRPCEPI_NAMES ${XMLRPCEPI_NAMES} xmlrpc-epi)
-FIND_LIBRARY(XMLRPCEPI_LIBRARY
- NAMES ${XMLRPCEPI_NAMES}
- PATHS /usr/lib /usr/local/lib
- )
-
-IF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
- SET(XMLRPCEPI_LIBRARIES ${XMLRPCEPI_LIBRARY})
- SET(XMLRPCEPI_FOUND "YES")
-ELSE (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
- SET(XMLRPCEPI_FOUND "NO")
-ENDIF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
-
-
-IF (XMLRPCEPI_FOUND)
- IF (NOT XMLRPCEPI_FIND_QUIETLY)
- MESSAGE(STATUS "Found XMLRPC-EPI: ${XMLRPCEPI_LIBRARIES}")
- ENDIF (NOT XMLRPCEPI_FIND_QUIETLY)
-ELSE (XMLRPCEPI_FOUND)
- IF (XMLRPCEPI_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find XMLRPC-EPI library")
- ENDIF (XMLRPCEPI_FIND_REQUIRED)
-ENDIF (XMLRPCEPI_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_XMLRPCEPI_INCLUDE_PATH ${XMLRPCEPI_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_XMLRPCEPI_LIB_PATH ${XMLRPCEPI_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- XMLRPCEPI_LIBRARY
- XMLRPCEPI_INCLUDE_DIR
- )
diff --git a/indra/cmake/FindZLIBNG.cmake b/indra/cmake/FindZLIBNG.cmake
deleted file mode 100644
index 6e3c8cdddb..0000000000
--- a/indra/cmake/FindZLIBNG.cmake
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- cmake -*-
-
-# - Find zlib-ng
-# Find the ZLIB includes and library
-# This module defines
-# ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc.
-# ZLIBNG_LIBRARIES, the libraries needed to use zlib.
-# ZLIBNG_FOUND, If false, do not try to use zlib.
-#
-# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x),
-# because it doesn't look up the version of zlib, resulting in a dramatic
-# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
-#
-# Note: Since this file is only used for standalone, the windows
-# specific parts were left out.
-
-FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h
- NO_SYSTEM_ENVIRONMENT_PATH
- )
-
-FIND_LIBRARY(ZLIBNG_LIBRARY z)
-
-if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
- SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR})
- SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY})
- SET(ZLIBNG_FOUND "YES")
-else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
- SET(ZLIBNG_FOUND "NO")
-endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR)
-
-if (ZLIBNG_FOUND)
- if (NOT ZLIBNG_FIND_QUIETLY)
- message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}")
- SET(ZLIBNG_FIND_QUIETLY TRUE)
- endif (NOT ZLIBNG_FIND_QUIETLY)
-else (ZLIBNG_FOUND)
- if (ZLIBNG_FIND_REQUIRED)
- message(FATAL_ERROR "Could not find ZLIBNG library")
- endif (ZLIBNG_FIND_REQUIRED)
-endif (ZLIBNG_FOUND)
-
-mark_as_advanced(
- ZLIBNG_LIBRARY
- ZLIBNG_INCLUDE_DIR
- )
-
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index a36485f6d0..243f22586b 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -1,14 +1,10 @@
# -*- cmake -*-
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
+include_guard()
+create_target( ll::freetype)
- 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)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(freetype)
+set_target_include_dirs( ll::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/)
+set_target_libraries( ll::freetype freetype )
-link_directories(${FREETYPE_LIBRARY_DIRS})
diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake
index 9fd3923bfd..6562082d7e 100644
--- a/indra/cmake/GLEXT.cmake
+++ b/indra/cmake/GLEXT.cmake
@@ -1,10 +1,8 @@
# -*- cmake -*-
include(Prebuilt)
-if (NOT USESYSTEMLIBS)
- if (WINDOWS OR LINUX)
- use_prebuilt_binary(glext)
- endif (WINDOWS OR LINUX)
- use_prebuilt_binary(glh_linear)
- set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-endif (NOT USESYSTEMLIBS)
+if (WINDOWS OR LINUX)
+ use_prebuilt_binary(glext)
+endif (WINDOWS OR LINUX)
+use_prebuilt_binary(glh_linear)
+set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake
index d5262f2efa..d7e89afaec 100644
--- a/indra/cmake/GLH.cmake
+++ b/indra/cmake/GLH.cmake
@@ -4,8 +4,4 @@ include(Prebuilt)
set(GLH_FIND_REQUIRED TRUE)
set(GLH_FIND_QUIETLY TRUE)
-if (USESYSTEMLIBS)
- include(FindGLH)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(glh_linear)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(glh_linear)
diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake
index 6f42b44ab8..2d7f85030f 100644
--- a/indra/cmake/GLOD.cmake
+++ b/indra/cmake/GLOD.cmake
@@ -1,11 +1,12 @@
# -*- cmake -*-
include(Prebuilt)
-if (NOT USESYSTEMLIBS)
- use_prebuilt_binary(glod)
-endif (NOT USESYSTEMLIBS)
+include_guard()
+create_target( ll::glod )
+
+use_prebuilt_binary(glod)
set(GLODLIB ON CACHE BOOL "Using GLOD library")
-set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-set(GLOD_LIBRARIES GLOD)
+set_target_include_dirs( ll::glod ${LIBS_PREBUILT_DIR}/include)
+set_target_libraries( ll::glod GLOD )
diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake
index 3fbc40ef8f..848d4f7fc6 100644
--- a/indra/cmake/GStreamer010Plugin.cmake
+++ b/indra/cmake/GStreamer010Plugin.cmake
@@ -1,12 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
-
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
-
- pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
- pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
-elseif (LINUX)
+if (LINUX)
use_prebuilt_binary(gstreamer)
# possible libxml2 should have its own .cmake file instead
use_prebuilt_binary(libxml2)
@@ -26,7 +20,7 @@ elseif (LINUX)
gthread-2.0
glib-2.0
)
-endif (USESYSTEMLIBS)
+endif ()
if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake
index 5a00546927..1f161ec4ff 100644
--- a/indra/cmake/GoogleMock.cmake
+++ b/indra/cmake/GoogleMock.cmake
@@ -2,27 +2,26 @@
include(Prebuilt)
include(Linking)
+include_guard()
+
use_prebuilt_binary(googlemock)
-set(GOOGLEMOCK_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include)
+create_target( ll::googlemock )
+set_target_include_dirs( ll::googlemock
+ ${LIBS_PREBUILT_DIR}/include
+ )
if (LINUX)
# VWR-24366: gmock is underlinked, it needs gtest.
- set(GOOGLEMOCK_LIBRARIES
- gmock -Wl,--no-as-needed
- gtest -Wl,--as-needed)
+ set_target_libraries( ll::googlemock gmock gtest)
elseif(WINDOWS)
- set(GOOGLEMOCK_LIBRARIES
- gmock)
- set(GOOGLEMOCK_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include
- ${LIBS_PREBUILT_DIR}/include/gmock
- ${LIBS_PREBUILT_DIR}/include/gmock/boost/tr1/tr1)
+ set_target_libraries( ll::googlemock gmock)
+ set_target_include_dirs( ll::googlemock
+ ${LIBS_PREBUILT_DIR}/include
+ ${LIBS_PREBUILT_DIR}/include/gmock)
+
elseif(DARWIN)
- set(GOOGLEMOCK_LIBRARIES
- gmock
- gtest)
+ set_target_libraries( ll::googlemock gmock gtest)
endif(LINUX)
diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
index 811a126b8f..652760e626 100644
--- a/indra/cmake/Havok.cmake
+++ b/indra/cmake/Havok.cmake
@@ -1,7 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
-if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
-set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
+include_guard()
use_prebuilt_binary(havok-source)
@@ -124,4 +123,3 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
endif (LINUX)
endforeach(HAVOK_LIB)
-endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index 06227b3fe2..258a27b5de 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,22 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
-set(HUNSPELL_FIND_QUIETLY ON)
-set(HUNSPELL_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::hunspell )
-if (USESYSTEMLIBS)
- include(FindHUNSPELL)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(libhunspell)
- if (WINDOWS)
- set(HUNSPELL_LIBRARY libhunspell)
- elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3)
- elseif(LINUX)
- set(HUNSPELL_LIBRARY hunspell-1.3)
- else()
- message(FATAL_ERROR "Invalid platform")
- endif()
- set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
- use_prebuilt_binary(dictionaries)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(libhunspell)
+if (WINDOWS)
+ set_target_libraries( ll::hunspell libhunspell)
+elseif(DARWIN)
+ set_target_libraries( ll::hunspell hunspell-1.3)
+elseif(LINUX)
+ set_target_libraries( ll::hunspell hunspell-1.3)
+endif()
+set_target_include_dirs( ll::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
+use_prebuilt_binary(dictionaries)
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index d6da22aecc..e6ff4b7b72 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -2,19 +2,16 @@
include(Prebuilt)
include(Linking)
-set(JPEG_FIND_QUIETLY ON)
-set(JPEG_FIND_REQUIRED ON)
-if (USESYSTEMLIBS)
- include(FindJPEG)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(jpeglib)
- if (LINUX)
- set(JPEG_LIBRARIES jpeg)
- elseif (DARWIN)
- set(JPEG_LIBRARIES jpeg)
- elseif (WINDOWS)
- set(JPEG_LIBRARIES jpeglib)
- endif (LINUX)
- set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+include_guard()
+create_target(ll::jpeglib)
+
+use_prebuilt_binary(jpeglib)
+if (LINUX)
+ set_target_libraries( ll::jpeglib jpeg)
+elseif (DARWIN)
+ set_target_libraries( ll::jpeglib jpeg)
+elseif (WINDOWS)
+ set_target_libraries( ll::jpeglib jpeglib)
+endif (LINUX)
+set_target_include_dirs( ll::jpeglib ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 079619adf8..a155c6ea78 100644
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -1,22 +1,15 @@
# -*- cmake -*-
include(Prebuilt)
+include_guard()
+create_target( ll::jsoncpp)
-set(JSONCPP_FIND_QUIETLY ON)
-set(JSONCPP_FIND_REQUIRED ON)
-
-if (USESYSTEMLIBS)
- include(FindJsonCpp)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(jsoncpp)
- if (WINDOWS)
- set(JSONCPP_LIBRARIES
- debug json_libmdd.lib
- optimized json_libmd.lib)
- elseif (DARWIN)
- set(JSONCPP_LIBRARIES libjson_darwin_libmt.a)
- elseif (LINUX)
- set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
- endif (WINDOWS)
- set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(jsoncpp)
+if (WINDOWS)
+ set_target_libraries( ll::jsoncpp json_libmd.lib )
+elseif (DARWIN)
+ set_target_libraries( ll::jsoncpp libjson_darwin_libmt.a )
+elseif (LINUX)
+ set_target_libraries( ll::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
+endif (WINDOWS)
+set_target_include_dirs( ll::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4937c2a9d7..a3c873b389 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
+ ll::googlemock
+ ${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}
@@ -206,14 +206,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
)
SET(libraries
- ${LEGACY_STDIO_LIBS}
- ${library_dependencies}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- ${GOOGLEMOCK_LIBRARIES}
- ${PTHREAD_LIBRARY}
- )
+ ${LEGACY_STDIO_LIBS}
+ ${library_dependencies}
+ ll::googlemock
+ ${PTHREAD_LIBRARY}
+ )
# Add test executable build target
if(TEST_DEBUG)
@@ -226,10 +223,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}"
)
- if(USESYSTEMLIBS)
- SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
- endif(USESYSTEMLIBS)
-
if (USE_BUGSPLAT)
SET_PROPERTY(SOURCE ${source_files}
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
@@ -307,10 +300,6 @@ MACRO(SET_TEST_PATH LISTVAR)
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
ELSE(WINDOWS)
# Linux uses a single staging directory anyway.
- IF (USESYSTEMLIBS)
- set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib)
- ELSE (USESYSTEMLIBS)
- set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
- ENDIF (USESYSTEMLIBS)
+ set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
ENDIF(WINDOWS)
ENDMACRO(SET_TEST_PATH)
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..a57c3d8715 100644
--- a/indra/cmake/LLKDU.cmake
+++ b/indra/cmake/LLKDU.cmake
@@ -7,15 +7,20 @@ if (INSTALL_PROPRIETARY)
set(USE_KDU ON CACHE BOOL "Use Kakadu library.")
endif (INSTALL_PROPRIETARY)
+include_guard()
+create_target( ll::kdu )
+
if (USE_KDU)
include(Prebuilt)
use_prebuilt_binary(kdu)
if (WINDOWS)
- set(KDU_LIBRARY kdu.lib)
+ set_target_libraries( ll::kdu kdu.lib)
else (WINDOWS)
- set(KDU_LIBRARY libkdu.a)
+ set_target_libraries( ll::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_include_dirs( ll::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..b51c4c622a 100644
--- a/indra/cmake/LLPhysicsExtensions.cmake
+++ b/indra/cmake/LLPhysicsExtensions.cmake
@@ -10,6 +10,9 @@ if (INSTALL_PROPRIETARY)
set(HAVOK ON CACHE BOOL "Use Havok physics library")
endif (INSTALL_PROPRIETARY)
+include_guard()
+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 +22,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..0f0e2d3bbf 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -4,49 +4,39 @@
include(Prebuilt)
include(Boost)
+include_guard()
+
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( ll::pcre )
+set_target_libraries( ll::pcre pcrecpp pcre )
+
+create_target( ll::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( ll::minizip-ng libminizip )
+else()
+ set_target_libraries( ll::minizip-ng minizip )
+endif()
+
+create_target( ll::libxml )
+if (WINDOWS)
+ set_target_libraries( ll::libxml libxml2_a)
+else()
+ set_target_libraries( ll::libxml xml2)
+endif()
+
+create_target( ll::colladadom )
+set_target_include_dirs( ll::colladadom
+ ${LIBS_PREBUILT_DIR}/include/collada
+ ${LIBS_PREBUILT_DIR}/include/collada/1.4
)
+if (WINDOWS)
+ set_target_libraries(ll::colladadom libcollada14dom23-s ll::libxml ll::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(ll::colladadom collada14dom ll::libxml ll::minizip-ng)
elseif (LINUX)
- set(LLPRIMITIVE_LIBRARIES
- llprimitive
- debug collada14dom-d
- optimized collada14dom
- minizip
- xml2
- pcrecpp
- pcre
- )
-endif (WINDOWS)
-
+ set_target_libraries(ll::colladadom collada14dom ll::libxml ll::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..2bbaff942d 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -4,39 +4,14 @@ include(Variables)
include(GLEXT)
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindSDL)
+include_guard()
+create_target(ll::sdl)
- # This should be done by FindSDL. Sigh.
- mark_as_advanced(
- SDLMAIN_LIBRARY
- SDL_INCLUDE_DIR
- SDL_LIBRARY
- )
-else (USESYSTEMLIBS)
- if (LINUX)
- use_prebuilt_binary(SDL)
- set (SDL_FOUND TRUE)
- set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux)
- set (SDL_LIBRARY SDL directfb fusion direct X11)
- endif (LINUX)
-endif (USESYSTEMLIBS)
+if (LINUX)
+ use_prebuilt_binary(SDL)
+ set_target_include_dirs( ll::sdl ${LIBS_PREBUILT_DIR}/i686-linux)
+ set_target_libraries( ll::sdl SDL directfb fusion direct X11)
+ target_compile_definitions( ll::sdl INTERFACE LL_SDL=1)
+endif (LINUX)
-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..1648bfd942 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -2,29 +2,27 @@
include(Linking)
include(Prebuilt)
-if (USESYSTEMLIBS)
- set(LIBVLCPLUGIN OFF CACHE BOOL
- "LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
-else (USESYSTEMLIBS)
- use_prebuilt_binary(vlc-bin)
- set(LIBVLCPLUGIN ON CACHE BOOL
+include_guard()
+create_target( ll::libvlc )
+
+use_prebuilt_binary(vlc-bin)
+set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
- set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
-endif (USESYSTEMLIBS)
+set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
if (WINDOWS)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.lib
- libvlccore.lib
+ set_target_libraries( ll::libvlc
+ libvlc.lib
+ libvlccore.lib
)
elseif (DARWIN)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.dylib
- libvlccore.dylib
+ set_target_libraries( ll::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( ll::libvlc
${LIBS_PREBUILT_DIR}/lib/libvlc.a
${LIBS_PREBUILT_DIR}/lib/libvlccore.a
)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 3cb235a9d5..4a57a6a3ef 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -1,8 +1,6 @@
# -*- cmake -*-
-if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
-set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
-
+include_guard()
include(Variables)
set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib)
@@ -18,6 +16,11 @@ elseif (LINUX)
elseif (DARWIN)
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
+ if( ${CMAKE_GENERATOR} STREQUAL "Ninja")
+ set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs/${CMAKE_BUILD_TYPE} ")
+ else()
+ set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
+ endif()
endif (WINDOWS)
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
@@ -30,7 +33,13 @@ endif (WINDOWS)
if(WINDOWS OR DARWIN)
# the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us
# fortunately both windows and darwin are case insensitive filesystems so this works.
- set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/")
+ # Ninja on the other hand needs the the full path
+ if( ${CMAKE_GENERATOR} STREQUAL "Ninja")
+ string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
+ set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
+ else()
+ set(AUTOBUILD_LIBS_INSTALL_DIRS "${AUTOBUILD_INSTALL_DIR}/lib/")
+ endif()
else(WINDOWS OR DARWIN)
# else block is for linux and any other makefile based generators
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
@@ -75,4 +84,3 @@ endif (WINDOWS)
mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES)
-endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
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..75936425ff 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -3,34 +3,25 @@ include(Prebuilt)
set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
-if (NDOF)
- if (USESYSTEMLIBS)
- set(NDOF_FIND_REQUIRED ON)
- include(FindNDOF)
- else (USESYSTEMLIBS)
- if (WINDOWS OR DARWIN)
- use_prebuilt_binary(libndofdev)
- elseif (LINUX)
- use_prebuilt_binary(open-libndofdev)
- endif (WINDOWS OR DARWIN)
+include_guard()
+create_target( ll::ndof )
- if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
- elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
- endif (WINDOWS)
+if (NDOF)
+ if (WINDOWS OR DARWIN)
+ use_prebuilt_binary(libndofdev)
+ elseif (LINUX)
+ use_prebuilt_binary(open-libndofdev)
+ endif (WINDOWS OR DARWIN)
- set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
- set(NDOF_FOUND 1)
- endif (USESYSTEMLIBS)
+ if (WINDOWS)
+ set_target_libraries( ll::ndof libndofdev)
+ elseif (DARWIN OR LINUX)
+ set_target_libraries( ll::ndof ndofdev)
+ endif (WINDOWS)
+ target_compile_definitions( ll::ndof INTERFACE LIB_NDOF=1)
endif (NDOF)
-if (NDOF_FOUND)
- add_definitions(-DLIB_NDOF=1)
- include_directories(${NDOF_INCLUDE_DIR})
-else (NDOF_FOUND)
+if (NOT NDOF_FOUND)
message(STATUS "Building without N-DoF joystick support")
- set(NDOF_INCLUDE_DIR "")
- set(NDOF_LIBRARY "")
-endif (NDOF_FOUND)
+endif ()
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index df191ff3c1..e92f0da2ef 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -1,20 +1,14 @@
include(Prebuilt)
-set(NGHTTP2_FIND_QUIETLY ON)
-set(NGHTTP2_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::nghttp2 )
-if (USESYSTEMLIBS)
- include(FindNGHTTP2)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(nghttp2)
- if (WINDOWS)
- set(NGHTTP2_LIBRARIES
- ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib
- )
- elseif (DARWIN)
- set(NGHTTP2_LIBRARIES libnghttp2.dylib)
- else (WINDOWS)
- set(NGHTTP2_LIBRARIES libnghttp2.a)
- endif (WINDOWS)
- set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(nghttp2)
+if (WINDOWS)
+ set_target_libraries( ll::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
+elseif (DARWIN)
+ set_target_libraries( ll::nghttp2 libnghttp2.dylib)
+else (WINDOWS)
+ set_target_libraries( ll::nghttp2 libnghttp2.a )
+endif (WINDOWS)
+set_target_include_dirs( ll::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2)
diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake
index 105f442a30..63e5dd12de 100644
--- a/indra/cmake/NVAPI.cmake
+++ b/indra/cmake/NVAPI.cmake
@@ -5,12 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.")
if (NVAPI)
if (WINDOWS)
+ create_target( ll::nvapi )
+ set_target_libraries( ll::nvapi nvapi)
use_prebuilt_binary(nvapi)
- set(NVAPI_LIBRARY nvapi)
- else (WINDOWS)
- set(NVAPI_LIBRARY "")
endif (WINDOWS)
-else (NVAPI)
- set(NVAPI_LIBRARY "")
endif (NVAPI)
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 1bbfff6f98..9904f6d1c0 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -2,6 +2,8 @@
include(Linking)
include(Prebuilt)
+include_guard()
+
if (LINUX)
set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
@@ -9,24 +11,22 @@ else (LINUX)
endif (LINUX)
if (OPENAL)
- set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
- if (USESYSTEMLIBS)
- include(FindPkgConfig)
- include(FindOpenAL)
- pkg_check_modules(OPENAL_LIB REQUIRED openal)
- pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
- else (USESYSTEMLIBS)
- use_prebuilt_binary(openal)
- endif (USESYSTEMLIBS)
+ create_target( ll::openal )
+ set_target_include_dirs( ll::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
+ use_prebuilt_binary(openal)
+
if(WINDOWS)
- set(OPENAL_LIBRARIES
- OpenAL32
- alut
- )
+ set_target_libraries( ll::openal
+ OpenAL32
+ alut
+ )
+ elseif(LINUX)
+ set_target_libraries( ll::openal
+ openal
+ alut
+ )
else()
- set(OPENAL_LIBRARIES
- openal
- alut
- )
+ message(FATAL_ERROR "OpenAL is not available for this platform")
endif()
endif (OPENAL)
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake
index bf0bde2ba7..7d4d0f467a 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -1,22 +1,10 @@
# -*- cmake -*-
include(Prebuilt)
-set(OPENJPEG_FIND_QUIETLY ON)
-set(OPENJPEG_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::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)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(openjpeg)
+
+set_target_libraries(ll::openjpeg openjpeg )
+set_target_include_dirs( ll::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 32400f5e4e..d586396105 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,23 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
-set(OpenSSL_FIND_QUIETLY ON)
-set(OpenSSL_FIND_REQUIRED ON)
+include_guard()
+create_target(ll::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)
- endif (WINDOWS)
- set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(openssl)
+if (WINDOWS)
+ set_target_libraries(ll::openssl libssl libcrypto)
+elseif (LINUX)
+ set_target_libraries(ll::openssl ssl crypto dl)
+else()
+ set_target_libraries(ll::openssl ssl crypto)
+endif (WINDOWS)
+set_target_include_dirs(ll::openssl ${LIBS_PREBUILT_DIR}/include)
-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..2838a6b667 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -1,34 +1,13 @@
# -*- cmake -*-
include(Prebuilt)
-set(PNG_FIND_QUIETLY ON)
-set(PNG_FIND_REQUIRED ON)
+include_guard()
+create_target(ll::libpng)
-if (USESYSTEMLIBS)
- include(FindPNG)
-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)
- 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()
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(libpng)
+if (WINDOWS)
+ set_target_libraries(ll::libpng libpng16)
+else()
+ set_target_libraries(ll::libpng png16 )
+endif()
+set_target_include_dirs( ll::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake
index 33a6d76916..9e8adf5af1 100644
--- a/indra/cmake/Prebuilt.cmake
+++ b/indra/cmake/Prebuilt.cmake
@@ -1,7 +1,5 @@
# -*- cmake -*-
-
-if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
-set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
+include_guard()
include(FindAutobuild)
if(INSTALL_PROPRIETARY)
@@ -61,4 +59,13 @@ macro (use_prebuilt_binary _binary)
endif (NOT USESYSTEMLIBS_${_binary})
endmacro (use_prebuilt_binary _binary)
-endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
+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()
+
diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake
index cce27f1bdd..1b7adc1a62 100644
--- a/indra/cmake/PulseAudio.cmake
+++ b/indra/cmake/PulseAudio.cmake
@@ -4,23 +4,16 @@ include(Prebuilt)
set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
if (PULSEAUDIO)
- if (USESYSTEMLIBS)
- include(FindPkgConfig)
-
- pkg_check_modules(PULSEAUDIO libpulse)
-
- elseif (LINUX)
- use_prebuilt_binary(pulseaudio)
- set(PULSEAUDIO_FOUND ON FORCE BOOL)
- set(PULSEAUDIO_INCLUDE_DIRS
- ${LIBS_PREBUILT_DIR}/include
- )
- # We don't need to explicitly link against pulseaudio itself, because
- # the viewer probes for the system's copy at runtime.
- set(PULSEAUDIO_LIBRARIES
- # none needed!
- )
- endif (USESYSTEMLIBS)
+ use_prebuilt_binary(pulseaudio)
+ set(PULSEAUDIO_FOUND ON FORCE BOOL)
+ set(PULSEAUDIO_INCLUDE_DIRS
+ ${LIBS_PREBUILT_DIR}/include
+ )
+ # We don't need to explicitly link against pulseaudio itself, because
+ # the viewer probes for the system's copy at runtime.
+ set(PULSEAUDIO_LIBRARIES
+ # none needed!
+ )
endif (PULSEAUDIO)
if (PULSEAUDIO_FOUND)
diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake
index e11a3c3314..ad93830803 100644
--- a/indra/cmake/Tut.cmake
+++ b/indra/cmake/Tut.cmake
@@ -1,6 +1,4 @@
# -*- cmake -*-
include(Prebuilt)
-if (NOT USESYSTEMLIBS)
- use_prebuilt_binary(tut)
-endif(NOT USESYSTEMLIBS)
+use_prebuilt_binary(tut)
diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake
index 77fd505df3..c12dca2ab9 100644
--- a/indra/cmake/UI.cmake
+++ b/indra/cmake/UI.cmake
@@ -2,67 +2,36 @@
include(Prebuilt)
include(FreeType)
-if (USESYSTEMLIBS)
- include(FindPkgConfig)
-
- if (LINUX)
- set(PKGCONFIG_PACKAGES
- atk
- cairo
- gdk-2.0
- gdk-pixbuf-2.0
- glib-2.0
- gmodule-2.0
- gtk+-2.0
- gthread-2.0
- libpng
- pango
- pangoft2
- pangox
- pangoxft
- sdl
- )
- endif (LINUX)
-
- foreach(pkg ${PKGCONFIG_PACKAGES})
- pkg_check_modules(${pkg} REQUIRED ${pkg})
- include_directories(${${pkg}_INCLUDE_DIRS})
- link_directories(${${pkg}_LIBRARY_DIRS})
- list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES})
- add_definitions(${${pkg}_CFLAGS_OTHERS})
- endforeach(pkg)
-else (USESYSTEMLIBS)
- if (LINUX)
- use_prebuilt_binary(gtk-atk-pango-glib)
- endif (LINUX)
+if (LINUX)
+ use_prebuilt_binary(gtk-atk-pango-glib)
+endif (LINUX)
- if (LINUX)
- set(UI_LIBRARIES
- atk-1.0
- gdk-x11-2.0
- gdk_pixbuf-2.0
- Xinerama
- glib-2.0
- gmodule-2.0
- gobject-2.0
- gthread-2.0
- gtk-x11-2.0
- pango-1.0
- pangoft2-1.0
- pangox-1.0
- pangoxft-1.0
- ${FREETYPE_LIBRARIES}
- )
- endif (LINUX)
+if (LINUX)
+ set(UI_LIBRARIES
+ atk-1.0
+ gdk-x11-2.0
+ gdk_pixbuf-2.0
+ Xinerama
+ glib-2.0
+ gmodule-2.0
+ gobject-2.0
+ gthread-2.0
+ gtk-x11-2.0
+ pango-1.0
+ pangoft2-1.0
+ pangox-1.0
+ pangoxft-1.0
+ ${FREETYPE_LIBRARIES}
+ )
+endif (LINUX)
- include_directories (
- ${LIBS_PREBUILT_DIR}/include
- ${LIBS_PREBUILT_DIR}/include
- )
- foreach(include ${${LL_ARCH}_INCLUDES})
- include_directories(${LIBS_PREBUILT_DIR}/include/${include})
- endforeach(include)
-endif (USESYSTEMLIBS)
+include_directories (
+ ${LIBS_PREBUILT_DIR}/include
+ ${LIBS_PREBUILT_DIR}/include
+)
+foreach(include ${${LL_ARCH}_INCLUDES})
+ include_directories(${LIBS_PREBUILT_DIR}/include/${include})
+endforeach(include)
if (LINUX)
add_definitions(-DLL_GTK=1 -DLL_X11=1)
diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake
index ecc5b74ef1..35f37b4472 100644
--- a/indra/cmake/URIPARSER.cmake
+++ b/indra/cmake/URIPARSER.cmake
@@ -1,35 +1,16 @@
# -*- cmake -*-
-set(URIPARSER_FIND_QUIETLY ON)
-set(URIPARSER_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::uriparser )
include(Prebuilt)
-if (USESYSTEMLIBS)
- include(FindURIPARSER)
-else (USESYSTEMLIBS)
- use_prebuilt_binary(uriparser)
- if (WINDOWS)
- set(URIPARSER_LIBRARIES
- debug uriparserd
- optimized 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)
- elseif (DARWIN)
- set(URIPARSER_LIBRARIES liburiparser.dylib)
- endif (WINDOWS)
- set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(uriparser)
+if (WINDOWS)
+ set_target_libraries( ll::uriparser uriparser)
+elseif (LINUX)
+ set_target_libraries( ll::uriparser uriparser)
+elseif (DARWIN)
+ set_target_libraries( ll::uriparser liburiparser.dylib)
+endif (WINDOWS)
+set_target_include_dirs( ll::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index e72475cbc4..0cc4b85583 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -15,12 +15,10 @@
if ("$ENV{LL_BUILD}" STREQUAL "")
message(FATAL_ERROR "Environment variable LL_BUILD must be set")
endif ()
+include_guard()
# Relative and absolute paths to subtrees.
-if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
-set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
-
if(NOT DEFINED COMMON_CMAKE_DIR)
set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake")
endif(NOT DEFINED COMMON_CMAKE_DIR)
@@ -214,10 +212,8 @@ set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
-set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.")
set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")
source_group("CMake Rules" FILES CMakeLists.txt)
-endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake
index fc5bdedb5a..1dff854855 100644
--- a/indra/cmake/ViewerMiscLibs.cmake
+++ b/indra/cmake/ViewerMiscLibs.cmake
@@ -1,12 +1,10 @@
# -*- cmake -*-
include(Prebuilt)
-if (NOT USESYSTEMLIBS)
- if (LINUX)
- use_prebuilt_binary(libuuid)
- use_prebuilt_binary(fontconfig)
- endif (LINUX)
- use_prebuilt_binary(libhunspell)
- use_prebuilt_binary(slvoice)
-endif(NOT USESYSTEMLIBS)
+if (LINUX)
+ use_prebuilt_binary(libuuid)
+ use_prebuilt_binary(fontconfig)
+endif (LINUX)
+use_prebuilt_binary(libhunspell)
+use_prebuilt_binary(slvoice)
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
index 8c3790ea89..b2d1d96562 100644
--- a/indra/cmake/XmlRpcEpi.cmake
+++ b/indra/cmake/XmlRpcEpi.cmake
@@ -1,20 +1,9 @@
# -*- cmake -*-
include(Prebuilt)
-set(XMLRPCEPI_FIND_QUIETLY ON)
-set(XMLRPCEPI_FIND_REQUIRED ON)
+include_guard()
+create_target( ll::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)
-endif (USESYSTEMLIBS)
+use_prebuilt_binary(xmlrpc-epi)
+set_target_libraries(ll::xmlrpc-epi xmlrpc-epi )
+set_target_include_dirs( ll::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake
index 1f46a23d92..6e206f1e48 100644
--- a/indra/cmake/ZLIBNG.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -1,35 +1,14 @@
# -*- cmake -*-
-set(ZLIBNG_FIND_QUIETLY ON)
-set(ZLIBNG_FIND_REQUIRED ON)
-
include(Prebuilt)
-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)
- endif (WINDOWS)
- set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
-endif (USESYSTEMLIBS)
+include_guard()
+create_target(ll::zlib-ng)
+
+use_prebuilt_binary(zlib-ng)
+if (WINDOWS)
+ set_target_libraries( ll::zlib-ng zlib )
+else()
+ set_target_libraries( ll::zlib-ng z )
+endif (WINDOWS)
+set_target_include_dirs( ll::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 4edc4c59cd..ce5660aa05 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -9,29 +9,29 @@ else (INSTALL_PROPRIETARY)
set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
endif (INSTALL_PROPRIETARY)
+include_guard()
+create_target(ll::bugsplat)
+
if (USE_BUGSPLAT)
- if (NOT USESYSTEMLIBS)
- include(Prebuilt)
- use_prebuilt_binary(bugsplat)
- if (WINDOWS)
- set(BUGSPLAT_LIBRARIES
+ include(Prebuilt)
+ use_prebuilt_binary(bugsplat)
+ if (WINDOWS)
+ set_target_libraries( bugsplat::bugsplat
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
)
- elseif (DARWIN)
- find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
+ elseif (DARWIN)
+ find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
- 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_target_libraries( bugsplat::bugsplat
+ ${BUGSPLAT_LIBRARIES}
+ )
+ else (WINDOWS)
+ message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
+ endif (WINDOWS)
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
- set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
- set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
+ set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat)
+ set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT)
endif (USE_BUGSPLAT)
diff --git a/indra/integration_tests/llimage_libtest/CMakeLists.txt b/indra/integration_tests/llimage_libtest/CMakeLists.txt
index bd59f57e49..9ac3498d09 100644
--- a/indra/integration_tests/llimage_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llimage_libtest/CMakeLists.txt
@@ -64,16 +64,15 @@ endif (DARWIN)
# Libraries on which this application depends on
# Sort by high-level to low-level
target_link_libraries(llimage_libtest
- ${LEGACY_STDIO_LIBS}
- ${LLCOMMON_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLKDU_LIBRARIES}
- ${KDU_LIBRARY}
- ${LLIMAGEJ2COJ_LIBRARIES}
- ${OS_LIBRARIES}
- )
+ ${LEGACY_STDIO_LIBS}
+ llcommon
+ llfilesystem
+ llmath
+ llimage
+ llkdu
+ llimagej2coj
+ ${OS_LIBRARIES}
+ )
if (DARWIN)
# Path inside the app bundle where we'll need to copy libraries
diff --git a/indra/integration_tests/llui_libtest/CMakeLists.txt b/indra/integration_tests/llui_libtest/CMakeLists.txt
index d7706e73b2..baa814fb8b 100644
--- a/indra/integration_tests/llui_libtest/CMakeLists.txt
+++ b/indra/integration_tests/llui_libtest/CMakeLists.txt
@@ -75,43 +75,32 @@ endif (DARWIN)
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
target_link_libraries(llui_libtest
- ${LEGACY_STDIO_LIBS}
- llui
- llinventory
- llmessage
- ${LLRENDER_LIBRARIES}
- ${LLIMAGE_LIBRARIES}
- ${LLKDU_LIBRARIES}
- ${KDU_LIBRARY}
- ${LLIMAGEJ2COJ_LIBRARIES}
- ${OS_LIBRARIES}
- ${GOOGLE_PERFTOOLS_LIBRARIES}
- ${HUNSPELL_LIBRARY}
- )
+ ${LEGACY_STDIO_LIBS}
+ llui
+ llinventory
+ llmessage
+ llrender
+ llimage
+ llkdu
+ llimagej2coj
+ ${OS_LIBRARIES}
+ )
if (WINDOWS)
set_target_properties(llui_libtest
PROPERTIES
LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
- LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD"
)
# Copy over OpenJPEG.dll
# *NOTE: On Windows with VS2005, only the first comment prints
set(OPENJPEG_RELEASE
- "${ARCH_PREBUILT_DIRS_RELEASE}/openjpeg.dll")
+ "${ARCH_PREBUILT_DIRS_RELEASE}/openjpeg.dll")
add_custom_command( TARGET llui_libtest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
${OPENJPEG_RELEASE} ${CMAKE_CURRENT_BINARY_DIR}
- COMMENT "Copying OpenJPEG DLLs to binary directory"
- )
- set(OPENJPEG_DEBUG
- "${ARCH_PREBUILT_DIRS_DEBUG}/openjpegd.dll")
- add_custom_command( TARGET llui_libtest POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${OPENJPEG_DEBUG} ${CMAKE_CURRENT_BINARY_DIR}
- )
-
+ COMMENT "Copying OpenJPEG DLLs to binary directory"
+ )
endif (WINDOWS)
# Ensure people working on the viewer don't break this library
diff --git a/indra/linux_crash_logger/CMakeLists.txt b/indra/linux_crash_logger/CMakeLists.txt
index aa82ed12cc..daa78f77ff 100644
--- a/indra/linux_crash_logger/CMakeLists.txt
+++ b/indra/linux_crash_logger/CMakeLists.txt
@@ -61,18 +61,15 @@ set(LIBRT_LIBRARY rt)
target_link_libraries(linux-crash-logger
- ${LLCRASHLOGGER_LIBRARIES}
- ${LLFILESYSTEM_LIBRARIES}
- ${LLXML_LIBRARIES}
- ${LLMESSAGE_LIBRARIES}
- ${LLMATH_LIBRARIES}
- ${LLCOREHTTP_LIBRARIES}
- ${LLCOMMON_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
+ llcrashlogger
+ llfilesystem
+ llxml
+ llmessage
+ llmath
+ llcorehttp
+ llcommon
${UI_LIBRARIES}
- ${DB_LIBRARIES}
- ${FREETYPE_LIBRARIES}
+ ll::freetype
${LIBRT_LIBRARY}
)
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..21e4723e7e 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
+ ll::vorbis
)
+
+if( TARGET ll::openal )
+ target_link_libraries( llaudio ll::openal )
+endif()
+if( TARGET ll::fmodstudio )
+ target_link_libraries( llaudio ll::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..c934d47cc9 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -13,19 +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
-# ${LLCOMMON_LIBRARIES})
-
set(llcommon_SOURCE_FILES
indra_constants.cpp
llallocator.cpp
@@ -286,22 +273,20 @@ else(LLCOMMON_LINK_SHARED)
endif(LLCOMMON_LINK_SHARED)
target_link_libraries(
- llcommon
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${JSONCPP_LIBRARIES}
- ${ZLIBNG_LIBRARIES}
+ llcommon
+ ll::apr
+ ll::expat
+ ll::jsoncpp
+ ll::zlib-ng
${WINDOWS_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
+ ll::boost
${GOOGLE_PERFTOOLS_LIBRARIES}
- ${URIPARSER_LIBRARIES}
+ ll::uriparser
)
+set_target_include_dirs( llcommon ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories( llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
+
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
@@ -318,14 +303,10 @@ if (LL_TESTS)
LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
- set(test_libs llcommon
- ${LLCOMMON_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY})
+ set(test_libs llcommon
+ ${WINDOWS_LIBRARIES}
+ ll::googlemock
+ )
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..041c90b174 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
+ ll::libcurl
+ ll::openssl
+ ll::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..7b3c1110a2 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,21 @@ 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
+ ll::libpng
+ ll::jpeglib
)
# Add tests
diff --git a/indra/llimagej2coj/CMakeLists.txt b/indra/llimagej2coj/CMakeLists.txt
index c9423d50dd..ff7d75b709 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
+ ll::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..674ad04919 100644
--- a/indra/llkdu/CMakeLists.txt
+++ b/indra/llkdu/CMakeLists.txt
@@ -13,15 +13,6 @@ 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,11 +42,14 @@ 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 ll::kdu llimage llcommon)
+ set_target_include_dirs( llkdu ${CMAKE_CURRENT_SOURCE_DIR})
+
# Add tests
- if (LL_TESTS)
+ # ND: llkdu tests are very strange as they include stubs for KDU classes/methods
+ # if not having access to the right KDU version this test will fail to compile, incidentally I do not
+ # have access to a matching version of KDU and thus cannot get this tests to compile
+ if (LL_TESTS_KDU)
include(LLAddBuildTest)
include(Tut)
SET(llkdu_TEST_SOURCE_FILES
@@ -66,11 +60,12 @@ if (USE_KDU)
llkdumem.h
lltut.h
)
- SET(llkdu_test_additional_INCLUDE_DIRS
- ${KDU_INCLUDE_DIR}
- ${LLKDU_INCLUDE_DIRS}
- )
+
+ get_property( llimage_include_dir TARGET llimage PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
+ set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_LIBRARIES ll::kdu llcommon)
+ set_property( SOURCE ${llkdu_TEST_SOURCE_FILES} PROPERTY LL_TEST_ADDITIONAL_INCLUDE_DIRS ${llimage_include_dir})
+
LL_ADD_PROJECT_UNIT_TESTS(llkdu "${llkdu_TEST_SOURCE_FILES}")
- endif (LL_TESTS)
+ endif (LL_TESTS_KDU)
endif (USE_KDU)
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index 552e820127..fd7b831719 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -7,11 +7,6 @@ include(LLCommon)
include(bugsplat)
include(Boost)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- )
-
set(llmath_SOURCE_FILES
llbbox.cpp
llbboxlocal.cpp
@@ -107,9 +102,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 +118,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..334a55348c 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,14 @@ 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
+ llcommon
+ llfilesystem
+ llmath
+ llcorehttp
+)
+set_target_include_dirs( llmessage ${CMAKE_CURRENT_SOURCE_DIR})
# tests
if (LL_TESTS)
@@ -249,41 +215,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..79b54c9df8 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
+ ll::colladadom
+ ll::pcre
+ )
#add unit tests
if (LL_TESTS)
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index baab09a104..8f9089f4b7 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,34 +79,30 @@ 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})
-
-if (SDL_FOUND)
- set_property(TARGET llrender
- PROPERTY COMPILE_DEFINITIONS LL_SDL=1
- )
-endif (SDL_FOUND)
+set_target_include_dirs(llrender ${CMAKE_CURRENT_SOURCE_DIR})
# 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
+ ll::sdl
+ ll::freetype
+ OpenGL::GL
+ OpenGL::GLU
+ )
diff --git a/indra/llui/CMakeLists.txt b/indra/llui/CMakeLists.txt
index d96824bbf8..9035095d5f 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
+ ll::hunspell
+ llcommon
)
# Add tests
if(LL_TESTS)
include(LLAddBuildTest)
+ set(test_libs llmessage llcorehttp llxml llrender llcommon ll::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 ll::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..c997bbdf59 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.
@@ -190,11 +174,5 @@ endif (llwindow_HEADER_FILES)
${viewer_SOURCE_FILES}
)
-if (SDL_FOUND)
- set_property(TARGET llwindow
- PROPERTY COMPILE_DEFINITIONS LL_SDL=1
- )
-endif (SDL_FOUND)
-
- target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES})
-
+target_link_libraries (llwindow ${llwindow_LINK_LIBRARIES} ll::sdl)
+set_target_include_dirs(llwindow ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/indra/llxml/CMakeLists.txt b/indra/llxml/CMakeLists.txt
index 3a7a54e51d..5953cb79e8 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
+ ll::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..94281465e7 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)
@@ -93,7 +71,6 @@ if (WINDOWS)
media_plugin_cef
PROPERTIES
LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
- LINK_FLAGS_DEBUG "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMTD /IGNORE:4099"
)
endif (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..a3c1c4ef99 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
+ ll::libvlc
)
if (WINDOWS)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 85e39bbb2d..2be83c9900 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,27 @@ 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)
-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}
- )
+ # Stub and probably havok lib itself is a hack, autobuild loads a 3p that really is a source tarball
+ # which includes a CMakeList.txt and then this whole source tree gets pushed into out build ... :/
+ # To make matters worse there is a internal assumption about the structure of the viewers CMake layout,
+ # which means we need to duct tape this togther ...
+ get_property( LLCOMMON_INCLUDE_DIRS TARGET llcommon PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
+ get_property( LLMATH_INCLUDE_DIRS TARGET llmath PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- ${LLPHYSICSEXTENSIONS_INCLUDE_DIRS}
- )
+ add_subdirectory(${LLPHYSICSEXTENSIONS_SRC_DIR} llphysicsextensions)
+
+ # Another hack that works with newer cmake versions:
+ #cmake_policy( SET CMP0079 NEW)
+ #target_link_libraries(llphysicsextensionsstub llcommon llmath)
+endif (NOT HAVOK_TPV)
-if (USE_BUGSPLAT)
- include_directories(AFTER
- ${BUGSPLAT_INCLUDE_DIR}
- )
-endif (USE_BUGSPLAT)
set(viewer_SOURCE_FILES
groupchatlistener.cpp
@@ -1428,7 +1387,7 @@ if (DARWIN)
if (USE_BUGSPLAT)
list(APPEND viewer_LIBRARIES
- ${BUGSPLAT_LIBRARIES}
+ bugsplat::bugsplat
)
endif (USE_BUGSPLAT)
@@ -1495,11 +1454,7 @@ if (WINDOWS)
# All sources added to viewer_SOURCE_FILES
# at this point use it.
if(USE_PRECOMPILED_HEADERS)
- set_source_files_properties(llviewerprecompiledheaders.cpp
- PROPERTIES
- COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h"
- )
- set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
+ set(viewer_SOURCE_FILES "${viewer_SOURCE_FILES}" llviewerprecompiledheaders.cpp)
endif(USE_PRECOMPILED_HEADERS)
# Replace the icons with the appropriate ones for the channel
@@ -1598,9 +1553,7 @@ if (WINDOWS)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
- if (NOT USESYSTEMLIBS)
- list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
- endif (NOT USESYSTEMLIBS)
+ list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs)
set(viewer_LIBRARIES
@@ -1718,9 +1671,7 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES})
set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
-if (NOT USESYSTEMLIBS)
- list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
-endif (NOT USESYSTEMLIBS)
+list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
if (WINDOWS)
file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi)
@@ -1739,7 +1690,6 @@ endif (OPENAL)
if (FMODSTUDIO)
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMODSTUDIO")
- set(FMODWRAPPER_LIBRARY ${FMODSTUDIO_LIBRARY})
endif (FMODSTUDIO)
set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
@@ -1766,17 +1716,6 @@ add_executable(${VIEWER_BINARY_NAME}
${viewer_SOURCE_FILES}
)
-if (SDL_FOUND)
- set_property(TARGET ${VIEWER_BINARY_NAME}
- PROPERTY COMPILE_DEFINITIONS LL_SDL=1
- )
-endif (SDL_FOUND)
-
-if (USE_BUGSPLAT)
- set_property(TARGET ${VIEWER_BINARY_NAME}
- PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
-endif (USE_BUGSPLAT)
-
# add package files
file(GLOB EVENT_HOST_SCRIPT_GLOB_LIST
${CMAKE_CURRENT_SOURCE_DIR}/../viewer_components/*.py)
@@ -1795,11 +1734,7 @@ if (WINDOWS)
)
if(USE_PRECOMPILED_HEADERS)
- set_target_properties(
- ${VIEWER_BINARY_NAME}
- PROPERTIES
- COMPILE_FLAGS "/Yullviewerprecompiledheaders.h"
- )
+ target_precompile_headers( ${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h )
endif(USE_PRECOMPILED_HEADERS)
# If adding a file to viewer_manifest.py in the WindowsManifest.construct() method, be sure to add the dependency
@@ -1814,55 +1749,49 @@ if (WINDOWS)
# stores a list in the variable myfile in which each item is a line from the input file."
# And of course it's straightforward to read a text file in Python.
+ if( ${CMAKE_GENERATOR} STREQUAL "Ninja")
+ set(LL_INTDIR ${CMAKE_BUILD_TYPE})
+ else()
+ set(LL_INTDIR ${CMAKE_CFG_INTDIR})
+ endif()
+
set(COPY_INPUT_DEPENDENCIES
# The following commented dependencies are determined at variably at build time. Can't do this here.
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/llcommon.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapr-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libaprutil-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libapriconv-1.dll
${SHARED_LIB_STAGING_DIR}/Release/glod.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/glod.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/glod.dll
- ${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll
- ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll
${SHARED_LIB_STAGING_DIR}/Release/openjpeg.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjpeg.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/openjpegd.dll
${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll
- ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll
${SHARED_LIB_STAGING_DIR}/Release/uriparser.dll
${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/uriparser.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/SLVoice.exe
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/libsndfile-1.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxoal.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ca-bundle.crt
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
+ #${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxoal.dll
+ ${AUTOBUILD_INSTALL_DIR}/ca-bundle.crt
${GOOGLE_PERF_TOOLS_SOURCE}
${CMAKE_CURRENT_SOURCE_DIR}/licenses-win32.txt
${CMAKE_CURRENT_SOURCE_DIR}/featuretable.txt
- ${CMAKE_CURRENT_SOURCE_DIR}/featuretable_xp.txt
${viewer_APPSETTINGS_FILES}
SLPlugin
media_plugin_cef
media_plugin_libvlc
media_plugin_example
- winmm_shim
)
if (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp_x64.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk_x64.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp_x64.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll
)
else (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/ortp.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/vivoxsdk.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/ortp.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll
${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll
)
@@ -1878,8 +1807,8 @@ if (WINDOWS)
if (OPENAL)
list(APPEND COPY_INPUT_DEPENDENCIES
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/OpenAL32.dll
- ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/alut.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/OpenAL32.dll
+ ${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/alut.dll
)
endif (OPENAL)
@@ -1974,7 +1903,6 @@ if (WINDOWS)
add_custom_target(llpackage ALL DEPENDS
${CMAKE_CFG_INTDIR}/touched.bat
- windows-setup-build-all
)
# temporarily disable packaging of event_host until hg subrepos get
# sorted out on the parabuild cluster...
@@ -2023,60 +1951,39 @@ 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}
+ ll::glod
+ ll::ndof
+ ${SMARTHEAP_LIBRARY}
+ ${UI_LIBRARIES}
+ ${WINDOWS_LIBRARIES}
+ lllogin
+ llprimitive
+ llappearance
+ ${LLPHYSICS_LIBRARIES}
+ ${LLPHYSICSEXTENSIONS_LIBRARIES}
+ ll::bugsplat
+ )
-if (USE_BUGSPLAT)
- target_link_libraries(${VIEWER_BINARY_NAME}
- ${BUGSPLAT_LIBRARIES}
- )
-endif (USE_BUGSPLAT)
+if( TARGET ll::nvapi )
+ target_link_libraries(${VIEWER_BINARY_NAME} ll::nvapi )
+endif()
set(ARTWORK_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH
"Path to artwork files.")
@@ -2386,10 +2293,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 +2310,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 +2317,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 +2355,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 +2393,6 @@ if (LL_TESTS)
llviewernetwork.cpp
)
-
LL_ADD_INTEGRATION_TEST(llslurl
"${llslurl_test_sources}"
"${test_libs}"
@@ -2531,15 +2415,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/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index ae3ed56b3d..1885bee7da 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -75,7 +75,7 @@ class ViewerManifest(LLManifest):
# include the entire shaders directory recursively
self.path("shaders")
# include the extracted list of contributors
- contributions_path = "../../doc/contributions.txt"
+ contributions_path = os.path.join(self.args['source'], "..", "..", "doc", "contributions.txt")
contributor_names = self.extract_names(contributions_path)
self.put_in_file(contributor_names.encode(), "contributors.txt", src=contributions_path)
@@ -504,7 +504,7 @@ class WindowsManifest(ViewerManifest):
# Get shared libs from the shared libs staging directory
with self.prefix(src=os.path.join(self.args['build'], os.pardir,
- 'sharedlibs', self.args['configuration'])):
+ 'sharedlibs', self.args['buildtype'])):
# Mesh 3rd party libs needed for auto LOD and collada reading
try:
diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt
index 084aa8d9f7..1c2961a18a 100644
--- a/indra/test/CMakeLists.txt
+++ b/indra/test/CMakeLists.txt
@@ -5,35 +5,12 @@ 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)
include(bugsplat)
include(GoogleMock)
-include_directories(
- ${LLCOMMON_INCLUDE_DIRS}
- ${LLCOREHTTP_INCLUDE_DIRS}
- ${LLDATABASE_INCLUDE_DIRS}
- ${LLMATH_INCLUDE_DIRS}
- ${LLMESSAGE_INCLUDE_DIRS}
- ${LLINVENTORY_INCLUDE_DIRS}
- ${LLFILESYSTEM_INCLUDE_DIRS}
- ${LLXML_INCLUDE_DIRS}
- ${LSCRIPT_INCLUDE_DIRS}
- ${GOOGLEMOCK_INCLUDE_DIRS}
- ${TUT_INCLUDE_DIR}
- )
-include_directories(SYSTEM
- ${LLCOMMON_SYSTEM_INCLUDE_DIRS}
- ${LLXML_SYSTEM_INCLUDE_DIRS}
- )
-
set(test_SOURCE_FILES
io.cpp
llapp_tut.cpp
@@ -88,27 +65,19 @@ 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
+ ll::googlemock
+ ${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}")
diff --git a/scripts/packages-formatter.py b/scripts/packages-formatter.py
index ff7c892577..4449111e46 100755
--- a/scripts/packages-formatter.py
+++ b/scripts/packages-formatter.py
@@ -34,6 +34,7 @@ import argparse
parser = argparse.ArgumentParser(description='Format dependency version and copyright information for the viewer About box content')
parser.add_argument('channel', help='viewer channel name')
parser.add_argument('version', help='viewer version number')
+parser.add_argument('install_dir', help="install dir of packages")
args = parser.parse_args()
_autobuild=os.getenv('AUTOBUILD', 'autobuild')
@@ -74,8 +75,8 @@ def add_info(key, pkg, lines):
else:
dups[key].add(pkg)
-versions=autobuild('install', '--versions')
-copyrights=autobuild('install', '--copyrights')
+versions=autobuild('install', '--versions', '--install-dir', args.install_dir)
+copyrights=autobuild('install', '--copyrights', '--install-dir', args.install_dir)
viewer_copyright = copyrights.readline() # first line is the copyright for the viewer itself
# Two different autobuild outputs, but we treat them essentially the same way: