summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/00-Common.cmake25
-rw-r--r--indra/cmake/APR.cmake51
-rw-r--r--indra/cmake/Atmosphere.cmake5
-rw-r--r--indra/cmake/Audio.cmake33
-rw-r--r--indra/cmake/Boost.cmake103
-rw-r--r--indra/cmake/CEFPlugin.cmake13
-rw-r--r--indra/cmake/CMakeLists.txt17
-rw-r--r--indra/cmake/CURL.cmake14
-rw-r--r--indra/cmake/EXPAT.cmake12
-rw-r--r--indra/cmake/FMODSTUDIO.cmake26
-rw-r--r--indra/cmake/FreeType.cmake10
-rw-r--r--indra/cmake/GLOD.cmake11
-rw-r--r--indra/cmake/Hunspell.cmake14
-rw-r--r--indra/cmake/JPEG.cmake15
-rw-r--r--indra/cmake/JsonCpp.cmake17
-rw-r--r--indra/cmake/LLAddBuildTest.cmake38
-rw-r--r--indra/cmake/LLAppearance.cmake12
-rw-r--r--indra/cmake/LLAudio.cmake7
-rw-r--r--indra/cmake/LLCharacter.cmake7
-rw-r--r--indra/cmake/LLCommon.cmake35
-rw-r--r--indra/cmake/LLCoreHttp.cmake14
-rw-r--r--indra/cmake/LLCrashLogger.cmake7
-rw-r--r--indra/cmake/LLFileSystem.cmake7
-rw-r--r--indra/cmake/LLImage.cmake9
-rw-r--r--indra/cmake/LLImageJ2COJ.cmake5
-rw-r--r--indra/cmake/LLInventory.cmake7
-rw-r--r--indra/cmake/LLKDU.cmake18
-rw-r--r--indra/cmake/LLLogin.cmake7
-rw-r--r--indra/cmake/LLMessage.cmake13
-rw-r--r--indra/cmake/LLPhysicsExtensions.cmake16
-rw-r--r--indra/cmake/LLPlugin.cmake14
-rw-r--r--indra/cmake/LLPrimitive.cmake66
-rw-r--r--indra/cmake/LLRender.cmake20
-rw-r--r--indra/cmake/LLUI.cmake7
-rw-r--r--indra/cmake/LLWindow.cmake12
-rw-r--r--indra/cmake/LLXML.cmake14
-rw-r--r--indra/cmake/LibVLCPlugin.cmake17
-rw-r--r--indra/cmake/MediaPluginBase.cmake8
-rw-r--r--indra/cmake/NDOF.cmake14
-rw-r--r--indra/cmake/NGHTTP2.cmake16
-rw-r--r--indra/cmake/NVAPI.cmake3
-rw-r--r--indra/cmake/OPENAL.cmake12
-rw-r--r--indra/cmake/OpenJPEG.cmake18
-rw-r--r--indra/cmake/OpenSSL.cmake21
-rw-r--r--indra/cmake/PNG.cmake26
-rw-r--r--indra/cmake/Prebuilt.cmake11
-rw-r--r--indra/cmake/URIPARSER.cmake29
-rw-r--r--indra/cmake/XmlRpcEpi.cmake17
-rw-r--r--indra/cmake/ZLIBNG.cmake33
-rw-r--r--indra/cmake/bugsplat.cmake10
50 files changed, 324 insertions, 612 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0ab7fa2456..45c81b1b30 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -70,12 +70,6 @@ if (WINDOWS)
if( ADDRESS_SIZE EQUAL 32 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
endif()
- set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo"
- CACHE STRING "C++ compiler release-with-debug options" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE
- "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo"
- CACHE STRING "C++ compiler release options" FORCE)
# zlib has assembly-language object files incompatible with SAFESEH
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099")
@@ -87,15 +81,16 @@ if (WINDOWS)
# /DDOM_DYNAMIC # For shared library colladadom
)
add_compile_options(
- /GS
- /TP
- /W3
- /c
- /Zc:forScope
- /nologo
- /Oy-
-# /arch:SSE2
- /fp:fast
+
+ /Zo
+ /GS
+ /TP
+ /W3
+ /c
+ /Zc:forScope
+ /nologo
+ /Oy-
+ /fp:fast
)
# Nicky: x64 implies SSE2
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 9b64bc6160..5a7c504af8 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -1,11 +1,11 @@
include(Linking)
include(Prebuilt)
-set(APR_FIND_QUIETLY ON)
-set(APR_FIND_REQUIRED ON)
+if( TARGET apr::apr )
+ return()
+endif()
-set(APRUTIL_FIND_QUIETLY ON)
-set(APRUTIL_FIND_REQUIRED ON)
+create_target( apr::apr)
if (USESYSTEMLIBS)
include(FindAPR)
@@ -17,18 +17,11 @@ else (USESYSTEMLIBS)
else (LLCOMMON_LINK_SHARED)
set(APR_selector "")
endif (LLCOMMON_LINK_SHARED)
- set(APR_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
- )
- set(APRICONV_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
- )
- set(APRUTIL_LIBRARIES
- debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
- optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
- )
+ set_target_libraries( apr::apr
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
+ ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
+ )
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
@@ -37,18 +30,20 @@ else (USESYSTEMLIBS)
set(APR_selector "a")
set(APRUTIL_selector "a")
endif (LLCOMMON_LINK_SHARED)
- set(APR_LIBRARIES libapr-1.${APR_selector})
- set(APRUTIL_LIBRARIES libaprutil-1.${APRUTIL_selector})
- set(APRICONV_LIBRARIES iconv)
+
+ set_target_libraries( apr::apr
+ libapr-1.${APR_selector}
+ libaprutil-1.${APRUTIL_selector}
+ iconv
+ )
else (WINDOWS)
- set(APR_LIBRARIES apr-1)
- set(APRUTIL_LIBRARIES aprutil-1)
- set(APRICONV_LIBRARIES iconv)
+ set_target_libraries( apr::apr
+ apr-1
+ aprutil-1
+ iconv
+ uuid
+ rt
+ )
endif (WINDOWS)
- set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
-
- if (LINUX)
- list(APPEND APRUTIL_LIBRARIES uuid)
- list(APPEND APRUTIL_LIBRARIES rt)
- endif (LINUX)
+ set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 )
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/Atmosphere.cmake b/indra/cmake/Atmosphere.cmake
deleted file mode 100644
index 9c14df2a11..0000000000
--- a/indra/cmake/Atmosphere.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- cmake -*-
-include(Prebuilt)
-use_prebuilt_binary(libatmosphere)
-set(LIBATMOSPHERE_LIBRARIES atmosphere)
-set(LIBATMOSPHERE_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/atmosphere)
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index f95439245a..bc11e62de5 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if(TARGET vorbis::vorbis)
+ return()
+endif()
+create_target(vorbis::vorbis)
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(OGG REQUIRED ogg)
@@ -9,34 +14,12 @@ if (USESYSTEMLIBS)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
else (USESYSTEMLIBS)
use_prebuilt_binary(ogg_vorbis)
- set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
- set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
- set(VORBISFILE_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS})
+ set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include )
if (WINDOWS)
- set(OGG_LIBRARIES
- optimized ogg_static
- debug ogg_static_d)
- set(VORBIS_LIBRARIES
- optimized vorbis_static
- debug vorbis_static_d)
- set(VORBISENC_LIBRARIES
- optimized vorbisenc_static
- debug vorbisenc_static_d)
- set(VORBISFILE_LIBRARIES
- optimized vorbisfile_static
- debug vorbisfile_static_d)
+ set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static )
else (WINDOWS)
- set(OGG_LIBRARIES ogg)
- set(VORBIS_LIBRARIES vorbis)
- set(VORBISENC_LIBRARIES vorbisenc)
- set(VORBISFILE_LIBRARIES vorbisfile)
+ set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile )
endif (WINDOWS)
endif (USESYSTEMLIBS)
-link_directories(
- ${VORBIS_LIBRARY_DIRS}
- ${VORBISENC_LIBRARY_DIRS}
- ${VORBISFILE_LIBRARY_DIRS}
- ${OGG_LIBRARY_DIRS}
- )
diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake
index 0a61e33532..00bfedfb71 100644
--- a/indra/cmake/Boost.cmake
+++ b/indra/cmake/Boost.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET boost::boost )
+ return()
+endif()
+create_target( boost::boost )
+
set(Boost_FIND_QUIETLY ON)
set(Boost_FIND_REQUIRED ON)
@@ -24,80 +29,34 @@ else (USESYSTEMLIBS)
set(addrsfx "-x${ADDRESS_SIZE}")
if (WINDOWS)
- set(BOOST_CONTEXT_LIBRARY
- optimized libboost_context-mt${addrsfx}
- debug libboost_context-mt${addrsfx}-gd)
- set(BOOST_FIBER_LIBRARY
- optimized libboost_fiber-mt${addrsfx}
- debug libboost_fiber-mt${addrsfx}-gd)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized libboost_filesystem-mt${addrsfx}
- debug libboost_filesystem-mt${addrsfx}-gd)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized libboost_program_options-mt${addrsfx}
- debug libboost_program_options-mt${addrsfx}-gd)
- set(BOOST_REGEX_LIBRARY
- optimized libboost_regex-mt${addrsfx}
- debug libboost_regex-mt${addrsfx}-gd)
- set(BOOST_SIGNALS_LIBRARY
- optimized libboost_signals-mt${addrsfx}
- debug libboost_signals-mt${addrsfx}-gd)
- set(BOOST_SYSTEM_LIBRARY
- optimized libboost_system-mt${addrsfx}
- debug libboost_system-mt${addrsfx}-gd)
- set(BOOST_THREAD_LIBRARY
- optimized libboost_thread-mt${addrsfx}
- debug libboost_thread-mt${addrsfx}-gd)
+ set_target_libraries( boost::boost
+ libboost_context-mt${addrsfx}
+ libboost_fiber-mt${addrsfx}
+ libboost_filesystem-mt${addrsfx}
+ libboost_program_options-mt${addrsfx}
+ libboost_regex-mt${addrsfx}
+ libboost_system-mt${addrsfx}
+ libboost_thread-mt${addrsfx})
elseif (LINUX)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx}-d)
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx}-d)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx}-d)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx}-d)
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx}-d)
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx}-d)
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx}-d)
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx}-d)
+ set_target_libraries( boost::boost
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_signals-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
elseif (DARWIN)
- set(BOOST_CONTEXT_LIBRARY
- optimized boost_context-mt${addrsfx}
- debug boost_context-mt${addrsfx}-d)
- set(BOOST_FIBER_LIBRARY
- optimized boost_fiber-mt${addrsfx}
- debug boost_fiber-mt${addrsfx}-d)
- set(BOOST_FILESYSTEM_LIBRARY
- optimized boost_filesystem-mt${addrsfx}
- debug boost_filesystem-mt${addrsfx}-d)
- set(BOOST_PROGRAM_OPTIONS_LIBRARY
- optimized boost_program_options-mt${addrsfx}
- debug boost_program_options-mt${addrsfx}-d)
- set(BOOST_REGEX_LIBRARY
- optimized boost_regex-mt${addrsfx}
- debug boost_regex-mt${addrsfx}-d)
- set(BOOST_SIGNALS_LIBRARY
- optimized boost_signals-mt${addrsfx}
- debug boost_signals-mt${addrsfx}-d)
- set(BOOST_SYSTEM_LIBRARY
- optimized boost_system-mt${addrsfx}
- debug boost_system-mt${addrsfx}-d)
- set(BOOST_THREAD_LIBRARY
- optimized boost_thread-mt${addrsfx}
- debug boost_thread-mt${addrsfx}-d)
+ set_target_libraries( boost::boost
+ boost_context-mt${addrsfx}
+ boost_fiber-mt${addrsfx}
+ boost_filesystem-mt${addrsfx}
+ boost_program_options-mt${addrsfx}
+ boost_regex-mt${addrsfx}
+ boost_signals-mt${addrsfx}
+ boost_system-mt${addrsfx}
+ boost_thread-mt${addrsfx})
endif (WINDOWS)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake
index 7d8bfb1b0f..706730b226 100644
--- a/indra/cmake/CEFPlugin.cmake
+++ b/indra/cmake/CEFPlugin.cmake
@@ -2,18 +2,21 @@
include(Linking)
include(Prebuilt)
+if(TARGET cef::cef)
+ return()
+endif()
+create_target( cef::cef )
+
if (USESYSTEMLIBS)
set(CEFPLUGIN OFF CACHE BOOL
"CEFPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS)
use_prebuilt_binary(dullahan)
- set(CEFPLUGIN ON CACHE BOOL
- "CEFPLUGIN support for the llplugin/llmedia test apps.")
- set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef)
+ set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef)
endif (USESYSTEMLIBS)
if (WINDOWS)
- set(CEF_PLUGIN_LIBRARIES
+ set_target_libraries( cef::cef
libcef.lib
libcef_dll_wrapper.lib
dullahan.lib
@@ -29,7 +32,7 @@ elseif (DARWIN)
message(FATAL_ERROR "CEF not found")
endif()
- set(CEF_PLUGIN_LIBRARIES
+ set_target_libraries( cef::cef
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
${APPKIT_LIBRARY}
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 6778e90ca8..812e35390f 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -39,37 +39,22 @@ set(cmake_SOURCE_FILES
GLEXT.cmake
GLH.cmake
GLOD.cmake
-## GStreamer010Plugin.cmake
GoogleMock.cmake
Havok.cmake
Hunspell.cmake
- JPEG.cmake
- JsonCpp.cmake
+ JsonCpp.cmake
LLAddBuildTest.cmake
LLAppearance.cmake
LLAudio.cmake
- LLCharacter.cmake
LLCommon.cmake
- LLCrashLogger.cmake
LLImage.cmake
- LLImageJ2COJ.cmake
- LLInventory.cmake
LLKDU.cmake
- LLLogin.cmake
- LLMath.cmake
- LLMessage.cmake
LLPhysicsExtensions.cmake
- LLPlugin.cmake
LLPrimitive.cmake
- LLRender.cmake
LLSharedLibs.cmake
LLTestCommand.cmake
- LLUI.cmake
- LLFileSystem.cmake
LLWindow.cmake
- LLXML.cmake
Linking.cmake
- MediaPluginBase.cmake
NDOF.cmake
OPENAL.cmake
OpenGL.cmake
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index 04afae594d..d91eb2e2fd 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,19 +1,19 @@
# -*- cmake -*-
include(Prebuilt)
-set(CURL_FIND_QUIETLY ON)
-set(CURL_FIND_REQUIRED ON)
+if( TARGET libcurl::libcurl )
+ return()
+endif()
+create_target(libcurl::libcurl)
if (USESYSTEMLIBS)
include(FindCURL)
else (USESYSTEMLIBS)
use_prebuilt_binary(curl)
if (WINDOWS)
- set(CURL_LIBRARIES
- debug libcurld.lib
- optimized libcurl.lib)
+ set_target_libraries(libcurl::libcurl libcurl.lib)
else (WINDOWS)
- set(CURL_LIBRARIES libcurl.a)
+ set_target_libraries(libcurl::libcurl libcurl.a)
endif (WINDOWS)
- set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index cddc71b227..6f6503ca4d 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -1,23 +1,25 @@
# -*- cmake -*-
include(Prebuilt)
-set(EXPAT_FIND_QUIETLY ON)
-set(EXPAT_FIND_REQUIRED ON)
+if( TARGET expat::expat )
+ return()
+endif()
+create_target( expat::expat INTERFACE IMPORTED )
if (USESYSTEMLIBS)
include(FindEXPAT)
else (USESYSTEMLIBS)
use_prebuilt_binary(expat)
if (WINDOWS)
- set(EXPAT_LIBRARIES libexpatMT)
+ set_target_libraries( expat::expat libexpatMT )
set(EXPAT_COPY libexpatMT.dll)
else (WINDOWS)
- set(EXPAT_LIBRARIES expat)
+ set_target_libraries( expat::expat expat )
if (DARWIN)
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
else ()
set(EXPAT_COPY libexpat.so.1 libexpat.so)
endif ()
endif (WINDOWS)
- set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include )
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/FMODSTUDIO.cmake b/indra/cmake/FMODSTUDIO.cmake
index 8840354ac6..e8699cdecd 100644
--- a/indra/cmake/FMODSTUDIO.cmake
+++ b/indra/cmake/FMODSTUDIO.cmake
@@ -8,9 +8,17 @@ if (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (FMODSTUDIO)
+ if( TARGET fmodstudio::fmodstudio )
+ return()
+ endif()
+ create_target( fmodstudio::fmodstudio )
+ set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If the path have been specified in the arguments, use that
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
+
+ set_target_libraries(fmodstudio::fmodstudio ${FMODSTUDIO_LIBRARY})
+ set_target_include_dirs(fmodstudio::fmodstudio ${FMODSTUDIO_INCLUDE_DIR})
else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If not, we're going to try to get the package listed in autobuild.xml
# Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
@@ -18,21 +26,15 @@ if (FMODSTUDIO)
include(Prebuilt)
use_prebuilt_binary(fmodstudio)
if (WINDOWS)
- set(FMODSTUDIO_LIBRARY
- debug fmodL_vc
- optimized fmod_vc)
+ set_target_libraries( fmodstudio::fmodstudio fmod_vc)
elseif (DARWIN)
#despite files being called libfmod.dylib, we are searching for fmod
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
elseif (LINUX)
- set(FMODSTUDIO_LIBRARY
- debug fmodL
- optimized fmod)
+ set_target_libraries( fmodstudio::fmodstudio fmod)
endif (WINDOWS)
- set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
- set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
+
+ set_target_include_dirs(fmodstudio::fmodstudio ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
endif (FMODSTUDIO)
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index a36485f6d0..66f4ae0140 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -1,14 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET freetype::freetype )
+ return()
+endif()
+create_target( freetype::freetype)
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(FREETYPE REQUIRED freetype2)
else (USESYSTEMLIBS)
use_prebuilt_binary(freetype)
- set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2/)
- set(FREETYPE_LIBRARIES freetype)
+ set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/)
+ set_target_libraries( freetype::freetype freetype )
endif (USESYSTEMLIBS)
-link_directories(${FREETYPE_LIBRARY_DIRS})
diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake
index 6f42b44ab8..8d41db4ea3 100644
--- a/indra/cmake/GLOD.cmake
+++ b/indra/cmake/GLOD.cmake
@@ -1,11 +1,18 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET glod::glod )
+ return()
+endif()
+create_target( glod::glod )
+
if (NOT USESYSTEMLIBS)
use_prebuilt_binary(glod)
endif (NOT USESYSTEMLIBS)
+
+
set(GLODLIB ON CACHE BOOL "Using GLOD library")
-set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
-set(GLOD_LIBRARIES GLOD)
+set_target_include_dirs( glod::glod ${LIBS_PREBUILT_DIR}/include)
+set_target_libraries( glod::glod GLOD )
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index 06227b3fe2..970b06b81f 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,22 +1,24 @@
# -*- cmake -*-
include(Prebuilt)
-set(HUNSPELL_FIND_QUIETLY ON)
-set(HUNSPELL_FIND_REQUIRED ON)
+if( TARGET hunspell::hunspell )
+ return()
+endif()
+create_target( hunspell::hunspell )
if (USESYSTEMLIBS)
include(FindHUNSPELL)
else (USESYSTEMLIBS)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- set(HUNSPELL_LIBRARY libhunspell)
+ set_target_libraries( hunspell::hunspell libhunspell)
elseif(DARWIN)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
elseif(LINUX)
- set(HUNSPELL_LIBRARY hunspell-1.3)
+ set_target_libraries( hunspell::hunspell hunspell-1.3)
else()
message(FATAL_ERROR "Invalid platform")
endif()
- set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
+ set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
use_prebuilt_binary(dictionaries)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index d6da22aecc..7245ca7b36 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -2,19 +2,22 @@
include(Prebuilt)
include(Linking)
-set(JPEG_FIND_QUIETLY ON)
-set(JPEG_FIND_REQUIRED ON)
+
+if( TARGET jpeglib::jpeglib )
+ return()
+endif()
+create_target(jpeglib::jpeglib)
if (USESYSTEMLIBS)
include(FindJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(jpeglib)
if (LINUX)
- set(JPEG_LIBRARIES jpeg)
+ set_target_libraries( jpeglib::jpeglib jpeg)
elseif (DARWIN)
- set(JPEG_LIBRARIES jpeg)
+ set_target_libraries( jpeglib::jpeglib jpeg)
elseif (WINDOWS)
- set(JPEG_LIBRARIES jpeglib)
+ set_target_libraries( jpeglib::jpeglib jpeglib)
endif (LINUX)
- set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 079619adf8..14bfd32b6b 100644
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -1,22 +1,21 @@
# -*- cmake -*-
include(Prebuilt)
-
-set(JSONCPP_FIND_QUIETLY ON)
-set(JSONCPP_FIND_REQUIRED ON)
+if( TARGET jsoncpp::jsoncpp )
+ return()
+endif()
+create_target( jsoncpp::jsoncpp)
if (USESYSTEMLIBS)
include(FindJsonCpp)
else (USESYSTEMLIBS)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
- set(JSONCPP_LIBRARIES
- debug json_libmdd.lib
- optimized json_libmd.lib)
+ set_target_libraries( jsoncpp::jsoncpp json_libmd.lib )
elseif (DARWIN)
- set(JSONCPP_LIBRARIES libjson_darwin_libmt.a)
+ set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a )
elseif (LINUX)
- set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
+ set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
endif (WINDOWS)
- set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
+ set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4937c2a9d7..6860b1f316 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -36,30 +36,29 @@ INCLUDE(GoogleMock)
)
SET(alltest_DEP_TARGETS
# needed by the test harness itself
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
llcommon
)
+
+ SET(alltest_INCLUDE_DIRS
+ ${LIBS_OPEN_DIR}/test
+ ${GOOGLEMOCK_INCLUDE_DIRS}
+ )
+ SET(alltest_LIBRARIES
+ llcommon
+ ${GOOGLEMOCK_LIBRARIES}
+ ${PTHREAD_LIBRARY}
+ ${WINDOWS_LIBRARIES}
+ )
IF(NOT "${project}" STREQUAL "llmath")
# add llmath as a dep unless the tested module *is* llmath!
LIST(APPEND alltest_DEP_TARGETS
- llmath
- )
+ llmath
+ )
+ LIST(APPEND alltest_LIBRARIES
+ llmath
+ )
ENDIF(NOT "${project}" STREQUAL "llmath")
- SET(alltest_INCLUDE_DIRS
- ${LLMATH_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${LIBS_OPEN_DIR}/test
- ${GOOGLEMOCK_INCLUDE_DIRS}
- )
- SET(alltest_LIBRARIES
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- ${GOOGLEMOCK_LIBRARIES}
- ${PTHREAD_LIBRARY}
- ${WINDOWS_LIBRARIES}
- )
+
# Headers, for convenience in targets.
SET(alltest_HEADER_FILES
${CMAKE_SOURCE_DIR}/test/test.h
@@ -126,7 +125,8 @@ INCLUDE(GoogleMock)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}")
ENDIF(LL_TEST_VERBOSE)
# Add to project
- TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${alltest_DEP_TARGETS} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} )
+ TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} )
+ add_dependencies( PROJECT_${project}_TEST_${name} ${alltest_DEP_TARGETS})
# Compile-time Definitions
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS)
SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name}
diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake
index 675330ec72..99399d349a 100644
--- a/indra/cmake/LLAppearance.cmake
+++ b/indra/cmake/LLAppearance.cmake
@@ -2,26 +2,14 @@
include(Variables)
include(Boost)
-include(LLMessage)
include(LLCoreHttp)
-set(LLAPPEARANCE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llappearance
- )
-
if (BUILD_HEADLESS)
set(LLAPPEARANCE_HEADLESS_LIBRARIES
llappearanceheadless
)
endif (BUILD_HEADLESS)
-set(LLAPPEARANCE_LIBRARIES llappearance
- llmessage
- llcorehttp
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- )
diff --git a/indra/cmake/LLAudio.cmake b/indra/cmake/LLAudio.cmake
index 7c248dfc72..c842c69bfe 100644
--- a/indra/cmake/LLAudio.cmake
+++ b/indra/cmake/LLAudio.cmake
@@ -1,10 +1,3 @@
# -*- cmake -*-
include(Audio)
-
-set(LLAUDIO_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llaudio
- )
-
-# be exhaustive here
-set(LLAUDIO_LIBRARIES llaudio ${VORBISFILE_LIBRARIES} ${VORBIS_LIBRARIES} ${VORBISENC_LIBRARIES} ${OGG_LIBRARIES} ${OPENAL_LIBRARIES})
diff --git a/indra/cmake/LLCharacter.cmake b/indra/cmake/LLCharacter.cmake
deleted file mode 100644
index 9b2f5c4956..0000000000
--- a/indra/cmake/LLCharacter.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLCHARACTER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcharacter
- )
-
-set(LLCHARACTER_LIBRARIES llcharacter)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 9c8740793a..6d2468695f 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -4,36 +4,5 @@ include(APR)
include(Boost)
include(EXPAT)
include(ZLIBNG)
-
-set(LLCOMMON_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcommon
- ${APRUTIL_INCLUDE_DIR}
- ${APR_INCLUDE_DIR}
- )
-set(LLCOMMON_SYSTEM_INCLUDE_DIRS
- ${Boost_INCLUDE_DIRS}
- )
-
-if (LINUX)
- # In order to support using ld.gold on linux, we need to explicitely
- # specify all libraries that llcommon uses.
- # llcommon uses `clock_gettime' which is provided by librt on linux.
- set(LLCOMMON_LIBRARIES llcommon
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- rt
- )
-else (LINUX)
- set(LLCOMMON_LIBRARIES llcommon
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY} )
-endif (LINUX)
-
-set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
-if(LLCOMMON_LINK_SHARED)
- add_definitions(-DLL_COMMON_LINK_SHARED=1)
-endif(LLCOMMON_LINK_SHARED)
+include(JsonCpp)
+include(XmlRpcEpi) \ No newline at end of file
diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake
index 613453ab5d..a166c96043 100644
--- a/indra/cmake/LLCoreHttp.cmake
+++ b/indra/cmake/LLCoreHttp.cmake
@@ -2,16 +2,4 @@
include(CURL)
include(OpenSSL)
-include(Boost)
-
-set(LLCOREHTTP_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcorehttp
- ${CURL_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIRS}
- ${BOOST_INCLUDE_DIRS}
- )
-
-set(LLCOREHTTP_LIBRARIES llcorehttp
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY})
+include(NGHTTP2) \ No newline at end of file
diff --git a/indra/cmake/LLCrashLogger.cmake b/indra/cmake/LLCrashLogger.cmake
deleted file mode 100644
index f2cb83eb8b..0000000000
--- a/indra/cmake/LLCrashLogger.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLCRASHLOGGER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llcrashlogger
- )
-
-set(LLCRASHLOGGER_LIBRARIES llcrashlogger)
diff --git a/indra/cmake/LLFileSystem.cmake b/indra/cmake/LLFileSystem.cmake
deleted file mode 100644
index 2e6c42c30c..0000000000
--- a/indra/cmake/LLFileSystem.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLFILESYSTEM_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llfilesystem
- )
-
-set(LLFILESYSTEM_LIBRARIES llfilesystem)
diff --git a/indra/cmake/LLImage.cmake b/indra/cmake/LLImage.cmake
index ec3da89081..8e0b44dfe4 100644
--- a/indra/cmake/LLImage.cmake
+++ b/indra/cmake/LLImage.cmake
@@ -1,11 +1,4 @@
# -*- cmake -*-
-include(JPEG)
+#include(JPEG)
include(PNG)
-
-set(LLIMAGE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llimage
- ${JPEG_INCLUDE_DIRS}
- )
-
-set(LLIMAGE_LIBRARIES llimage)
diff --git a/indra/cmake/LLImageJ2COJ.cmake b/indra/cmake/LLImageJ2COJ.cmake
deleted file mode 100644
index 1bcf205f2d..0000000000
--- a/indra/cmake/LLImageJ2COJ.cmake
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- cmake -*-
-
-include(OpenJPEG)
-
-set(LLIMAGEJ2COJ_LIBRARIES llimagej2coj)
diff --git a/indra/cmake/LLInventory.cmake b/indra/cmake/LLInventory.cmake
deleted file mode 100644
index c3dc077a2b..0000000000
--- a/indra/cmake/LLInventory.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLINVENTORY_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llinventory
- )
-
-set(LLINVENTORY_LIBRARIES llinventory)
diff --git a/indra/cmake/LLKDU.cmake b/indra/cmake/LLKDU.cmake
index e478b01f84..25762ab066 100644
--- a/indra/cmake/LLKDU.cmake
+++ b/indra/cmake/LLKDU.cmake
@@ -7,15 +7,23 @@ if (INSTALL_PROPRIETARY)
set(USE_KDU ON CACHE BOOL "Use Kakadu library.")
endif (INSTALL_PROPRIETARY)
+if( TARGET kdu::kdu )
+ return()
+endif()
+create_target( kdu::kdu )
+
if (USE_KDU)
include(Prebuilt)
use_prebuilt_binary(kdu)
if (WINDOWS)
- set(KDU_LIBRARY kdu.lib)
+ set_target_libraries( kdu::kdu kdu.lib)
else (WINDOWS)
- set(KDU_LIBRARY libkdu.a)
+ set_target_libraries( kdu::kdu libkdu.a)
endif (WINDOWS)
- set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
- set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
- set(LLKDU_LIBRARIES llkdu)
+ set_target_libraries( kdu::kdu kdu.lib)
+
+ set_target_include_dirs( kdu::kdu
+ ${AUTOBUILD_INSTALL_DIR}/include/kdu
+ ${LIBS_OPEN_DIR}/llkdu
+ )
endif (USE_KDU)
diff --git a/indra/cmake/LLLogin.cmake b/indra/cmake/LLLogin.cmake
deleted file mode 100644
index 47d171876a..0000000000
--- a/indra/cmake/LLLogin.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLLOGIN_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/viewer_components/login
- )
-
-set(LLLOGIN_LIBRARIES lllogin)
diff --git a/indra/cmake/LLMessage.cmake b/indra/cmake/LLMessage.cmake
deleted file mode 100644
index 7be53ec0ec..0000000000
--- a/indra/cmake/LLMessage.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- cmake -*-
-
-include(CURL)
-include(OpenSSL)
-include(XmlRpcEpi)
-
-set(LLMESSAGE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llmessage
- ${CURL_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIRS}
- )
-
-set(LLMESSAGE_LIBRARIES llmessage)
diff --git a/indra/cmake/LLPhysicsExtensions.cmake b/indra/cmake/LLPhysicsExtensions.cmake
index e6afee762e..c46a04129a 100644
--- a/indra/cmake/LLPhysicsExtensions.cmake
+++ b/indra/cmake/LLPhysicsExtensions.cmake
@@ -10,6 +10,11 @@ if (INSTALL_PROPRIETARY)
set(HAVOK ON CACHE BOOL "Use Havok physics library")
endif (INSTALL_PROPRIETARY)
+if(TARGET llphysicsextensions )
+ return()
+endif()
+create_target(llphysicsextensions)
+
# Note that the use_prebuilt_binary macros below do not in fact include binaries;
# the llphysicsextensions_* packages are source only and are built here.
@@ -19,17 +24,14 @@ if (HAVOK)
include(Havok)
use_prebuilt_binary(llphysicsextensions_source)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions)
-
+ set_target_libraries( llphysicsextensions llphysicsextensions)
elseif (HAVOK_TPV)
use_prebuilt_binary(llphysicsextensions_tpv)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv)
-
+ set_target_libraries( llphysicsextensions llphysicsextensions_tpv)
else (HAVOK)
use_prebuilt_binary(llphysicsextensions_stub)
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
- set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensionsstub)
-
+ set_target_libraries( llphysicsextensions llphysicsextensionsstub)
endif (HAVOK)
-set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
+set_target_include_dirs(llphysicsextensions ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake
deleted file mode 100644
index 399cb332dd..0000000000
--- a/indra/cmake/LLPlugin.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- cmake -*-
-
-
-set(LLPLUGIN_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llplugin
- )
-
-if (LINUX)
- # In order to support using ld.gold on linux, we need to explicitely
- # specify all libraries that llplugin uses.
- set(LLPLUGIN_LIBRARIES llplugin pthread)
-else (LINUX)
- set(LLPLUGIN_LIBRARIES llplugin)
-endif (LINUX)
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 4e34951215..799afc77d1 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -4,49 +4,41 @@
include(Prebuilt)
include(Boost)
+if( TARGET colladadom::colladadom )
+ return()
+endif()
+
use_prebuilt_binary(colladadom)
use_prebuilt_binary(minizip-ng) # needed for colladadom
use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml2)
-set(LLPRIMITIVE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llprimitive
- )
+create_target( pcre::pcre )
+set_target_libraries( pcre::pcre pcrecpp pcre )
+
+create_target( minizip-ng::minizip-ng )
if (WINDOWS)
- set(LLPRIMITIVE_LIBRARIES
- debug llprimitive
- optimized llprimitive
- debug libcollada14dom23-sd
- optimized libcollada14dom23-s
- libxml2_a
- debug pcrecppd
- optimized pcrecpp
- debug pcred
- optimized pcre
- debug libminizip
- optimized libminizip
- ${BOOST_SYSTEM_LIBRARIES}
+ set_target_libraries( minizip-ng::minizip-ng libminizip )
+else()
+ set_target_libraries( minizip-ng::minizip-ng minizip )
+endif()
+
+create_target( libxml::libxml )
+if (WINDOWS)
+ set_target_libraries( libxml::libxml libxml2_a)
+else()
+ set_target_libraries( libxml::libxml xml2)
+endif()
+
+create_target( colladadom::colladadom )
+set_target_include_dirs( colladadom::colladadom
+ ${LIBS_PREBUILT_DIR}/include/collada
+ ${LIBS_PREBUILT_DIR}/include/collada/1.4
)
+if (WINDOWS)
+ set_target_libraries(colladadom::colladadom libcollada14dom23-s libxml::libxml minizip-ng::minizip-ng )
elseif (DARWIN)
- set(LLPRIMITIVE_LIBRARIES
- llprimitive
- debug collada14dom-d
- optimized collada14dom
- minizip # for collada libminizip.a
- xml2
- pcrecpp
- pcre
- iconv # Required by libxml2
- )
+ set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng)
elseif (LINUX)
- set(LLPRIMITIVE_LIBRARIES
- llprimitive
- debug collada14dom-d
- optimized collada14dom
- minizip
- xml2
- pcrecpp
- pcre
- )
-endif (WINDOWS)
-
+ set_target_libraries(colladadom::colladadom collada14dom libxml::libxml minizip-ng::minizip-ng)
+endif() \ No newline at end of file
diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake
deleted file mode 100644
index 868922451f..0000000000
--- a/indra/cmake/LLRender.cmake
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- cmake -*-
-
-include(Variables)
-include(FreeType)
-include(GLH)
-
-set(LLRENDER_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llrender
- ${GLH_INCLUDE_DIR}
- )
-
-if (BUILD_HEADLESS)
- set(LLRENDER_HEADLESS_LIBRARIES
- llrenderheadless
- )
-endif (BUILD_HEADLESS)
-set(LLRENDER_LIBRARIES
- llrender
- )
-
diff --git a/indra/cmake/LLUI.cmake b/indra/cmake/LLUI.cmake
deleted file mode 100644
index 34de57108b..0000000000
--- a/indra/cmake/LLUI.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- cmake -*-
-
-set(LLUI_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llui
- )
-
-set(LLUI_LIBRARIES llui)
diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake
index 80af7ff2ab..ac14ead0de 100644
--- a/indra/cmake/LLWindow.cmake
+++ b/indra/cmake/LLWindow.cmake
@@ -26,17 +26,5 @@ if (SDL_FOUND)
include_directories(${SDL_INCLUDE_DIR})
endif (SDL_FOUND)
-set(LLWINDOW_INCLUDE_DIRS
- ${GLEXT_INCLUDE_DIR}
- ${LIBS_OPEN_DIR}/llwindow
- )
-if (BUILD_HEADLESS)
- set(LLWINDOW_HEADLESS_LIBRARIES
- llwindowheadless
- )
-endif (BUILD_HEADLESS)
- set(LLWINDOW_LIBRARIES
- llwindow
- )
diff --git a/indra/cmake/LLXML.cmake b/indra/cmake/LLXML.cmake
deleted file mode 100644
index b093c76297..0000000000
--- a/indra/cmake/LLXML.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-# -*- cmake -*-
-
-include(Boost)
-include(EXPAT)
-
-set(LLXML_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/llxml
- ${EXPAT_INCLUDE_DIRS}
- )
-set(LLXML_SYSTEM_INCLUDE_DIRS
- ${Boost_INCLUDE_DIRS}
- )
-
-set(LLXML_LIBRARIES llxml)
diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake
index df829b615a..a7acd64d62 100644
--- a/indra/cmake/LibVLCPlugin.cmake
+++ b/indra/cmake/LibVLCPlugin.cmake
@@ -2,6 +2,11 @@
include(Linking)
include(Prebuilt)
+if( TARGET libvlc::libvlc )
+ return()
+endif()
+create_target( libvlc::libvlc )
+
if (USESYSTEMLIBS)
set(LIBVLCPLUGIN OFF CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
@@ -13,18 +18,18 @@ else (USESYSTEMLIBS)
endif (USESYSTEMLIBS)
if (WINDOWS)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.lib
- libvlccore.lib
+ set_target_libraries( libvlc::libvlc
+ libvlc.lib
+ libvlccore.lib
)
elseif (DARWIN)
- set(VLC_PLUGIN_LIBRARIES
- libvlc.dylib
+ set_target_libraries( libvlc::libvlc
+`` libvlc.dylib
libvlccore.dylib
)
elseif (LINUX)
# Specify a full path to make sure we get a static link
- set(VLC_PLUGIN_LIBRARIES
+ set_target_libraries( liblvc::libvlc
${LIBS_PREBUILT_DIR}/lib/libvlc.a
${LIBS_PREBUILT_DIR}/lib/libvlccore.a
)
diff --git a/indra/cmake/MediaPluginBase.cmake b/indra/cmake/MediaPluginBase.cmake
deleted file mode 100644
index 2be035b641..0000000000
--- a/indra/cmake/MediaPluginBase.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-# -*- cmake -*-
-
-
-set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
- ${LIBS_OPEN_DIR}/media_plugins/base/
- )
-
-set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake
index 388df16a52..f22e2246aa 100644
--- a/indra/cmake/NDOF.cmake
+++ b/indra/cmake/NDOF.cmake
@@ -3,6 +3,11 @@ include(Prebuilt)
set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
+if ( TARGET ndof::ndof )
+ return()
+endif()
+create_target( ndof::ndof )
+
if (NDOF)
if (USESYSTEMLIBS)
set(NDOF_FIND_REQUIRED ON)
@@ -15,22 +20,17 @@ if (NDOF)
endif (WINDOWS OR DARWIN)
if (WINDOWS)
- set(NDOF_LIBRARY libndofdev)
+ set_target_libraries( ndof::ndof libndofdev)
elseif (DARWIN OR LINUX)
- set(NDOF_LIBRARY ndofdev)
+ set_target_libraries( ndof::ndof ndofdev)
endif (WINDOWS)
-
- set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
set(NDOF_FOUND 1)
endif (USESYSTEMLIBS)
endif (NDOF)
if (NDOF_FOUND)
add_definitions(-DLIB_NDOF=1)
- include_directories(${NDOF_INCLUDE_DIR})
else (NDOF_FOUND)
message(STATUS "Building without N-DoF joystick support")
- set(NDOF_INCLUDE_DIR "")
- set(NDOF_LIBRARY "")
endif (NDOF_FOUND)
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index df191ff3c1..5215af5dd9 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -1,20 +1,20 @@
include(Prebuilt)
-set(NGHTTP2_FIND_QUIETLY ON)
-set(NGHTTP2_FIND_REQUIRED ON)
+if( TARGET nghttp2::nghttp2 )
+ return()
+endif()
+create_target( nghttp2::nghttp2 )
if (USESYSTEMLIBS)
include(FindNGHTTP2)
else (USESYSTEMLIBS)
use_prebuilt_binary(nghttp2)
if (WINDOWS)
- set(NGHTTP2_LIBRARIES
- ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib
- )
+ set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
elseif (DARWIN)
- set(NGHTTP2_LIBRARIES libnghttp2.dylib)
+ set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib)
else (WINDOWS)
- set(NGHTTP2_LIBRARIES libnghttp2.a)
+ set_target_libraries( nghttp2::nghttp2 libnghttp2.a )
endif (WINDOWS)
- set(NGHTTP2_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/nghttp2)
+ set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake
index 105f442a30..1eea96784f 100644
--- a/indra/cmake/NVAPI.cmake
+++ b/indra/cmake/NVAPI.cmake
@@ -5,8 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.")
if (NVAPI)
if (WINDOWS)
+ create_target( nvapi::nvapi )
+ set_target_libraries( nvapi::nvapi nvapi)
use_prebuilt_binary(nvapi)
- set(NVAPI_LIBRARY nvapi)
else (WINDOWS)
set(NVAPI_LIBRARY "")
endif (WINDOWS)
diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake
index 1bbfff6f98..ab2d258a12 100644
--- a/indra/cmake/OPENAL.cmake
+++ b/indra/cmake/OPENAL.cmake
@@ -9,7 +9,12 @@ else (LINUX)
endif (LINUX)
if (OPENAL)
- set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL")
+ if( TARGET openal::openal )
+ return()
+ endif()
+ create_target( openal::openal )
+ set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
+
if (USESYSTEMLIBS)
include(FindPkgConfig)
include(FindOpenAL)
@@ -18,13 +23,14 @@ if (OPENAL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openal)
endif (USESYSTEMLIBS)
+
if(WINDOWS)
- set(OPENAL_LIBRARIES
+ set_target_libraries( openal::openal
OpenAL32
alut
)
else()
- set(OPENAL_LIBRARIES
+ set_target_libraries( openal::openal
openal
alut
)
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake
index bf0bde2ba7..67292250bb 100644
--- a/indra/cmake/OpenJPEG.cmake
+++ b/indra/cmake/OpenJPEG.cmake
@@ -1,22 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
-set(OPENJPEG_FIND_QUIETLY ON)
-set(OPENJPEG_FIND_REQUIRED ON)
+if( TARGET openjpeg::openjpeg )
+ return()
+endif()
+create_target( openjpeg::openjpeg )
if (USESYSTEMLIBS)
include(FindOpenJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
- if(WINDOWS)
- # Windows has differently named release and debug openjpeg(d) libs.
- set(OPENJPEG_LIBRARIES
- debug openjpegd
- optimized openjpeg)
- else(WINDOWS)
- set(OPENJPEG_LIBRARIES openjpeg)
- endif(WINDOWS)
-
- set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg)
+ set_target_libraries(openjpeg::openjpeg openjpeg )
+ set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 32400f5e4e..80b419c36e 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,23 +1,22 @@
# -*- cmake -*-
include(Prebuilt)
-set(OpenSSL_FIND_QUIETLY ON)
-set(OpenSSL_FIND_REQUIRED ON)
+if( TARGET openssl::openssl )
+ return()
+endif()
+create_target(openssl::openssl)
if (USESYSTEMLIBS)
include(FindOpenSSL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openssl)
if (WINDOWS)
- set(OPENSSL_LIBRARIES libssl libcrypto)
- else (WINDOWS)
- set(OPENSSL_LIBRARIES ssl crypto)
+ set_target_libraries(openssl::openssl libssl libcrypto)
+ elseif (LINUX)
+ set_target_libraries(openssl::openssl ssl crypto dl)
+ else()
+ set_target_libraries(openssl::openssl ssl crypto)
endif (WINDOWS)
- set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
-if (LINUX)
- set(CRYPTO_LIBRARIES crypto dl)
-elseif (DARWIN)
- set(CRYPTO_LIBRARIES crypto)
-endif (LINUX)
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake
index 248a875a19..54b2438425 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -1,6 +1,11 @@
# -*- cmake -*-
include(Prebuilt)
+if( TARGET libpng::libpng )
+ return()
+endif()
+create_target(libpng::libpng)
+
set(PNG_FIND_QUIETLY ON)
set(PNG_FIND_REQUIRED ON)
@@ -9,26 +14,9 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(libpng)
if (WINDOWS)
- set(PNG_LIBRARIES libpng16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
- elseif(DARWIN)
- set(PNG_LIBRARIES png16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
+ set_target_libraries(libpng::libpng libpng16)
else()
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-lpng16 here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(PNG_PRELOAD_ARCHIVES -Wl,--whole-archive png16 -Wl,--no-whole-archive)
set(PNG_LIBRARIES png16)
- set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
endif()
+ set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake
index 33a6d76916..9125f2f80f 100644
--- a/indra/cmake/Prebuilt.cmake
+++ b/indra/cmake/Prebuilt.cmake
@@ -61,4 +61,15 @@ macro (use_prebuilt_binary _binary)
endif (NOT USESYSTEMLIBS_${_binary})
endmacro (use_prebuilt_binary _binary)
+function( create_target name )
+ add_library( ${name} INTERFACE IMPORTED )
+endfunction()
+function( set_target_libraries target )
+ set_property( TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES ${ARGN} )
+endfunction()
+function( set_target_include_dirs target)
+ set_property( TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ARGN} )
+endfunction()
+
+
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
diff --git a/indra/cmake/URIPARSER.cmake b/indra/cmake/URIPARSER.cmake
index ecc5b74ef1..55b38fca28 100644
--- a/indra/cmake/URIPARSER.cmake
+++ b/indra/cmake/URIPARSER.cmake
@@ -1,7 +1,9 @@
# -*- cmake -*-
-set(URIPARSER_FIND_QUIETLY ON)
-set(URIPARSER_FIND_REQUIRED ON)
+if( TARGET uriparser::uriparser )
+ return()
+endif()
+create_target( uriparser::uriparser )
include(Prebuilt)
@@ -10,26 +12,11 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(uriparser)
if (WINDOWS)
- set(URIPARSER_LIBRARIES
- debug uriparserd
- optimized uriparser)
+ set_target_libraries( uriparser::uriparser uriparser)
elseif (LINUX)
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it.
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-luriparser here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(URIPARSER_PRELOAD_ARCHIVES -Wl,--whole-archive uriparser -Wl,--no-whole-archive)
- set(URIPARSER_LIBRARIES uriparser)
+ set_target_libraries( uriparser::uriparser uriparser)
elseif (DARWIN)
- set(URIPARSER_LIBRARIES liburiparser.dylib)
+ set_target_libraries( uriparser::uriparser liburiparser.dylib)
endif (WINDOWS)
- set(URIPARSER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/uriparser)
+ set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake
index 8c3790ea89..75b94acc50 100644
--- a/indra/cmake/XmlRpcEpi.cmake
+++ b/indra/cmake/XmlRpcEpi.cmake
@@ -1,20 +1,15 @@
# -*- cmake -*-
include(Prebuilt)
-set(XMLRPCEPI_FIND_QUIETLY ON)
-set(XMLRPCEPI_FIND_REQUIRED ON)
+if( TARGET xmlrpc-epi::xmlrpc-epi )
+ return()
+endif()
+create_target( xmlrpc-epi::xmlrpc-epi )
if (USESYSTEMLIBS)
include(FindXmlRpcEpi)
else (USESYSTEMLIBS)
use_prebuilt_binary(xmlrpc-epi)
- if (WINDOWS)
- set(XMLRPCEPI_LIBRARIES
- debug xmlrpc-epid
- optimized xmlrpc-epi
- )
- else (WINDOWS)
- set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
- endif (WINDOWS)
- set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
+ set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi )
+ set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake
index 1f46a23d92..5aaca60664 100644
--- a/indra/cmake/ZLIBNG.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -1,35 +1,20 @@
# -*- cmake -*-
-set(ZLIBNG_FIND_QUIETLY ON)
-set(ZLIBNG_FIND_REQUIRED ON)
-
include(Prebuilt)
+if( TARGET zlib-ng::zlib-ng )
+ return()
+endif()
+create_target(zlib-ng::zlib-ng)
+
if (USESYSTEMLIBS)
include(FindZLIBNG)
else (USESYSTEMLIBS)
use_prebuilt_binary(zlib-ng)
if (WINDOWS)
- set(ZLIBNG_LIBRARIES
- debug zlib
- optimized zlib)
- elseif (LINUX)
- #
- # When we have updated static libraries in competition with older
- # shared libraries and we want the former to win, we need to do some
- # extra work. The *_PRELOAD_ARCHIVES settings are invoked early
- # and will pull in the entire archive to the binary giving it
- # priority in symbol resolution. Beware of cmake moving the
- # achive load itself to another place on the link command line. If
- # that happens, you can try something like -Wl,-lz here to hide
- # the archive. Also be aware that the linker will not tolerate a
- # second whole-archive load of the archive. See viewer's
- # CMakeLists.txt for more information.
- #
- set(ZLIBNG_PRELOAD_ARCHIVES -Wl,--whole-archive z -Wl,--no-whole-archive)
- set(ZLIBNG_LIBRARIES z)
- elseif (DARWIN)
- set(ZLIBNG_LIBRARIES z)
+ set_target_libraries( zlib-ng::zlib-ng zlib )
+ else()
+ set_target_libraries( zlib-ng::zlib-ng z )
endif (WINDOWS)
- set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
+ set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng)
endif (USESYSTEMLIBS)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 4edc4c59cd..ded109f9f1 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -10,28 +10,30 @@ else (INSTALL_PROPRIETARY)
endif (INSTALL_PROPRIETARY)
if (USE_BUGSPLAT)
+ create_target(bugsplat::bugsplat)
if (NOT USESYSTEMLIBS)
include(Prebuilt)
use_prebuilt_binary(bugsplat)
if (WINDOWS)
- set(BUGSPLAT_LIBRARIES
+ set_target_libraries( bugsplat::bugsplat
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
)
elseif (DARWIN)
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
+ set_target_libraries( bugsplat::bugsplat
+ ${BUGSPLAT_LIBRARIES}
+ )
else (WINDOWS)
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
endif (WINDOWS)
else (NOT USESYSTEMLIBS)
- set(BUGSPLAT_FIND_QUIETLY ON)
- set(BUGSPLAT_FIND_REQUIRED ON)
include(FindBUGSPLAT)
endif (NOT USESYSTEMLIBS)
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
- set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
+ set_target_include_dirs( bugsplat::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat)
set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
endif (USE_BUGSPLAT)