Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
# Conflicts: # indra/newview/llinventoryfunctions.cpp # indra/newview/llpanelmaininventory.h # indra/newview/skins/default/xui/en/sidepanel_item_info.xmlmaster
commit
49c8ce2b07
|
|
@ -19,8 +19,11 @@ debian/files
|
|||
debian/secondlife-appearance-utility*
|
||||
debian/secondlife-viewer*
|
||||
indra/.distcc
|
||||
build-vc[0-9]*-32**
|
||||
build-vc[0-9]*-64**
|
||||
build-vc80/
|
||||
build-vc100/
|
||||
build-vc120/
|
||||
build-vc*-32/
|
||||
build-vc*-64/
|
||||
indra/CMakeFiles
|
||||
indra/build-vc[0-9]*
|
||||
indra/lib/mono/1.0/*.dll
|
||||
|
|
|
|||
174
autobuild.xml
174
autobuild.xml
|
|
@ -45,7 +45,7 @@
|
|||
<string>gstreamer10</string>
|
||||
<key>platforms</key>
|
||||
<map>
|
||||
<key>linux</key>
|
||||
<key>linux64</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<string>http://downloads.phoenixviewer.com/gstreamer10-1.6.3.201605191852-linux-201605191852.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
<string>linux64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
<string>http://3p.firestormviewer.org/breakpad-4708e6fb-linux64_bionic-220392253.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
<string>linux64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
<string>http://3p.firestormviewer.org/glib-2.56.0.220911433-linux64_bionic-220911433.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
<string>linux64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
|
|
@ -325,7 +325,7 @@
|
|||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
</map>
|
||||
<key>linux</key>
|
||||
<key>linux64</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
|
|
@ -335,7 +335,7 @@
|
|||
<uri>http://3p.firestormviewer.org/libnotify-0.4.4-linux-20101003.tar.bz2</uri>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
<string>linux64</string>
|
||||
</map>
|
||||
<key>windows</key>
|
||||
<map>
|
||||
|
|
@ -724,9 +724,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>f283a064c30695bd7bf071f1bd481f32</string>
|
||||
<string>a880dfc15fcb330baf548a85324cd88a</string>
|
||||
<key>url</key>
|
||||
<string>https://3p.firestormviewer.org/colladadom-2.3.222232011-darwin64-222232011.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104133/913090/colladadom-2.3.574693-darwin64-574693.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -748,9 +748,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>1c094d709a35b252bba7b6ef1871085c</string>
|
||||
<string>7e84441d9c7cf019a7bdc7b818b16c27</string>
|
||||
<key>url</key>
|
||||
<string>https://3p.firestormviewer.org/colladadom-2.3.222231850-windows-222231850.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104112/912957/colladadom-2.3.574693-windows-574693.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -760,16 +760,16 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>a7596da3696fc423ec1bc7d6764c01ab</string>
|
||||
<string>2eaffbb8a93b03a732d3c47055a8efcb</string>
|
||||
<key>url</key>
|
||||
<string>https://3p.firestormviewer.org/colladadom-2.3.222231903-windows64-222231903.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104135/913103/colladadom-2.3.574693-windows64-574693.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>2.3.569219</string>
|
||||
<string>2.3.574693</string>
|
||||
</map>
|
||||
<key>cubemaptoequirectangular</key>
|
||||
<map>
|
||||
|
|
@ -2113,9 +2113,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>da57838d80cf332f4a3026713a13f086</string>
|
||||
<string>e51c6f5dfd76eb148348a44ff57e66c2</string>
|
||||
<key>url</key>
|
||||
<string>https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90708/824484/llphysicsextensions_source-1.0.565754-darwin64-565754.tar.bz2</string>
|
||||
<string>https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104810/918016/llphysicsextensions_source-1.0.575107-darwin64-575107.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -2137,9 +2137,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>28ad884012aa0bb70cf4101853af2f9a</string>
|
||||
<string>dbbe4cc568ac149d862e421cdda4dd48</string>
|
||||
<key>url</key>
|
||||
<string>https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/90733/824570/llphysicsextensions_source-1.0.565768-windows-565768.tar.bz2</string>
|
||||
<string>https://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/104809/918011/llphysicsextensions_source-1.0.575107-windows-575107.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3013,6 +3013,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
<key>linux64</key>
|
||||
<map>
|
||||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>46edf0f55417f8ef0d33a5c007bc3644</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89310/815451/threejs-0.132.2-windows64-564843.tar.bz2</string>
|
||||
</map>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>0.132.2</string>
|
||||
|
|
@ -3196,9 +3206,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>2e8d817e7837dd6f4284b13fa3f5c15e</string>
|
||||
<string>9e1b5515ab59b4e9cfeef6626d65d03d</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104765/917714/viewer_manager-3.0.575083-darwin64-575083.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108609/945996/viewer_manager-3.0.577252-darwin64-577252.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3220,9 +3230,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3efa80faaf537e39a77218cd6efa9409</string>
|
||||
<string>a3c599595ecc8fb987a5499fca42520a</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104766/917721/viewer_manager-3.0.575083-windows-575083.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/108610/946003/viewer_manager-3.0.577252-windows-577252.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3233,7 +3243,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>source_type</key>
|
||||
<string>hg</string>
|
||||
<key>version</key>
|
||||
<string>3.0.575083</string>
|
||||
<string>3.0.577252</string>
|
||||
</map>
|
||||
<key>vlc-bin</key>
|
||||
<map>
|
||||
|
|
@ -3731,6 +3741,112 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>name</key>
|
||||
<string>common</string>
|
||||
</map>
|
||||
<key>linux64</key>
|
||||
<map>
|
||||
<key>build_directory</key>
|
||||
<string>build-linux-x86_64</string>
|
||||
<key>configurations</key>
|
||||
<map>
|
||||
<key>Release</key>
|
||||
<map>
|
||||
<key>build</key>
|
||||
<map>
|
||||
<key>command</key>
|
||||
<string>ninja</string>
|
||||
</map>
|
||||
<key>configure</key>
|
||||
<map>
|
||||
<key>arguments</key>
|
||||
<array>
|
||||
<string>../indra</string>
|
||||
</array>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>-G</string>
|
||||
<string>Ninja</string>
|
||||
<string>-DLL_TESTS=Off</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>default</key>
|
||||
<string>True</string>
|
||||
<key>name</key>
|
||||
<string>Release</string>
|
||||
</map>
|
||||
<key>ReleaseOS</key>
|
||||
<map>
|
||||
<key>build</key>
|
||||
<map>
|
||||
<key>command</key>
|
||||
<string>ninja</string>
|
||||
</map>
|
||||
<key>configure</key>
|
||||
<map>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>-G</string>
|
||||
<string>Ninja</string>
|
||||
<string>-DLL_TESTS=Off</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>ReleaseOS</string>
|
||||
</map>
|
||||
<key>default</key>
|
||||
<map>
|
||||
<key>build</key>
|
||||
<map>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>default</string>
|
||||
</map>
|
||||
<key>ReleaseFS</key>
|
||||
<map>
|
||||
<key>build</key>
|
||||
<map>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>--build</string>
|
||||
<string>--platform linux</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>configure</key>
|
||||
<map>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>--kdu</string>
|
||||
<string>--fmodstudio</string>
|
||||
<string>--platform linux</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>ReleaseFS</string>
|
||||
</map>
|
||||
<key>ReleaseFS_open</key>
|
||||
<map>
|
||||
<key>build</key>
|
||||
<map>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>--build</string>
|
||||
<string>--platform linux</string>
|
||||
<string>--package</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>configure</key>
|
||||
<map>
|
||||
<key>options</key>
|
||||
<array>
|
||||
<string>--platform linux</string>
|
||||
<string>--package</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>ReleaseFS_open</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
</map>
|
||||
<key>darwin64</key>
|
||||
<map>
|
||||
<key>build_directory</key>
|
||||
|
|
@ -4182,7 +4298,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>windows</key>
|
||||
<map>
|
||||
<key>build_directory</key>
|
||||
<string>build-vc${AUTOBUILD_VSVER|150}-$AUTOBUILD_ADDRSIZE</string>
|
||||
<string>build-vc${AUTOBUILD_VSVER|170}-$AUTOBUILD_ADDRSIZE</string>
|
||||
<key>configurations</key>
|
||||
<map>
|
||||
<key>RelWithDebInfo</key>
|
||||
|
|
@ -4211,6 +4327,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<array>
|
||||
<string>-G</string>
|
||||
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
|
||||
<string>-A</string>
|
||||
<string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
|
|
@ -4247,9 +4365,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<array>
|
||||
<string>-G</string>
|
||||
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
|
||||
<string>-A</string>
|
||||
<string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
||||
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
||||
<string>-DUSE_KDU=FALSE</string>
|
||||
<string>-DOPENAL:BOOL=ON</string>
|
||||
<string>-DUSE_OPENAL:BOOL=ON</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
|
|
@ -4281,6 +4401,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<array>
|
||||
<string>-G</string>
|
||||
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
|
||||
<string>-A</string>
|
||||
<string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
|
|
@ -4317,10 +4439,12 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<array>
|
||||
<string>-G</string>
|
||||
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
|
||||
<string>-A</string>
|
||||
<string>${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}</string>
|
||||
<string>-DUNATTENDED:BOOL=ON</string>
|
||||
<string>-DINSTALL_PROPRIETARY=FALSE</string>
|
||||
<string>-DUSE_KDU=FALSE</string>
|
||||
<string>-DOPENAL:BOOL=ON</string>
|
||||
<string>-DUSE_OPENAL:BOOL=ON</string>
|
||||
</array>
|
||||
</map>
|
||||
<key>name</key>
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,7 @@ Nicky Dasmijn
|
|||
SL-14541
|
||||
SL-16438
|
||||
SL-17218
|
||||
SL-17238
|
||||
SL-17585
|
||||
Nicky Perian
|
||||
OPEN-1
|
||||
|
|
|
|||
|
|
@ -4,24 +4,43 @@
|
|||
# other commands to guarantee full compatibility
|
||||
# with the version specified
|
||||
## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support
|
||||
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17) #<FS> Enable c++17 on all platforms
|
||||
## 3.13/12 is needed for add_link_options/add_compile_definitions
|
||||
## 3.14 added FILE CREATE_LINK
|
||||
## 3.16 is needed for target_precompile_headers
|
||||
## Nicky: Ideally we want at least 3.21 for good preset support
|
||||
## We're not there yet, but once done, there is a kludge in Linking.cmake
|
||||
# "if(${CMAKE_VERSION} VERSION_LESS "3.20.0")" that can also be removed
|
||||
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
|
||||
|
||||
set(ROOT_PROJECT_NAME "Firestorm" CACHE STRING
|
||||
"The root project/makefile/solution name. Defaults to Firestorm.")
|
||||
project(${ROOT_PROJECT_NAME})
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN )
|
||||
if( USE_CONAN )
|
||||
set( USE_CONAN ON )
|
||||
set( USE_AUTOBUILD_3P OFF )
|
||||
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
||||
add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P)
|
||||
else()
|
||||
set( USE_CONAN OFF )
|
||||
set( USE_AUTOBUILD_3P ON )
|
||||
endif()
|
||||
|
||||
# The viewer code base can now be successfully compiled with -std=c++14. But
|
||||
# turning that on in the generic viewer-build-variables/variables file would
|
||||
# potentially require tweaking each of our ~50 third-party library builds.
|
||||
# Until we decide to set -std=c++14 in viewer-build-variables/variables, set
|
||||
# it locally here: we want to at least prevent inadvertently reintroducing
|
||||
# viewer code that would fail with C++14.
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
include(Variables)
|
||||
include(BuildVersion)
|
||||
|
||||
set(LEGACY_STDIO_LIBS)
|
||||
if (WINDOWS)
|
||||
set(LEGACY_STDIO_LIBS legacy_stdio_definitions)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING
|
||||
"Build type. One of: Release RelWithDebInfo" FORCE)
|
||||
|
|
@ -123,10 +142,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
|
|||
add_subdirectory(${LIBS_OPEN_PREFIX}llui)
|
||||
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
|
||||
|
||||
if (LL_TESTS OR NOT USESYSTEMLIBS)
|
||||
if( LL_TESTS )
|
||||
# Legacy C++ tests. Build always, run if LL_TESTS is true.
|
||||
add_subdirectory(${VIEWER_PREFIX}test)
|
||||
endif (LL_TESTS OR NOT USESYSTEMLIBS)
|
||||
endif()
|
||||
|
||||
if (ENABLE_MEDIA_PLUGINS)
|
||||
# viewer media plugins
|
||||
|
|
@ -138,7 +157,6 @@ if (LINUX)
|
|||
include(LLAppearanceUtility)
|
||||
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
# add_dependencies(viewer linux-crash-logger-strip-target)
|
||||
elseif (WINDOWS)
|
||||
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
|
||||
if (EXISTS ${VIEWER_DIR}win_setup)
|
||||
|
|
@ -153,12 +171,6 @@ if (WINDOWS)
|
|||
endif (EXISTS ${VIEWER_DIR}win_setup)
|
||||
endif (WINDOWS)
|
||||
|
||||
# sets the 'startup project' for debugging from visual studio.
|
||||
set_property(
|
||||
DIRECTORY ${VIEWER_PREFIX}
|
||||
PROPERTY VS_STARTUP_PROJECT firestorm-bin
|
||||
)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
if (BUGSPLAT_DB)
|
||||
message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'")
|
||||
|
|
@ -178,6 +190,12 @@ set_target_properties(
|
|||
|
||||
add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
|
||||
|
||||
# sets the 'startup project' for debugging from visual studio.
|
||||
set_property(
|
||||
DIRECTORY ${VIEWER_PREFIX}
|
||||
PROPERTY VS_STARTUP_PROJECT ${VIEWER_BINARY_NAME}
|
||||
)
|
||||
|
||||
if (LL_TESTS)
|
||||
# Define after the custom targets are created so
|
||||
# individual apps can add themselves as dependencies
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
@ -34,25 +32,22 @@ endif (WINDOWS)
|
|||
# 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 MinSizeRel or Debug builds.
|
||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING
|
||||
"Supported build types." FORCE)
|
||||
add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
|
||||
endif()
|
||||
|
||||
# Don't bother with a MinSizeRel or Debug builds.
|
||||
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE)
|
||||
|
||||
# Platform-specific compilation flags.
|
||||
|
||||
|
|
@ -82,45 +77,34 @@ 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")
|
||||
# <FS:ND> Remove this, it's no option to cl.exe and causes a massive amount of warnings.
|
||||
#if( ADDRESS_SIZE EQUAL 32 )
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
|
||||
#endif()
|
||||
|
||||
# Preserve first-pass-through versions (ie no FORCE overwrite). Prevents recursive addition of /Zo (04/2021)
|
||||
set(OG_CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} CACHE STRING "OG_CXX_FLAGS_RELEASE")
|
||||
set(OG_CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} CACHE STRING "OG_CXX_FLAGS_RELWITHDEBINFO")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
"${OG_CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo"
|
||||
CACHE STRING "C++ compiler release-with-debug options" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE
|
||||
"${OG_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-
|
||||
/Oi
|
||||
/Ot
|
||||
# /arch:SSE2
|
||||
/fp:fast
|
||||
/Zo
|
||||
/GS
|
||||
/TP
|
||||
/W3
|
||||
/c
|
||||
/Zc:forScope
|
||||
/nologo
|
||||
/Oy-
|
||||
/Oi
|
||||
/Ot
|
||||
/fp:fast
|
||||
/MP
|
||||
)
|
||||
|
||||
# <FS:Ansariel> AVX/AVX2 support
|
||||
|
|
@ -138,67 +122,63 @@ if (WINDOWS)
|
|||
|
||||
# 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)
|
||||
|
||||
# <FS:ND/>
|
||||
# And another hack for FORTIFY_SOURCE. Some distributions (for example Gentoo) define FORTIFY_SOURCE by default.
|
||||
# Check if this is the case, if yes, do not define it again.
|
||||
execute_process(
|
||||
COMMAND echo "int main( char **a, int c ){ \n#ifdef _FORTIFY_SOURCE\n#error FORTITY_SOURCE_SET\n#else\nreturn 0;\n#endif\n}"
|
||||
COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -xc++ -w - -o /dev/null"
|
||||
OUTPUT_VARIABLE FORTIFY_SOURCE_OUT
|
||||
ERROR_VARIABLE FORTIFY_SOURCE_ERR
|
||||
RESULT_VARIABLE FORTIFY_SOURCE_RES
|
||||
)
|
||||
# EXTERNAL_TOS
|
||||
# force this platform to accept TOS via external browser
|
||||
|
||||
# LL_IGNORE_SIGCHLD
|
||||
# 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.
|
||||
|
||||
if ( ${FORTIFY_SOURCE_RES} EQUAL 0 )
|
||||
add_definitions(-D_FORTIFY_SOURCE=2)
|
||||
endif()
|
||||
|
||||
# gcc 4.3 and above don't like the LL boost and also
|
||||
# cause warnings due to our use of deprecated headers
|
||||
|
||||
add_definitions(
|
||||
-D_REENTRANT
|
||||
)
|
||||
add_compile_definitions(
|
||||
_REENTRANT
|
||||
_FORTIFY_SOURCE=2
|
||||
EXTERNAL_TOS
|
||||
APPID=secondlife
|
||||
LL_IGNORE_SIGCHLD
|
||||
)
|
||||
add_compile_options(
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-msse2
|
||||
-mfpmath=sse
|
||||
-pthread
|
||||
)
|
||||
-fexceptions
|
||||
-fno-math-errno
|
||||
-fno-strict-aliasing
|
||||
-fsigned-char
|
||||
-msse2
|
||||
-mfpmath=sse
|
||||
-pthread
|
||||
-Wno-parentheses
|
||||
-Wno-deprecated
|
||||
-fvisibility=hidden
|
||||
)
|
||||
|
||||
# force this platform to accept TOS via external browser <FS:ND> No, do not.
|
||||
# add_definitions(-DEXTERNAL_TOS)
|
||||
|
||||
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")
|
||||
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib' -Wl,--exclude-libs,ALL")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib' -Wl,--exclude-libs,ALL")
|
||||
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_LINK_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib' -Wl,--exclude-libs,ALL")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib' -Wl,--exclude-libs,ALL")
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
endif (LINUX)
|
||||
|
|
@ -216,13 +196,7 @@ if (DARWIN)
|
|||
# see Variables.cmake.
|
||||
string(REPLACE "-gdwarf-2" "-g${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}"
|
||||
CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
# The viewer code base can now be successfully compiled with -std=c++14. But
|
||||
# turning that on in the generic viewer-build-variables/variables file would
|
||||
# potentially require tweaking each of our ~50 third-party library builds.
|
||||
# Until we decide to set -std=c++14 in viewer-build-variables/variables, set
|
||||
# it locally here: we want to at least prevent inadvertently reintroducing
|
||||
# viewer code that would fail with C++14.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
|
|
@ -231,7 +205,6 @@ set(ENABLE_SIGNING TRUE)
|
|||
set(SIGNING_IDENTITY "Developer ID Application: The Phoenix Firestorm Project, Inc." )
|
||||
endif (DARWIN)
|
||||
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
if (CMAKE_CXX_COMPILER MATCHES ".*clang")
|
||||
set(CMAKE_COMPILER_IS_CLANGXX 1)
|
||||
|
|
@ -270,23 +243,3 @@ if (LINUX OR DARWIN)
|
|||
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
|
||||
cairo
|
||||
freetype
|
||||
glib-2.0
|
||||
gstreamer-0.10
|
||||
gtk-2.0
|
||||
pango-1.0
|
||||
)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
|
|
|
|||
|
|
@ -1,54 +1,46 @@
|
|||
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)
|
||||
add_library( ll::apr INTERFACE IMPORTED )
|
||||
|
||||
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_system_binary( apr apr-util )
|
||||
use_prebuilt_binary(apr_suite)
|
||||
|
||||
if (LINUX)
|
||||
list(APPEND APRUTIL_LIBRARIES uuid)
|
||||
list(APPEND APRUTIL_LIBRARIES rt)
|
||||
endif (LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
if (WINDOWS)
|
||||
if (LLCOMMON_LINK_SHARED)
|
||||
set(APR_selector "lib")
|
||||
else (LLCOMMON_LINK_SHARED)
|
||||
set(APR_selector "")
|
||||
endif (LLCOMMON_LINK_SHARED)
|
||||
target_link_libraries( ll::apr INTERFACE
|
||||
${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)
|
||||
|
||||
target_link_libraries( ll::apr INTERFACE
|
||||
libapr-1.${APR_selector}
|
||||
libaprutil-1.${APRUTIL_selector}
|
||||
iconv
|
||||
)
|
||||
else (WINDOWS)
|
||||
# linux
|
||||
target_link_libraries( ll::apr INTERFACE
|
||||
apr-1
|
||||
aprutil-1
|
||||
# iconv # <FS:Zi> Doesn't seem to be necessary for Linux
|
||||
uuid
|
||||
rt
|
||||
)
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(libatmosphere)
|
||||
set(LIBATMOSPHERE_LIBRARIES atmosphere)
|
||||
set(LIBATMOSPHERE_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/atmosphere)
|
||||
|
|
@ -1,42 +1,17 @@
|
|||
# -*- 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()
|
||||
add_library( ll::vorbis INTERFACE IMPORTED )
|
||||
|
||||
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_system_binary(vorbis)
|
||||
use_prebuilt_binary(ogg_vorbis)
|
||||
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
|
||||
else (WINDOWS)
|
||||
# <FS:Zi> These must be in this order, or it won't link: vorbisenc vorbisfile vorbis ogg
|
||||
target_link_libraries(ll::vorbis INTERFACE vorbisenc vorbisfile vorbis ogg)
|
||||
endif (WINDOWS)
|
||||
|
||||
link_directories(
|
||||
${VORBIS_LIBRARY_DIRS}
|
||||
${VORBISENC_LIBRARY_DIRS}
|
||||
${VORBISFILE_LIBRARY_DIRS}
|
||||
${OGG_LIBRARY_DIRS}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,114 +1,53 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(Boost_FIND_QUIETLY ON)
|
||||
set(Boost_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindBoost)
|
||||
add_library( ll::boost INTERFACE IMPORTED )
|
||||
if( USE_CONAN )
|
||||
target_link_libraries( ll::boost INTERFACE CONAN_PKG::boost )
|
||||
target_compile_definitions( ll::boost INTERFACE BOOST_ALLOW_DEPRECATED_HEADERS BOOST_BIND_GLOBAL_PLACEHOLDERS )
|
||||
return()
|
||||
endif()
|
||||
|
||||
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)
|
||||
set(BOOST_WAVE_LIBRARY boost_wave-mt)
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
use_prebuilt_binary(boost)
|
||||
|
||||
# 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)
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized libboost_wave-mt${addrsfx}
|
||||
debug libboost_wave-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)
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized boost_wave-mt${addrsfx}
|
||||
debug boost_wave-mt${addrsfx}-gd)
|
||||
elseif (DARWIN)
|
||||
set(BOOST_CONTEXT_LIBRARY
|
||||
optimized boost_context-mt${addrsfx}
|
||||
debug boost_context-mt${addrsfx})
|
||||
set(BOOST_FIBER_LIBRARY
|
||||
optimized boost_fiber-mt${addrsfx}
|
||||
debug boost_fiber-mt${addrsfx})
|
||||
set(BOOST_FILESYSTEM_LIBRARY
|
||||
optimized boost_filesystem-mt${addrsfx}
|
||||
debug boost_filesystem-mt${addrsfx})
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized boost_program_options-mt${addrsfx}
|
||||
debug boost_program_options-mt${addrsfx})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
optimized boost_regex-mt${addrsfx}
|
||||
debug boost_regex-mt${addrsfx})
|
||||
set(BOOST_SIGNALS_LIBRARY
|
||||
optimized boost_signals-mt${addrsfx}
|
||||
debug boost_signals-mt${addrsfx})
|
||||
set(BOOST_SYSTEM_LIBRARY
|
||||
optimized boost_system-mt${addrsfx}
|
||||
debug boost_system-mt${addrsfx})
|
||||
set(BOOST_THREAD_LIBRARY
|
||||
optimized boost_thread-mt${addrsfx}
|
||||
debug boost_thread-mt${addrsfx})
|
||||
set(BOOST_WAVE_LIBRARY
|
||||
optimized boost_wave-mt${addrsfx}
|
||||
debug boost_wave-mt${addrsfx}-gd)
|
||||
endif (WINDOWS)
|
||||
endif (USESYSTEMLIBS)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::boost INTERFACE
|
||||
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}
|
||||
libboost_wave-mt${addrsfx})
|
||||
elseif (LINUX)
|
||||
target_link_libraries( ll::boost INTERFACE
|
||||
# <FS:Zi> do not change the order: fiber first, context next, or SLPlugin will not build
|
||||
boost_fiber-mt${addrsfx}
|
||||
boost_context-mt${addrsfx}
|
||||
boost_filesystem-mt${addrsfx}
|
||||
boost_program_options-mt${addrsfx}
|
||||
boost_regex-mt${addrsfx}
|
||||
boost_system-mt${addrsfx}
|
||||
boost_thread-mt${addrsfx}
|
||||
boost_wave-mt${addrsfx})
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::boost INTERFACE
|
||||
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}
|
||||
boost_wave-mt${addrsfx})
|
||||
endif (WINDOWS)
|
||||
|
||||
if (LINUX)
|
||||
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
|
|||
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" VIEWER_VERSION_MAJOR ${VIEWER_SHORT_VERSION})
|
||||
string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" VIEWER_VERSION_MINOR ${VIEWER_SHORT_VERSION})
|
||||
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" VIEWER_VERSION_PATCH ${VIEWER_SHORT_VERSION})
|
||||
|
||||
if (DEFINED ENV{revision})
|
||||
set(VIEWER_VERSION_REVISION $ENV{revision})
|
||||
message(STATUS "Revision (from environment): ${VIEWER_VERSION_REVISION}")
|
||||
|
|
@ -19,23 +18,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(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)
|
||||
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} )
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
add_library( ll::cef INTERFACE IMPORTED )
|
||||
|
||||
use_prebuilt_binary(dullahan)
|
||||
target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef)
|
||||
|
||||
if (WINDOWS)
|
||||
set(CEF_PLUGIN_LIBRARIES
|
||||
target_link_libraries( ll::cef INTERFACE
|
||||
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
|
||||
target_link_libraries( ll::cef INTERFACE
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
|
||||
${APPKIT_LIBRARY}
|
||||
|
|
@ -37,7 +33,7 @@ elseif (DARWIN)
|
|||
)
|
||||
|
||||
elseif (LINUX)
|
||||
set(CEF_PLUGIN_LIBRARIES
|
||||
target_link_libraries( ll::cef INTERFACE
|
||||
dullahan
|
||||
cef
|
||||
cef_dll_wrapper.a
|
||||
|
|
|
|||
|
|
@ -5,113 +5,80 @@ include(00-Common)
|
|||
project(cmake)
|
||||
|
||||
set(cmake_SOURCE_FILES
|
||||
CMakeLists.txt
|
||||
|
||||
00-Common.cmake
|
||||
APR.cmake
|
||||
Audio.cmake
|
||||
Boost.cmake
|
||||
bugsplat.cmake
|
||||
BuildVersion.cmake
|
||||
CEFPlugin.cmake
|
||||
CMakeCopyIfDifferent.cmake
|
||||
ColladaDom.cmake
|
||||
ConfigurePkgConfig.cmake
|
||||
CURL.cmake
|
||||
Copy3rdPartyLibs.cmake
|
||||
GLIB.cmake
|
||||
DeploySharedLibs.cmake
|
||||
Discord.cmake # <FS:LO> Discord rich presence
|
||||
DragDrop.cmake
|
||||
EXPAT.cmake
|
||||
FindAPR.cmake
|
||||
FindAutobuild.cmake
|
||||
FindFMODSTUDIO.cmake
|
||||
FindGLH.cmake
|
||||
FindHUNSPELL.cmake
|
||||
FindJsonCpp.cmake
|
||||
FindNDOF.cmake
|
||||
FindOpenJPEG.cmake
|
||||
FindSCP.cmake
|
||||
FindURIPARSER.cmake
|
||||
FindXmlRpcEpi.cmake
|
||||
FindZLIBNG.cmake
|
||||
FMODSTUDIO.cmake
|
||||
FreeType.cmake
|
||||
GLEXT.cmake
|
||||
GLH.cmake
|
||||
GLOD.cmake
|
||||
## GStreamer010Plugin.cmake
|
||||
GoogleMock.cmake
|
||||
Growl.cmake
|
||||
Havok.cmake
|
||||
Hunspell.cmake
|
||||
JPEG.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
|
||||
LLMeshOptimizer.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
|
||||
MESHOPTIMIZER.cmake
|
||||
NDOF.cmake
|
||||
OPENAL.cmake
|
||||
OpenGL.cmake
|
||||
OpenJPEG.cmake
|
||||
OpenSSL.cmake
|
||||
PNG.cmake
|
||||
PluginAPI.cmake
|
||||
Prebuilt.cmake
|
||||
PulseAudio.cmake
|
||||
Python.cmake
|
||||
TemplateCheck.cmake
|
||||
Tracy.cmake
|
||||
Tut.cmake
|
||||
UI.cmake
|
||||
UnixInstall.cmake
|
||||
URIPARSER.cmake
|
||||
Variables.cmake
|
||||
ViewerMiscLibs.cmake
|
||||
VisualLeakDetector.cmake
|
||||
LibVLCPlugin.cmake
|
||||
XmlRpcEpi.cmake
|
||||
ZLIBNG.cmake
|
||||
)
|
||||
CMakeLists.txt
|
||||
00-Common.cmake
|
||||
APR.cmake
|
||||
Audio.cmake
|
||||
Boost.cmake
|
||||
bugsplat.cmake
|
||||
BuildVersion.cmake
|
||||
CEFPlugin.cmake
|
||||
CMakeCopyIfDifferent.cmake
|
||||
ConfigurePkgConfig.cmake
|
||||
CURL.cmake
|
||||
Copy3rdPartyLibs.cmake
|
||||
DBusGlib.cmake
|
||||
DeploySharedLibs.cmake
|
||||
Discord.cmake # <FS:LO> Discord rich presence
|
||||
DragDrop.cmake
|
||||
EXPAT.cmake
|
||||
FindAutobuild.cmake
|
||||
FMODSTUDIO.cmake
|
||||
FreeType.cmake
|
||||
GLEXT.cmake
|
||||
GLH.cmake
|
||||
GLOD.cmake # <FS:Ansariel> Bring back GLOD
|
||||
GoogleMock.cmake
|
||||
Havok.cmake
|
||||
Hunspell.cmake
|
||||
JsonCpp.cmake
|
||||
LLAddBuildTest.cmake
|
||||
LLAppearance.cmake
|
||||
LLAudio.cmake
|
||||
LLCommon.cmake
|
||||
LLImage.cmake
|
||||
LLKDU.cmake
|
||||
LLPhysicsExtensions.cmake
|
||||
LLPrimitive.cmake
|
||||
LLSharedLibs.cmake
|
||||
LLTestCommand.cmake
|
||||
LLWindow.cmake
|
||||
Linking.cmake
|
||||
MediaPluginBase.cmake # <FS:Zi> Linux volume catcher
|
||||
Meshoptimizer.cmake
|
||||
NDOF.cmake
|
||||
OPENAL.cmake
|
||||
OpenGL.cmake
|
||||
OpenJPEG.cmake
|
||||
OpenSSL.cmake
|
||||
PNG.cmake
|
||||
PluginAPI.cmake
|
||||
Prebuilt.cmake
|
||||
PulseAudio.cmake
|
||||
Python.cmake
|
||||
TemplateCheck.cmake
|
||||
Tut.cmake
|
||||
UI.cmake
|
||||
UnixInstall.cmake
|
||||
URIPARSER.cmake
|
||||
Variables.cmake
|
||||
ViewerMiscLibs.cmake
|
||||
VisualLeakDetector.cmake
|
||||
LibVLCPlugin.cmake
|
||||
XmlRpcEpi.cmake
|
||||
ZLIBNG.cmake
|
||||
)
|
||||
|
||||
source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
|
||||
|
||||
set(master_SOURCE_FILES
|
||||
../CMakeLists.txt
|
||||
)
|
||||
../CMakeLists.txt
|
||||
)
|
||||
|
||||
source_group("Master Rules" FILES ${master_SOURCE_FILES})
|
||||
|
||||
set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
add_library(cmake
|
||||
cmake_dummy.cpp
|
||||
${cmake_SOURCE_FILES}
|
||||
${master_SOURCE_FILES}
|
||||
)
|
||||
cmake_dummy.cpp
|
||||
${cmake_SOURCE_FILES}
|
||||
${master_SOURCE_FILES}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,24 +2,14 @@
|
|||
include(Prebuilt)
|
||||
include(NGHTTP2)
|
||||
|
||||
set(CURL_FIND_QUIETLY ON)
|
||||
set(CURL_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::libcurl INTERFACE IMPORTED )
|
||||
|
||||
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)
|
||||
if (LINUX)
|
||||
list(APPEND CURL_LIBRARIES
|
||||
pthread ${NGHTTP2_LIBRARIES}
|
||||
)
|
||||
endif (LINUX)
|
||||
endif (WINDOWS)
|
||||
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (USESYSTEMLIBS)
|
||||
use_system_binary(libcurl)
|
||||
use_prebuilt_binary(curl)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
|
||||
else (WINDOWS)
|
||||
target_link_libraries(ll::libcurl INTERFACE libcurl.a)
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
include(CMakeCopyIfDifferent)
|
||||
include(Linking)
|
||||
include(OPENAL)
|
||||
include(FMODSTUDIO)
|
||||
|
||||
# When we copy our dependent libraries, we almost always want to copy them to
|
||||
# both the Release and the RelWithDebInfo staging directories. This has
|
||||
|
|
@ -13,27 +15,27 @@ include(Linking)
|
|||
# copy_if_different commands. Encapsulate that usage.
|
||||
# Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit.
|
||||
# to_staging_dirs diverges from copy_if_different in that it appends to TARGETS.
|
||||
MACRO(to_staging_dirs from_dir targets)
|
||||
foreach(staging_dir
|
||||
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}")
|
||||
copy_if_different("${from_dir}" "${staging_dir}" out_targets ${ARGN})
|
||||
macro(to_staging_dirs from_dir targets)
|
||||
set( targetDir "${SHARED_LIB_STAGING_DIR}")
|
||||
copy_if_different("${from_dir}" "${targetDir}" out_targets ${ARGN})
|
||||
|
||||
list(APPEND "${targets}" "${out_targets}")
|
||||
endforeach()
|
||||
ENDMACRO(to_staging_dirs from_dir to_dir targets)
|
||||
endmacro()
|
||||
|
||||
###################################################################
|
||||
# set up platform specific lists of files that need to be copied
|
||||
###################################################################
|
||||
if(WINDOWS)
|
||||
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug")
|
||||
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo")
|
||||
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release")
|
||||
|
||||
#*******************************
|
||||
# VIVOX - *NOTE: no debug version
|
||||
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(slvoice_src_dir "${ARCH_PREBUILT_BIN_RELEASE}")
|
||||
|
||||
# ND, it seems there is no such thing defined. At least when building a viewer
|
||||
# Does this maybe matter on some LL buildserver? Otherwise this and the snippet using slvoice_src_dir
|
||||
# can all go
|
||||
if( ARCH_PREBUILT_BIN_RELEASE )
|
||||
set(slvoice_src_dir "${ARCH_PREBUILT_BIN_RELEASE}")
|
||||
endif()
|
||||
set(slvoice_files SLVoice.exe )
|
||||
if (ADDRESS_SIZE EQUAL 64)
|
||||
list(APPEND vivox_libs
|
||||
|
|
@ -92,14 +94,14 @@ if(WINDOWS)
|
|||
endif (USE_BUGSPLAT)
|
||||
|
||||
set(release_files ${release_files} growl++.dll growl.dll )
|
||||
if (FMODSTUDIO)
|
||||
if (TARGET ll::fmodstudio)
|
||||
set(debug_files ${debug_files} fmodL.dll)
|
||||
set(release_files ${release_files} fmod.dll)
|
||||
endif (FMODSTUDIO)
|
||||
endif ()
|
||||
|
||||
if (OPENAL)
|
||||
if (TARGET ll::openal)
|
||||
list(APPEND release_files openal32.dll alut.dll)
|
||||
endif (OPENAL)
|
||||
endif ()
|
||||
|
||||
#*******************************
|
||||
# Copy MS C runtime dlls, required for packaging.
|
||||
|
|
@ -182,10 +184,6 @@ if(WINDOWS)
|
|||
endforeach()
|
||||
|
||||
elseif(DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
|
||||
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/Resources")
|
||||
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}/Release/Resources")
|
||||
|
||||
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(slvoice_files SLVoice)
|
||||
set(vivox_libs
|
||||
|
|
@ -215,10 +213,10 @@ elseif(DARWIN)
|
|||
libgrowl++.dylib
|
||||
)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
if (TARGET ll::fmodstudio)
|
||||
set(debug_files ${debug_files} libfmodL.dylib)
|
||||
set(release_files ${release_files} libfmod.dylib)
|
||||
endif (FMODSTUDIO)
|
||||
endif ()
|
||||
|
||||
elseif(LINUX)
|
||||
# linux is weird, multiple side by side configurations aren't supported
|
||||
|
|
@ -267,10 +265,26 @@ elseif(LINUX)
|
|||
)
|
||||
endif (NOT USESYSTEMLIBS)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
if( USE_AUTOBUILD_3P )
|
||||
list( APPEND release_files
|
||||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
|
||||
|
||||
libhunspell-1.3.so.0.0.0
|
||||
libuuid.so.16
|
||||
libuuid.so.16.0.22
|
||||
|
||||
|
||||
libgmodule-2.0.a
|
||||
libgobject-2.0.a
|
||||
)
|
||||
endif()
|
||||
|
||||
if (TARGET ll::fmodstudio)
|
||||
set(debug_files ${debug_files} "libfmodL.so")
|
||||
set(release_files ${release_files} "libfmod.so")
|
||||
endif (FMODSTUDIO)
|
||||
endif ()
|
||||
|
||||
else(WINDOWS)
|
||||
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
|
||||
|
|
@ -300,13 +314,16 @@ endif(WINDOWS)
|
|||
# Curiously, slvoice_files are only copied to SHARED_LIB_STAGING_DIR_RELEASE.
|
||||
# It's unclear whether this is oversight or intentional, but anyway leave the
|
||||
# single copy_if_different command rather than using to_staging_dirs.
|
||||
copy_if_different(
|
||||
${slvoice_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||
out_targets
|
||||
${slvoice_files}
|
||||
|
||||
if( slvoice_src_dir )
|
||||
copy_if_different(
|
||||
${slvoice_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||
out_targets
|
||||
${slvoice_files}
|
||||
)
|
||||
list(APPEND third_party_targets ${out_targets})
|
||||
list(APPEND third_party_targets ${out_targets})
|
||||
endif()
|
||||
|
||||
to_staging_dirs(
|
||||
${vivox_lib_dir}
|
||||
|
|
@ -320,10 +337,16 @@ to_staging_dirs(
|
|||
${release_files}
|
||||
)
|
||||
|
||||
#<FS:TS> We need to do this regardless
|
||||
#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}
|
||||
)
|
||||
|
||||
if(DARWIN)
|
||||
# Support our "@executable_path/../Resources" load path for executables
|
||||
# that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE
|
||||
# directories.
|
||||
add_custom_command( TARGET stage_third_party_libs POST_BUILD
|
||||
COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
add_library( ll::dbus INTERFACE IMPORTED)
|
||||
|
||||
if( LINUX )
|
||||
# Only define this when not using the prebuild 3ps, lls prebuild is broken
|
||||
if( NOT USE_AUTOBUILD_3P )
|
||||
target_compile_definitions( ll::dbus INTERFACE LL_DBUS_ENABLED )
|
||||
endif()
|
||||
use_system_binary(dbus)
|
||||
|
||||
use_prebuilt_binary(dbus_glib)
|
||||
endif()
|
||||
|
|
@ -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)
|
||||
#endif (LINUX)
|
||||
|
||||
endif (OS_DRAG_DROP)
|
||||
if (LINUX)
|
||||
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
|
||||
endif (LINUX)
|
||||
endif (OS_DRAG_DROP)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,20 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(EXPAT_FIND_QUIETLY ON)
|
||||
set(EXPAT_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( 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_system_binary(expat)
|
||||
use_prebuilt_binary(expat)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::expat INTERFACE libexpatMT )
|
||||
set(EXPAT_COPY libexpatMT.dll)
|
||||
else (WINDOWS)
|
||||
target_link_libraries( ll::expat INTERFACE expat )
|
||||
if (DARWIN)
|
||||
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
|
||||
else ()
|
||||
set(EXPAT_COPY libexpat.so.1 libexpat.so)
|
||||
endif ()
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
|
|
|
|||
|
|
@ -2,15 +2,5 @@
|
|||
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)
|
||||
elseif (LINUX)
|
||||
endif (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -1,48 +1,50 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
# FMOD Studio can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON
|
||||
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.
|
||||
# Open source devs should use the -DFMODSTUDIO:BOOL=ON then if they want to build with FMOD, whether
|
||||
# they are using USESYSTEMLIBS or not.
|
||||
if (INSTALL_PROPRIETARY)
|
||||
set(FMODSTUDIO ON CACHE BOOL "Using FMOD Studio sound library.")
|
||||
set(USE_FMODSTUDIO ON CACHE BOOL "Using FMODSTUDIO sound library.")
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
|
||||
# ND: To streamline arguments passed, switch from FMODSTUDIO to USE_FMODSTUDIO
|
||||
# To not break all old build scripts convert old arguments but warn about it
|
||||
if(FMODSTUDIO)
|
||||
message( WARNING "Use of the FMODSTUDIO argument is deprecated, please switch to USE_FMODSTUDIO")
|
||||
set(USE_FMODSTUDIO ${FMODSTUDIO})
|
||||
endif()
|
||||
|
||||
if (FMODSTUDIO)
|
||||
if (USESYSTEMLIBS)
|
||||
# In that case, we use the version of the library installed on the system
|
||||
set(FMODSTUDIO_FIND_REQUIRED ON)
|
||||
include(FindFMODSTUDIO)
|
||||
else (USESYSTEMLIBS)
|
||||
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
|
||||
# If the path have been specified in the arguments, use that
|
||||
set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
|
||||
MESSAGE(STATUS "Using FMODSTUDIO path: ${FMODSTUDIO_LIBRARIES}, ${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)
|
||||
# as accessing the private LL location will fail if you don't have the credential
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(fmodstudio)
|
||||
if (WINDOWS)
|
||||
set(FMODSTUDIO_LIBRARY
|
||||
debug fmodL_vc
|
||||
optimized fmod_vc)
|
||||
elseif (DARWIN)
|
||||
#despite files being called libfmod.dylib, we are searching for fmod
|
||||
set(FMODSTUDIO_LIBRARY
|
||||
debug fmodL
|
||||
optimized fmod)
|
||||
elseif (LINUX)
|
||||
set(FMODSTUDIO_LIBRARY
|
||||
debug fmodL
|
||||
optimized fmod)
|
||||
endif (WINDOWS)
|
||||
set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
|
||||
set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
||||
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
|
||||
endif (USESYSTEMLIBS)
|
||||
endif (FMODSTUDIO)
|
||||
if (USE_FMODSTUDIO)
|
||||
add_library( ll::fmodstudio INTERFACE IMPORTED )
|
||||
target_compile_definitions( ll::fmodstudio INTERFACE LL_FMODSTUDIO=1)
|
||||
|
||||
if (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
|
||||
# If the path have been specified in the arguments, use that
|
||||
|
||||
target_link_libraries(ll::fmodstudio INTERFACE ${FMODSTUDIO_LIBRARY})
|
||||
target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${FMODSTUDIO_INCLUDE_DIR})
|
||||
else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
|
||||
# If not, we're going to try to get the package listed in autobuild.xml
|
||||
# Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
|
||||
# as accessing the private LL location will fail if you don't have the credential
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(fmodstudio)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::fmodstudio INTERFACE fmod_vc)
|
||||
elseif (DARWIN)
|
||||
#despite files being called libfmod.dylib, we are searching for fmod
|
||||
target_link_libraries( ll::fmodstudio INTERFACE fmod)
|
||||
elseif (LINUX)
|
||||
target_link_libraries( ll::fmodstudio INTERFACE fmod)
|
||||
endif (WINDOWS)
|
||||
|
||||
target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/fmodstudio)
|
||||
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
|
||||
else()
|
||||
set( USE_FMODSTUDIO "OFF")
|
||||
endif ()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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} hunspell-1.4 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
|
||||
)
|
||||
|
|
@ -1,59 +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 NAMES jsoncpp/json.h jsoncpp/json/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)
|
||||
|
||||
# On standalone, assume that the system installed library was compiled with the used compiler.
|
||||
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so libjsoncpp.so)
|
||||
|
||||
FIND_LIBRARY(JSONCPP_LIBRARY
|
||||
NAMES ${JSONCPP_NAMES}
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -1,53 +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-2.1
|
||||
/usr/local/include/openjpeg
|
||||
/usr/local/include
|
||||
/usr/include/openjpeg-2.1
|
||||
/usr/include/openjpeg
|
||||
/usr/include
|
||||
include/openjpeg
|
||||
)
|
||||
|
||||
SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjp2)
|
||||
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
|
||||
)
|
||||
|
|
@ -1,44 +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)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
@ -1,19 +1,15 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindPkgConfig)
|
||||
include_guard()
|
||||
add_library( ll::freetype INTERFACE IMPORTED )
|
||||
|
||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||
else (USESYSTEMLIBS)
|
||||
if (LINUX) # <FS:PC> linux fontconfig and freetype should come
|
||||
find_package(Freetype REQUIRED) # from the user's system
|
||||
else (LINUX) # Linux links this via llwindow/CMakeLists
|
||||
use_prebuilt_binary(freetype)
|
||||
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2) #<FS:ND/> Also add freetype2 to search dir, or some includes will fail.
|
||||
set(FREETYPE_LIBRARIES freetype)
|
||||
endif()
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
link_directories(${FREETYPE_LIBRARY_DIRS})
|
||||
if (LINUX)
|
||||
find_package(Freetype REQUIRED) # <FS:PC> linux fontconfig and freetype should come from the user's system Linux links this via llwindow/CMakeLists
|
||||
target_link_libraries( ll::freetype INTERFACE Freetype::Freetype )
|
||||
else ()
|
||||
use_system_binary(freetype)
|
||||
use_prebuilt_binary(freetype)
|
||||
target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/)
|
||||
target_link_libraries( ll::freetype INTERFACE freetype )
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
include(GLH)
|
||||
|
||||
add_library( ll::glext INTERFACE IMPORTED )
|
||||
if (WINDOWS OR LINUX)
|
||||
use_system_binary(glext)
|
||||
use_prebuilt_binary(glext)
|
||||
endif (WINDOWS OR LINUX)
|
||||
|
||||
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(GLH_FIND_REQUIRED TRUE)
|
||||
set(GLH_FIND_QUIETLY TRUE)
|
||||
add_library( ll::glh_linear INTERFACE IMPORTED )
|
||||
|
||||
#if (USESYSTEMLIBS)
|
||||
# include(FindGLH)
|
||||
#else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(glh_linear)
|
||||
#endif (USESYSTEMLIBS)
|
||||
use_system_binary( glh_linear )
|
||||
use_prebuilt_binary(glh_linear)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
#if (USESYSTEMLIBS)
|
||||
# set(GLOD_FIND_REQUIRED true)
|
||||
# include(FindGLOD)
|
||||
#else (USESYSTEMLIBS)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(glod)
|
||||
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
if(LINUX)
|
||||
set(GLOD_LIBRARIES GLOD vds)
|
||||
else()
|
||||
set(GLOD_LIBRARIES GLOD)
|
||||
endif()
|
||||
#endif (USESYSTEMLIBS)
|
||||
include_guard()
|
||||
add_library( fs::glod INTERFACE IMPORTED )
|
||||
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(glod)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( fs::glod INTERFACE glod.lib)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( fs::glod INTERFACE libGLOD.dylib)
|
||||
elseif (LINUX)
|
||||
target_link_libraries( fs::glod INTERFACE libGLOD.a libvds.a)
|
||||
endif (WINDOWS)
|
||||
|
||||
target_include_directories( fs::glod SYSTEM INTERFACE
|
||||
${AUTOBUILD_INSTALL_DIR}/include/glod
|
||||
)
|
||||
|
|
@ -1,38 +1,14 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
if (NOT LINUX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindPkgConfig)
|
||||
add_library( ll::gstreamer INTERFACE IMPORTED )
|
||||
target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1)
|
||||
use_system_binary(gstreamer)
|
||||
|
||||
pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
|
||||
pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
|
||||
elseif (LINUX)
|
||||
use_prebuilt_binary(gstreamer)
|
||||
# possible libxml2 should have its own .cmake file instead
|
||||
use_prebuilt_binary(libxml2)
|
||||
set(GSTREAMER010_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER010_PLUGINS_BASE_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER010_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include/gstreamer-0.10
|
||||
${LIBS_PREBUILT_DIR}/include/glib-2.0
|
||||
${LIBS_PREBUILT_DIR}/include/libxml2
|
||||
)
|
||||
# We don't need to explicitly link against gstreamer itself, because
|
||||
# LLMediaImplGStreamer probes for the system's copy at runtime.
|
||||
set(GSTREAMER010_LIBRARIES
|
||||
gobject-2.0
|
||||
gmodule-2.0
|
||||
dl
|
||||
gthread-2.0
|
||||
glib-2.0
|
||||
)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
|
||||
set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")
|
||||
endif (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
|
||||
|
||||
if (GSTREAMER010)
|
||||
add_definitions(-DLL_GSTREAMER010_ENABLED=1)
|
||||
endif (GSTREAMER010)
|
||||
use_prebuilt_binary(gstreamer)
|
||||
|
||||
# <FS:Zi> Not sure if this is the correct place to add this, but it works
|
||||
target_include_directories( ll::gstreamer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/gstreamer-0.10)
|
||||
|
|
|
|||
|
|
@ -1,32 +1,13 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
include(GLIB)
|
||||
if (NOT LINUX)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindPkgConfig)
|
||||
|
||||
pkg_check_modules(GSTREAMER10 REQUIRED gstreamer-1.0)
|
||||
pkg_check_modules(GSTREAMER10_PLUGINS_BASE REQUIRED gstreamer-plugins-base-1.0)
|
||||
elseif (LINUX OR WINDOWS)
|
||||
use_prebuilt_binary(gstreamer10)
|
||||
use_prebuilt_binary(libxml2)
|
||||
set(GSTREAMER10_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER10_PLUGINS_BASE_FOUND ON FORCE BOOL)
|
||||
set(GSTREAMER10_INCLUDE_DIRS
|
||||
${GLIB_INCLUDE_DIRS}
|
||||
${LIBS_PREBUILT_DIR}/include/gstreamer-1.0
|
||||
${LIBS_PREBUILT_DIR}/include/libxml2
|
||||
)
|
||||
# We don't need to explicitly link against gstreamer itself, because
|
||||
# LLMediaImplGStreamer probes for the system's copy at runtime.
|
||||
set(GSTREAMER10_LIBRARIES)
|
||||
endif (USESYSTEMLIBS)
|
||||
|
||||
if (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
|
||||
set(GSTREAMER10 ON CACHE BOOL "Build with GStreamer-1.0 streaming media support.")
|
||||
endif (GSTREAMER10_FOUND AND GSTREAMER10_PLUGINS_BASE_FOUND)
|
||||
|
||||
if (GSTREAMER10)
|
||||
add_definitions(-DLL_GSTREAMER10_ENABLED=1)
|
||||
endif (GSTREAMER10)
|
||||
add_library( ll::gstreamer INTERFACE IMPORTED )
|
||||
target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1)
|
||||
use_system_binary(gstreamer10)
|
||||
|
||||
use_prebuilt_binary(gstreamer10)
|
||||
use_prebuilt_binary(libxml2)
|
||||
target_include_directories( ll::gstreamer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/gstreamer-1.0)
|
||||
|
|
|
|||
|
|
@ -2,27 +2,31 @@
|
|||
include(Prebuilt)
|
||||
include(Linking)
|
||||
|
||||
include_guard()
|
||||
|
||||
add_library( ll::googlemock INTERFACE IMPORTED )
|
||||
if(USE_CONAN)
|
||||
target_link_libraries( ll::googlemock INTERFACE CONAN_PKG::gtest )
|
||||
|
||||
#Not very nice, but for the moment we need this for tut.hpp
|
||||
target_include_directories( ll::googlemock SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
return()
|
||||
endif()
|
||||
|
||||
use_prebuilt_binary(googlemock)
|
||||
|
||||
set(GOOGLEMOCK_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include)
|
||||
target_include_directories( ll::googlemock SYSTEM INTERFACE ${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)
|
||||
target_link_libraries( ll::googlemock INTERFACE 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)
|
||||
target_link_libraries( ll::googlemock INTERFACE gmock)
|
||||
target_include_directories( ll::googlemock SYSTEM INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_DIR}/include/gmock)
|
||||
elseif(DARWIN)
|
||||
set(GOOGLEMOCK_LIBRARIES
|
||||
gmock
|
||||
gtest)
|
||||
target_link_libraries( ll::googlemock INTERFACE gmock gtest)
|
||||
endif(LINUX)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,23 +2,22 @@
|
|||
|
||||
# Growl is actually libnotify on linux systems.
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
if( LINUX )
|
||||
add_definitions( -DHAS_GROWL)
|
||||
endif( LINUX )
|
||||
#set(LIBNOTIFY_FIND_REQUIRED ON)
|
||||
#include(FindLibnotify)
|
||||
#set(GROWL_INCLUDE_DIRS ${LIBNOTIFY_INCLUDE_DIR})
|
||||
#set(GROWL_LIBRARY ${LIBNOTIFY_LIBRARIES})
|
||||
else (USESYSTEMLIBS)
|
||||
if (DARWIN OR WINDOWS)
|
||||
# Growl is making some problems still
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(gntp-growl)
|
||||
set(GROWL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/Growl)
|
||||
set(GROWL_LIBRARY growl growl++)
|
||||
add_definitions( -DHAS_GROWL)
|
||||
elseif (LINUX)
|
||||
add_definitions( -DHAS_GROWL)
|
||||
endif ()
|
||||
endif (USESYSTEMLIBS)
|
||||
if (DARWIN OR WINDOWS) # <FS:Zi> no need to do these things on Linux
|
||||
|
||||
include_guard()
|
||||
add_library( fs::growl INTERFACE IMPORTED )
|
||||
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(gntp-growl)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( fs::growl INTERFACE growl.lib growl++.lib)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( fs:growl INTERFACE libgrowl.dylib libgrowl++.dylib)
|
||||
endif (WINDOWS)
|
||||
|
||||
target_include_directories( fs::growl SYSTEM INTERFACE
|
||||
${AUTOBUILD_INSTALL_DIR}/include/Growl
|
||||
)
|
||||
endif (DARWIN OR WINDOWS) # <FS:Zi> no need to do these things on Linux
|
||||
|
||||
add_compile_definitions(HAS_GROWL)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(HUNSPELL_FIND_QUIETLY ON)
|
||||
set(HUNSPELL_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
use_prebuilt_binary(dictionaries)
|
||||
|
||||
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 libhunspell-1.3.a)
|
||||
else()
|
||||
message(FATAL_ERROR "Invalid platform")
|
||||
endif()
|
||||
set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell)
|
||||
use_prebuilt_binary(dictionaries)
|
||||
endif (USESYSTEMLIBS)
|
||||
add_library( ll::hunspell INTERFACE IMPORTED )
|
||||
use_system_binary(hunspell)
|
||||
use_prebuilt_binary(libhunspell)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::hunspell INTERFACE libhunspell)
|
||||
elseif(DARWIN)
|
||||
target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
|
||||
elseif(LINUX)
|
||||
target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
|
||||
endif()
|
||||
target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
|
||||
|
|
|
|||
|
|
@ -2,19 +2,17 @@
|
|||
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()
|
||||
add_library( ll::libjpeg INTERFACE IMPORTED )
|
||||
|
||||
use_system_binary(libjpeg)
|
||||
use_prebuilt_binary(jpeglib)
|
||||
if (LINUX)
|
||||
target_link_libraries( ll::libjpeg INTERFACE jpeg)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::libjpeg INTERFACE jpeg)
|
||||
elseif (WINDOWS)
|
||||
target_link_libraries( ll::libjpeg INTERFACE jpeglib)
|
||||
endif (LINUX)
|
||||
target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
include(Prebuilt)
|
||||
include_guard()
|
||||
add_library( ll::jsoncpp INTERFACE IMPORTED )
|
||||
|
||||
set(JSONCPP_FIND_QUIETLY ON)
|
||||
set(JSONCPP_FIND_REQUIRED ON)
|
||||
use_system_binary(jsoncpp)
|
||||
|
||||
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-5.4.0_libmt.a)
|
||||
endif (WINDOWS)
|
||||
set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/")
|
||||
endif (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(jsoncpp)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::jsoncpp INTERFACE json_libmd.lib )
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::jsoncpp INTERFACE libjson_darwin_libmt.a )
|
||||
elseif (LINUX)
|
||||
target_link_libraries( ll::jsoncpp INTERFACE libjson_linux-gcc-5.4.0_libmt.a )
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::jsoncpp SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -22,102 +22,86 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
|
|||
# * properties for each sourcefile passed in indicate what libs to link that file with (MAKE NO ASSUMPTIONS ASIDE FROM TUT)
|
||||
#
|
||||
# More info and examples at: https://wiki.secondlife.com/wiki/How_to_add_unit_tests_to_indra_code
|
||||
#
|
||||
# WARNING: do NOT modify this code without working with poppy -
|
||||
# there is another branch that will conflict heavily with any changes here.
|
||||
# <FS:ND> Google Mock/Test is not used
|
||||
#INCLUDE(GoogleMock)
|
||||
# </FS:ND>
|
||||
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
# This here looks weird, but is needed. It will inject GoogleMock into projects that forgot to include `this` (LLAddBuildTest.cmake)
|
||||
# But through some other means have access to this macro
|
||||
include(GoogleMock)
|
||||
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")
|
||||
endif()
|
||||
|
||||
# Start with the header and project-wide setup before making targets
|
||||
#project(UNITTEST_PROJECT_${project})
|
||||
# Setup includes, paths, etc
|
||||
SET(alltest_SOURCE_FILES
|
||||
${CMAKE_SOURCE_DIR}/test/test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/lltut.cpp
|
||||
)
|
||||
SET(alltest_DEP_TARGETS
|
||||
# needed by the test harness itself
|
||||
${APRUTIL_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
llcommon
|
||||
)
|
||||
IF(NOT "${project}" STREQUAL "llmath")
|
||||
set(alltest_SOURCE_FILES
|
||||
${CMAKE_SOURCE_DIR}/test/test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/lltut.cpp
|
||||
)
|
||||
set(alltest_DEP_TARGETS
|
||||
# needed by the test harness itself
|
||||
llcommon
|
||||
)
|
||||
|
||||
set(alltest_LIBRARIES
|
||||
llcommon
|
||||
ll::googlemock
|
||||
)
|
||||
if(NOT "${project}" STREQUAL "llmath")
|
||||
# add llmath as a dep unless the tested module *is* llmath!
|
||||
LIST(APPEND alltest_DEP_TARGETS
|
||||
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}
|
||||
)
|
||||
list(APPEND alltest_DEP_TARGETS llmath)
|
||||
list(APPEND alltest_LIBRARIES llmath )
|
||||
endif()
|
||||
|
||||
# Headers, for convenience in targets.
|
||||
SET(alltest_HEADER_FILES
|
||||
${CMAKE_SOURCE_DIR}/test/test.h
|
||||
)
|
||||
set(alltest_HEADER_FILES ${CMAKE_SOURCE_DIR}/test/test.h)
|
||||
|
||||
# start the source test executable definitions
|
||||
SET(${project}_TEST_OUTPUT "")
|
||||
FOREACH (source ${sources})
|
||||
STRING( REGEX REPLACE "(.*)\\.[^.]+$" "\\1" name ${source} )
|
||||
STRING( REGEX REPLACE ".*\\.([^.]+)$" "\\1" extension ${source} )
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} individual source: ${source} (${name}.${extension})")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
set(${project}_TEST_OUTPUT "")
|
||||
foreach (source ${sources})
|
||||
string( REGEX REPLACE "(.*)\\.[^.]+$" "\\1" name ${source} )
|
||||
string( REGEX REPLACE ".*\\.([^.]+)$" "\\1" extension ${source} )
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} individual source: ${source} (${name}.${extension})")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Per-codefile additional / external source, header, and include dir property extraction
|
||||
#
|
||||
# Source
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_SOURCE_FILES ${source} LL_TEST_ADDITIONAL_SOURCE_FILES)
|
||||
SET(${name}_test_SOURCE_FILES
|
||||
${source}
|
||||
tests/${name}_test.${extension}
|
||||
${alltest_SOURCE_FILES}
|
||||
${${name}_test_additional_SOURCE_FILES} )
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
SET_PROPERTY(SOURCE ${${name}_test_SOURCE_FILES}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
set(${name}_test_SOURCE_FILES
|
||||
${source}
|
||||
tests/${name}_test.${extension}
|
||||
${alltest_SOURCE_FILES}
|
||||
${${name}_test_additional_SOURCE_FILES} )
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}")
|
||||
endif()
|
||||
|
||||
# Headers
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES)
|
||||
SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES})
|
||||
set_source_files_properties(${${name}_test_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
LIST(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES})
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
# Include dirs
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_INCLUDE_DIRS ${source} LL_TEST_ADDITIONAL_INCLUDE_DIRS)
|
||||
INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${${name}_test_additional_INCLUDE_DIRS} )
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_INCLUDE_DIRS ${${name}_test_additional_INCLUDE_DIRS}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
||||
set(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES})
|
||||
list(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES})
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}")
|
||||
endif()
|
||||
|
||||
# Setup target
|
||||
ADD_EXECUTABLE(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES})
|
||||
SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
|
||||
add_executable(PROJECT_${project}_TEST_${name} ${${name}_test_SOURCE_FILES})
|
||||
|
||||
# Cannot declare a dependency on ${project} because the executable create above will later declare
|
||||
# add_dependencies( ${project} ${project}_tests)
|
||||
# as such grab ${project}'s interface include dirs and inject them here
|
||||
get_property( ${name}_test_additional_INCLUDE_DIRS TARGET ${project} PROPERTY INTERFACE_INCLUDE_DIRECTORIES )
|
||||
target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${${name}_test_additional_INCLUDE_DIRS} )
|
||||
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_INCLUDE_DIRS ${source} LL_TEST_ADDITIONAL_INCLUDE_DIRS)
|
||||
target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${${name}_test_additional_INCLUDE_DIRS} )
|
||||
|
||||
target_include_directories (PROJECT_${project}_TEST_${name} PRIVATE ${LIBS_OPEN_DIR}/test )
|
||||
|
||||
set_target_properties(PROJECT_${project}_TEST_${name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
|
||||
|
||||
#
|
||||
# Per-codefile additional / external project dep and lib dep property extraction
|
||||
|
|
@ -127,142 +111,133 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
|
|||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_PROJECTS ${source} LL_TEST_ADDITIONAL_PROJECTS)
|
||||
# Libraries
|
||||
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_LIBRARIES ${source} LL_TEST_ADDITIONAL_LIBRARIES)
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_PROJECTS ${${name}_test_additional_PROJECTS}")
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_PROJECTS ${${name}_test_additional_PROJECTS}")
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
# 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}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${${name}_test_additional_CFLAGS}"
|
||||
COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}")
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
|
||||
set_target_properties(PROJECT_${project}_TEST_${name}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${${name}_test_additional_CFLAGS}"
|
||||
COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}")
|
||||
if(LL_TEST_VERBOSE)
|
||||
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Setup test targets
|
||||
#
|
||||
SET(TEST_EXE $<TARGET_FILE:PROJECT_${project}_TEST_${name}>)
|
||||
SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt)
|
||||
SET(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(TEST_EXE $<TARGET_FILE:PROJECT_${project}_TEST_${name}>)
|
||||
set(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/PROJECT_${project}_TEST_${name}_ok.txt)
|
||||
set(TEST_CMD ${TEST_EXE} --touch=${TEST_OUTPUT} --sourcedir=${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# daveh - what configuration does this use? Debug? it's cmake-time, not build time. + poppy 2009-04-19
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
if(LL_TEST_VERBOSE)
|
||||
message(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_cmd = ${TEST_CMD}")
|
||||
endif()
|
||||
|
||||
SET_TEST_PATH(LD_LIBRARY_PATH)
|
||||
LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${TEST_CMD})
|
||||
IF(LL_TEST_VERBOSE)
|
||||
MESSAGE(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}")
|
||||
ENDIF(LL_TEST_VERBOSE)
|
||||
# Add test
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${TEST_OUTPUT}
|
||||
COMMAND ${TEST_SCRIPT_CMD}
|
||||
DEPENDS PROJECT_${project}_TEST_${name}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
if(LL_TEST_VERBOSE)
|
||||
message(STATUS "LL_ADD_PROJECT_UNIT_TESTS ${name} test_script = ${TEST_SCRIPT_CMD}")
|
||||
endif()
|
||||
|
||||
# Add test
|
||||
add_custom_command(
|
||||
OUTPUT ${TEST_OUTPUT}
|
||||
COMMAND ${TEST_SCRIPT_CMD}
|
||||
DEPENDS PROJECT_${project}_TEST_${name}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
# Why not add custom target and add POST_BUILD command?
|
||||
# Slightly less uncertain behavior
|
||||
# (OUTPUT commands run non-deterministically AFAIK) + poppy 2009-04-19
|
||||
# > I did not use a post build step as I could not make it notify of a
|
||||
# > I did not use a post build step as I could not make it notify of a
|
||||
# > failure after the first time you build and fail a test. - daveh 2009-04-20
|
||||
LIST(APPEND ${project}_TEST_OUTPUT ${TEST_OUTPUT})
|
||||
ENDFOREACH (source)
|
||||
list(APPEND ${project}_TEST_OUTPUT ${TEST_OUTPUT})
|
||||
endforeach (source)
|
||||
|
||||
# Add the test runner target per-project
|
||||
# (replaces old _test_ok targets all over the place)
|
||||
ADD_CUSTOM_TARGET(${project}_tests ALL DEPENDS ${${project}_TEST_OUTPUT})
|
||||
ADD_DEPENDENCIES(${project} ${project}_tests)
|
||||
add_custom_target(${project}_tests ALL DEPENDS ${${project}_TEST_OUTPUT})
|
||||
add_dependencies(${project} ${project}_tests)
|
||||
ENDMACRO(LL_ADD_PROJECT_UNIT_TESTS)
|
||||
|
||||
#*****************************************************************************
|
||||
# GET_OPT_SOURCE_FILE_PROPERTY
|
||||
#*****************************************************************************
|
||||
MACRO(GET_OPT_SOURCE_FILE_PROPERTY var filename property)
|
||||
GET_SOURCE_FILE_PROPERTY(${var} "${filename}" "${property}")
|
||||
IF("${${var}}" MATCHES NOTFOUND)
|
||||
SET(${var} "")
|
||||
ENDIF("${${var}}" MATCHES NOTFOUND)
|
||||
get_source_file_property(${var} "${filename}" "${property}")
|
||||
if("${${var}}" MATCHES NOTFOUND)
|
||||
set(${var} "")
|
||||
endif()
|
||||
ENDMACRO(GET_OPT_SOURCE_FILE_PROPERTY)
|
||||
|
||||
#*****************************************************************************
|
||||
# LL_ADD_INTEGRATION_TEST
|
||||
#*****************************************************************************
|
||||
FUNCTION(LL_ADD_INTEGRATION_TEST
|
||||
testname
|
||||
additional_source_files
|
||||
library_dependencies
|
||||
# variable args
|
||||
)
|
||||
FUNCTION(LL_ADD_INTEGRATION_TEST
|
||||
testname
|
||||
additional_source_files
|
||||
library_dependencies
|
||||
# variable args
|
||||
)
|
||||
if(TEST_DEBUG)
|
||||
message(STATUS "Adding INTEGRATION_TEST_${testname} - debug output is on")
|
||||
endif(TEST_DEBUG)
|
||||
endif()
|
||||
|
||||
SET(source_files
|
||||
tests/${testname}_test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/lltut.cpp
|
||||
${additional_source_files}
|
||||
)
|
||||
set(source_files
|
||||
tests/${testname}_test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/test.cpp
|
||||
${CMAKE_SOURCE_DIR}/test/lltut.cpp
|
||||
${additional_source_files}
|
||||
)
|
||||
|
||||
SET(libraries
|
||||
${LEGACY_STDIO_LIBS}
|
||||
${library_dependencies}
|
||||
${BOOST_FIBER_LIBRARY}
|
||||
${BOOST_CONTEXT_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${GOOGLEMOCK_LIBRARIES}
|
||||
${PTHREAD_LIBRARY}
|
||||
)
|
||||
set(libraries
|
||||
${library_dependencies}
|
||||
ll::googlemock
|
||||
)
|
||||
|
||||
# Add test executable build target
|
||||
if(TEST_DEBUG)
|
||||
message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})")
|
||||
endif(TEST_DEBUG)
|
||||
ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
|
||||
COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(USESYSTEMLIBS)
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
|
||||
endif(USESYSTEMLIBS)
|
||||
add_executable(INTEGRATION_TEST_${testname} ${source_files})
|
||||
set_target_properties(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
|
||||
COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}"
|
||||
)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
SET_PROPERTY(SOURCE ${source_files}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
|
||||
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
|
||||
# Any changes made here should be replicated there.
|
||||
if (WINDOWS)
|
||||
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
|
||||
LINK_FLAGS_RELEASE ""
|
||||
)
|
||||
endif (WINDOWS)
|
||||
set_target_properties(INTEGRATION_TEST_${testname}
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:CONSOLE"
|
||||
)
|
||||
endif ()
|
||||
|
||||
# Add link deps to the executable
|
||||
if(TEST_DEBUG)
|
||||
message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})")
|
||||
endif(TEST_DEBUG)
|
||||
TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})
|
||||
endif()
|
||||
|
||||
target_link_libraries(INTEGRATION_TEST_${testname} ${libraries})
|
||||
target_include_directories (INTEGRATION_TEST_${testname} PRIVATE ${LIBS_OPEN_DIR}/test )
|
||||
|
||||
# Create the test running command
|
||||
SET(test_command ${ARGN})
|
||||
SET(TEST_EXE $<TARGET_FILE:INTEGRATION_TEST_${testname}>)
|
||||
LIST(FIND test_command "{}" test_exe_pos)
|
||||
IF(test_exe_pos LESS 0)
|
||||
set(test_command ${ARGN})
|
||||
set(TEST_EXE $<TARGET_FILE:INTEGRATION_TEST_${testname}>)
|
||||
list(FIND test_command "{}" test_exe_pos)
|
||||
if(test_exe_pos LESS 0)
|
||||
# The {} marker means "the full pathname of the test executable."
|
||||
# test_exe_pos -1 means we didn't find it -- so append the test executable
|
||||
# name to $ARGN, the variable part of the arg list. This is convenient
|
||||
|
|
@ -271,26 +246,26 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
|
|||
# pathname of the test program as the last of its args. You need specify
|
||||
# {} only if the test program's pathname isn't the last argument in the
|
||||
# desired command line.
|
||||
LIST(APPEND test_command "${TEST_EXE}")
|
||||
ELSE (test_exe_pos LESS 0)
|
||||
list(APPEND test_command "${TEST_EXE}")
|
||||
else (test_exe_pos LESS 0)
|
||||
# Found {} marker at test_exe_pos. Remove the {}...
|
||||
LIST(REMOVE_AT test_command test_exe_pos)
|
||||
list(REMOVE_AT test_command test_exe_pos)
|
||||
# ...and replace it with the actual name of the test executable.
|
||||
LIST(INSERT test_command test_exe_pos "${TEST_EXE}")
|
||||
ENDIF (test_exe_pos LESS 0)
|
||||
list(INSERT test_command test_exe_pos "${TEST_EXE}")
|
||||
endif()
|
||||
|
||||
SET_TEST_PATH(LD_LIBRARY_PATH)
|
||||
LL_TEST_COMMAND(TEST_SCRIPT_CMD "${LD_LIBRARY_PATH}" ${test_command})
|
||||
|
||||
if(TEST_DEBUG)
|
||||
message(STATUS "TEST_SCRIPT_CMD: ${TEST_SCRIPT_CMD}")
|
||||
endif(TEST_DEBUG)
|
||||
endif()
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET INTEGRATION_TEST_${testname}
|
||||
POST_BUILD
|
||||
COMMAND ${TEST_SCRIPT_CMD}
|
||||
)
|
||||
add_custom_command(
|
||||
TARGET INTEGRATION_TEST_${testname}
|
||||
POST_BUILD
|
||||
COMMAND ${TEST_SCRIPT_CMD}
|
||||
)
|
||||
|
||||
# Use CTEST? Not sure how to yet...
|
||||
# ADD_TEST(INTEGRATION_TEST_RUNNER_${testname} ${TEST_SCRIPT_CMD})
|
||||
|
|
@ -305,18 +280,14 @@ MACRO(SET_TEST_PATH LISTVAR)
|
|||
# We typically build/package only Release variants of third-party
|
||||
# libraries, so append the Release staging dir in case the library being
|
||||
# sought doesn't have a debug variant.
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release)
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${SHARED_LIB_STAGING_DIR}/Release)
|
||||
ELSEIF(DARWIN)
|
||||
# We typically build/package only Release variants of third-party
|
||||
# libraries, so append the Release staging dir in case the library being
|
||||
# sought doesn't have a debug variant.
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
|
||||
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} ${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)
|
||||
|
|
|
|||
|
|
@ -2,26 +2,9 @@
|
|||
|
||||
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}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLCHARACTER_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcharacter
|
||||
)
|
||||
|
||||
set(LLCHARACTER_LIBRARIES llcharacter)
|
||||
|
|
@ -5,38 +5,6 @@ include(Boost)
|
|||
include(EXPAT)
|
||||
include(Tracy)
|
||||
include(ZLIBNG)
|
||||
include(JsonCpp)
|
||||
|
||||
set(LLCOMMON_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcommon
|
||||
${APRUTIL_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}
|
||||
${TRACY_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(XmlRpcEpi)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLCRASHLOGGER_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llcrashlogger
|
||||
)
|
||||
|
||||
set(LLCRASHLOGGER_LIBRARIES llcrashlogger)
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLFILESYSTEM_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llfilesystem
|
||||
)
|
||||
|
||||
set(LLFILESYSTEM_LIBRARIES llfilesystem)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
include(OpenJPEG)
|
||||
|
||||
set(LLIMAGEJ2COJ_LIBRARIES llimagej2coj)
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLINVENTORY_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llinventory
|
||||
)
|
||||
|
||||
set(LLINVENTORY_LIBRARIES llinventory)
|
||||
|
|
@ -14,19 +14,20 @@ if( ADDRESS_SIZE EQUAL 64 )
|
|||
endif( WINDOWS OR LINUX )
|
||||
endif( ADDRESS_SIZE EQUAL 64 )
|
||||
|
||||
include_guard()
|
||||
add_library( ll::kdu INTERFACE IMPORTED )
|
||||
|
||||
if (USE_KDU)
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindKDU)
|
||||
else (USESYSTEMLIBS)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(kdu)
|
||||
if (WINDOWS)
|
||||
set(KDU_LIBRARY kdu${ND_KDU_SUFFIX}.lib)
|
||||
else (WINDOWS)
|
||||
set(KDU_LIBRARY libkdu${ND_KDU_SUFFIX}.a)
|
||||
endif (WINDOWS)
|
||||
set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
|
||||
endif (USESYSTEMLIBS)
|
||||
set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
|
||||
set(LLKDU_LIBRARIES llkdu)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(kdu)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::kdu INTERFACE kdu${ND_KDU_SUFFIX}.lib)
|
||||
else (WINDOWS)
|
||||
target_link_libraries( ll::kdu INTERFACE libkdu${ND_KDU_SUFFIX}.a)
|
||||
endif (WINDOWS)
|
||||
|
||||
target_include_directories( ll::kdu SYSTEM INTERFACE
|
||||
${AUTOBUILD_INSTALL_DIR}/include/kdu
|
||||
${LIBS_OPEN_DIR}/llkdu
|
||||
)
|
||||
endif (USE_KDU)
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLLOGIN_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/viewer_components/login
|
||||
)
|
||||
|
||||
set(LLLOGIN_LIBRARIES lllogin)
|
||||
|
|
@ -1,7 +1,2 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLMATH_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llmath
|
||||
)
|
||||
|
||||
set(LLMATH_LIBRARIES llmath)
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLMESHOPTIMIZER_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llmeshoptimizer
|
||||
)
|
||||
|
||||
set(LLMESHOPTIMIZER_LIBRARIES llmeshoptimizer)
|
||||
|
|
@ -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)
|
||||
|
|
@ -10,6 +10,9 @@ if (INSTALL_PROPRIETARY)
|
|||
set(HAVOK ON CACHE BOOL "Use Havok physics library")
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
|
||||
include_guard()
|
||||
add_library( llphysicsextensions_impl INTERFACE IMPORTED )
|
||||
|
||||
|
||||
# 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,14 +22,12 @@ if (HAVOK)
|
|||
include(Havok)
|
||||
use_prebuilt_binary(llphysicsextensions_source)
|
||||
set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/src)
|
||||
set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions)
|
||||
|
||||
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions)
|
||||
elseif (HAVOK_TPV)
|
||||
use_prebuilt_binary(llphysicsextensions_tpv)
|
||||
set(LLPHYSICSEXTENSIONS_LIBRARIES llphysicsextensions_tpv)
|
||||
|
||||
target_link_libraries( llphysicsextensions_impl INTERFACE llphysicsextensions_tpv)
|
||||
# <FS:ND> include paths for LLs version and ours are different.
|
||||
set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
||||
target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
||||
# </FS:ND>
|
||||
|
||||
# <FS:ND> havok lib get installed to packages/lib
|
||||
|
|
@ -40,14 +41,14 @@ else (HAVOK)
|
|||
# set(LLPHYSICSEXTENSIONS_SRC_DIR ${LIBS_PREBUILT_DIR}/llphysicsextensions/stub)
|
||||
# </FS:ND>
|
||||
|
||||
set(LLPHYSICSEXTENSIONS_LIBRARIES nd_hacdConvexDecomposition hacd nd_Pathing )
|
||||
target_link_libraries( llphysicsextensions_impl INTERFACE nd_hacdConvexDecomposition hacd nd_Pathing )
|
||||
|
||||
# <FS:ND> include paths for LLs version and ours are different.
|
||||
set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/ )
|
||||
target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/ )
|
||||
# </FS:ND>
|
||||
|
||||
endif (HAVOK)
|
||||
|
||||
# <FS:ND> include paths for LLs version and ours are different.
|
||||
#set(LLPHYSICSEXTENSIONS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
||||
#target_include_directories( llphysicsextensions_impl INTERFACE ${LIBS_PREBUILT_DIR}/include/llphysicsextensions)
|
||||
# </FS:ND>
|
||||
|
|
@ -1,17 +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(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
set(LLPLUGIN_LIBRARIES llplugin Threads::Threads)
|
||||
else (LINUX)
|
||||
set(LLPLUGIN_LIBRARIES llplugin)
|
||||
endif (LINUX)
|
||||
|
|
@ -4,49 +4,49 @@
|
|||
include(Prebuilt)
|
||||
include(Boost)
|
||||
|
||||
include_guard()
|
||||
|
||||
add_library( ll::pcre INTERFACE IMPORTED )
|
||||
add_library( ll::minizip-ng INTERFACE IMPORTED )
|
||||
add_library( ll::libxml INTERFACE IMPORTED )
|
||||
add_library( ll::colladadom INTERFACE IMPORTED )
|
||||
|
||||
# ND, needs fixup in collada conan pkg
|
||||
if( USE_CONAN )
|
||||
target_include_directories( ll::colladadom SYSTEM INTERFACE
|
||||
"${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/"
|
||||
"${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" )
|
||||
endif()
|
||||
|
||||
use_system_binary( colladadom )
|
||||
|
||||
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
|
||||
)
|
||||
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}
|
||||
)
|
||||
elseif (DARWIN)
|
||||
set(LLPRIMITIVE_LIBRARIES
|
||||
llprimitive
|
||||
debug collada14dom-d
|
||||
optimized collada14dom
|
||||
minizip # for collada libminizip.a
|
||||
xml2
|
||||
pcrecpp
|
||||
pcre
|
||||
iconv # Required by libxml2
|
||||
)
|
||||
elseif (LINUX)
|
||||
set(LLPRIMITIVE_LIBRARIES
|
||||
llprimitive
|
||||
debug collada14dom-d
|
||||
optimized collada14dom
|
||||
minizip
|
||||
xml2
|
||||
pcrecpp
|
||||
pcre
|
||||
)
|
||||
endif (WINDOWS)
|
||||
target_link_libraries( ll::pcre INTERFACE pcrecpp pcre )
|
||||
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::minizip-ng INTERFACE libminizip )
|
||||
else()
|
||||
target_link_libraries( ll::minizip-ng INTERFACE minizip )
|
||||
endif()
|
||||
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::libxml INTERFACE libxml2_a)
|
||||
else()
|
||||
target_link_libraries( ll::libxml INTERFACE xml2)
|
||||
endif()
|
||||
|
||||
target_include_directories( ll::colladadom SYSTEM INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/include/collada
|
||||
${LIBS_PREBUILT_DIR}/include/collada/1.4
|
||||
)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::colladadom INTERFACE libcollada14dom23-s ll::libxml ll::minizip-ng )
|
||||
elseif (DARWIN)
|
||||
target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
|
||||
elseif (LINUX)
|
||||
target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
@ -37,40 +37,3 @@ macro(ll_deploy_sharedlibs_command target_exe)
|
|||
endif(NOT DARWIN)
|
||||
|
||||
endmacro(ll_deploy_sharedlibs_command)
|
||||
|
||||
# ll_stage_sharedlib
|
||||
# Performs config and adds a copy command for a sharedlib target.
|
||||
macro(ll_stage_sharedlib DSO_TARGET)
|
||||
# target gets written to the DLL staging directory.
|
||||
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
||||
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
||||
if(NOT WINDOWS)
|
||||
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
|
||||
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
||||
if(DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
||||
else(DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
|
||||
endif(DARWIN)
|
||||
|
||||
# *TODO - maybe make this a symbolic link? -brad
|
||||
add_custom_command(
|
||||
TARGET ${DSO_TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-E
|
||||
copy_if_different
|
||||
${DSO_PATH}
|
||||
${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE}
|
||||
COMMENT "Copying llcommon to the staging folder."
|
||||
)
|
||||
endif(NOT WINDOWS)
|
||||
|
||||
if (DARWIN)
|
||||
set_target_properties(${DSO_TARGET} PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@executable_path/../Resources"
|
||||
)
|
||||
endif(DARWIN)
|
||||
|
||||
endmacro(ll_stage_sharedlib)
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(LLUI_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llui
|
||||
)
|
||||
|
||||
set(LLUI_LIBRARIES llui)
|
||||
|
|
@ -5,49 +5,36 @@ include(GLEXT)
|
|||
include(Prebuilt)
|
||||
|
||||
include_guard()
|
||||
add_library( ll::SDL INTERFACE IMPORTED )
|
||||
|
||||
add_library( sdl INTERFACE IMPORTED )
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindSDL)
|
||||
|
||||
# This should be done by FindSDL. Sigh.
|
||||
mark_as_advanced(
|
||||
SDLMAIN_LIBRARY
|
||||
SDL_INCLUDE_DIR
|
||||
SDL_LIBRARY
|
||||
)
|
||||
else (USESYSTEMLIBS)
|
||||
if (LINUX)
|
||||
if( USE_SDL1 )
|
||||
use_prebuilt_binary(SDL)
|
||||
set (SDL_FOUND TRUE)
|
||||
|
||||
target_link_libraries (sdl INTERFACE SDL directfb fusion direct X11)
|
||||
target_compile_definitions( sdl INTERFACE LL_SDL=1 )
|
||||
if (LINUX)
|
||||
#Must come first as use_system_binary can exit this file early
|
||||
#target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
|
||||
|
||||
else()
|
||||
use_prebuilt_binary(SDL2)
|
||||
set (SDL2_FOUND TRUE)
|
||||
#use_system_binary(SDL)
|
||||
#use_prebuilt_binary(SDL)
|
||||
|
||||
target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
||||
target_link_libraries( sdl INTERFACE SDL2 X11 )
|
||||
target_compile_definitions( sdl INTERFACE LL_SDL2=1 LL_SDL=1 )
|
||||
if( USE_SDL1 )
|
||||
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1 )
|
||||
|
||||
endif()
|
||||
use_system_binary(SDL)
|
||||
use_prebuilt_binary(SDL)
|
||||
set (SDL_FOUND TRUE)
|
||||
|
||||
endif (LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
target_link_libraries (ll::SDL INTERFACE SDL directfb fusion direct X11)
|
||||
|
||||
set(LLWINDOW_INCLUDE_DIRS
|
||||
${GLEXT_INCLUDE_DIR}
|
||||
${LIBS_OPEN_DIR}/llwindow
|
||||
)
|
||||
else()
|
||||
target_compile_definitions( ll::SDL INTERFACE LL_SDL2=1 LL_SDL=1 )
|
||||
|
||||
use_system_binary(SDL2)
|
||||
use_prebuilt_binary(SDL2)
|
||||
set (SDL2_FOUND TRUE)
|
||||
|
||||
target_link_libraries( ll::SDL INTERFACE SDL2 X11 )
|
||||
endif()
|
||||
endif (LINUX)
|
||||
|
||||
if (BUILD_HEADLESS)
|
||||
set(LLWINDOW_HEADLESS_LIBRARIES
|
||||
llwindowheadless
|
||||
)
|
||||
endif (BUILD_HEADLESS)
|
||||
|
||||
set(LLWINDOW_LIBRARIES
|
||||
llwindow
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -2,29 +2,26 @@
|
|||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
set(LIBVLCPLUGIN OFF CACHE BOOL
|
||||
include_guard()
|
||||
add_library( ll::libvlc INTERFACE IMPORTED )
|
||||
|
||||
use_prebuilt_binary(vlc-bin)
|
||||
set(LIBVLCPLUGIN ON CACHE BOOL
|
||||
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
|
||||
else (USESYSTEMLIBS)
|
||||
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)
|
||||
|
||||
if (WINDOWS)
|
||||
set(VLC_PLUGIN_LIBRARIES
|
||||
libvlc.lib
|
||||
libvlccore.lib
|
||||
target_link_libraries( ll::libvlc INTERFACE
|
||||
libvlc.lib
|
||||
libvlccore.lib
|
||||
)
|
||||
elseif (DARWIN)
|
||||
set(VLC_PLUGIN_LIBRARIES
|
||||
libvlc.dylib
|
||||
libvlccore.dylib
|
||||
target_link_libraries( ll::libvlc INTERFACE
|
||||
libvlc.dylib
|
||||
libvlccore.dylib
|
||||
)
|
||||
elseif (LINUX)
|
||||
# Specify a full path to make sure we get a static link
|
||||
set(VLC_PLUGIN_LIBRARIES
|
||||
target_link_libraries( ll::libvlc INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/lib/libvlc.a
|
||||
${LIBS_PREBUILT_DIR}/lib/libvlccore.a
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,24 +1,34 @@
|
|||
# -*- 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)
|
||||
set(ARCH_PREBUILT_DIRS_PLUGINS ${AUTOBUILD_INSTALL_DIR}/plugins)
|
||||
set(ARCH_PREBUILT_DIRS_RELEASE ${AUTOBUILD_INSTALL_DIR}/lib/release)
|
||||
set(ARCH_PREBUILT_DIRS_DEBUG ${AUTOBUILD_INSTALL_DIR}/lib/debug)
|
||||
if (WINDOWS)
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||
if (WINDOWS OR DARWIN )
|
||||
# Kludge for older cmake versions, 3.20+ is needed to use a genex in add_custom_command( OUTPUT <var> ... )
|
||||
# Using this will work okay-ish, as Debug is not supported anyway. But for property multi config and also
|
||||
# ninja support the genex version is preferred.
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.20.0")
|
||||
if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/Release)
|
||||
elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/RelWithDebInfo)
|
||||
endif()
|
||||
else()
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
|
||||
endif()
|
||||
|
||||
if( DARWIN )
|
||||
set( SHARED_LIB_STAGING_DIR ${SHARED_LIB_STAGING_DIR}/Resources)
|
||||
endif()
|
||||
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
|
||||
elseif (LINUX)
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/lib)
|
||||
set(EXE_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/bin)
|
||||
elseif (DARWIN)
|
||||
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs)
|
||||
set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
|
||||
endif (WINDOWS)
|
||||
endif ()
|
||||
|
||||
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
|
||||
# specific build types. AUTOBUILD_LIBS_INSTALL_DIRS lists first the build type directory and then
|
||||
|
|
@ -27,63 +37,54 @@ endif (WINDOWS)
|
|||
# windows) and CMAKE_BUILD_TYPE on Makefile based generators (like linux). The reason for this is
|
||||
# that CMAKE_BUILD_TYPE is essentially meaningless at configuration time for IDE generators and
|
||||
# CMAKE_CFG_INTDIR is meaningless at build time for Makefile generators
|
||||
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/")
|
||||
else(WINDOWS OR DARWIN)
|
||||
# else block is for linux and any other makefile based generators
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||
set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
|
||||
endif(WINDOWS OR DARWIN)
|
||||
|
||||
if( NOT USESYSTEMLIBS ) # <FS:ND/> Don't add any autobuild dirs when building standalone
|
||||
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/$<LOWER_CASE:$<CONFIG>>)
|
||||
link_directories(${AUTOBUILD_INSTALL_DIR}/lib/release)
|
||||
|
||||
# <FS:Ansariel> Changed for Firestorm
|
||||
#if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS_AVX" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS_open")
|
||||
# </FS:Ansariel> Changed for Firestorm
|
||||
# When we're building something other than Release, append the
|
||||
# packages/lib/release directory to deal with autobuild packages that don't
|
||||
# provide (e.g.) lib/debug libraries.
|
||||
list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
|
||||
|
||||
# <FS:Ansariel> Changed for Firestorm
|
||||
#endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS_AVX" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "ReleaseFS_open")
|
||||
# </FS:Ansariel> Changed for Firestorm
|
||||
|
||||
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
|
||||
|
||||
endif( NOT USESYSTEMLIBS ) # <FS:ND/> Don't add any autobuild dirs when building standalone
|
||||
add_library( ll::oslibraries INTERFACE IMPORTED )
|
||||
|
||||
if (LINUX)
|
||||
set(DL_LIBRARY dl)
|
||||
set(PTHREAD_LIBRARY pthread)
|
||||
else (LINUX)
|
||||
set(DL_LIBRARY "")
|
||||
set(PTHREAD_LIBRARY "")
|
||||
endif (LINUX)
|
||||
target_link_libraries( ll::oslibraries INTERFACE
|
||||
dl
|
||||
pthread
|
||||
rt)
|
||||
elseif (WINDOWS)
|
||||
target_link_libraries( ll::oslibraries INTERFACE
|
||||
advapi32
|
||||
shell32
|
||||
ws2_32
|
||||
mswsock
|
||||
psapi
|
||||
winmm
|
||||
netapi32
|
||||
wldap32
|
||||
gdi32
|
||||
user32
|
||||
ole32
|
||||
dbghelp
|
||||
legacy_stdio_definitions
|
||||
)
|
||||
else()
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
find_library(CARBON_LIBRARY Carbon)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
|
||||
find_library(AGL_LIBRARY AGL)
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
find_library(COREAUDIO_LIBRARY CoreAudio)
|
||||
|
||||
target_link_libraries( ll::oslibraries INTERFACE
|
||||
${COCOA_LIBRARY}
|
||||
${IOKIT_LIBRARY}
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
${CARBON_LIBRARY}
|
||||
${AGL_LIBRARY}
|
||||
${APPKIT_LIBRARY}
|
||||
${COREAUDIO_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
if (WINDOWS)
|
||||
set(WINDOWS_LIBRARIES
|
||||
advapi32
|
||||
shell32
|
||||
ws2_32
|
||||
mswsock
|
||||
psapi
|
||||
winmm
|
||||
netapi32
|
||||
wldap32
|
||||
gdi32
|
||||
user32
|
||||
ole32
|
||||
dbghelp
|
||||
)
|
||||
else (WINDOWS)
|
||||
set(WINDOWS_LIBRARIES "")
|
||||
endif (WINDOWS)
|
||||
|
||||
mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES)
|
||||
|
||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
use_prebuilt_binary(meshoptimizer)
|
||||
|
||||
if (WINDOWS)
|
||||
set(MESHOPTIMIZER_LIBRARIES meshoptimizer.lib)
|
||||
elseif (LINUX)
|
||||
set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
|
||||
elseif (DARWIN)
|
||||
set(MESHOPTIMIZER_LIBRARIES libmeshoptimizer.a)
|
||||
endif (WINDOWS)
|
||||
|
||||
set(MESHOPTIMIZER_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
# -*- cmake -*-
|
||||
set(CMAKE_VERBOSE_MAKEFILE ON) # <FS:Zi> remove this once things work
|
||||
|
||||
# <FS:ND> Try to find pulse header, if we got them we can use the linux volume catcher
|
||||
if (LINUX)
|
||||
|
|
@ -19,11 +20,10 @@ if (LINUX)
|
|||
message( "Building with linux volume catcher" )
|
||||
set(LINUX_VOLUME_CATCHER linux_volume_catcher.cpp)
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
|
||||
set(MEDIA_PLUGIN_BASE_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/media_plugins/base/
|
||||
)
|
||||
|
||||
set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
|
||||
set(MEDIA_PLUGIN_BASE_LIBRARIES media_plugin_base)
|
||||
|
||||
endif() # <FS:Zi> make sure no changes happen to other platforms by moving endif() here
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
include_guard()
|
||||
add_library( ll::meshoptimizer INTERFACE IMPORTED )
|
||||
|
||||
use_system_binary(meshoptimizer)
|
||||
use_prebuilt_binary(meshoptimizer)
|
||||
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib)
|
||||
elseif (LINUX)
|
||||
target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::meshoptimizer INTERFACE libmeshoptimizer.a)
|
||||
endif (WINDOWS)
|
||||
|
||||
target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer)
|
||||
|
|
@ -3,34 +3,22 @@ include(Prebuilt)
|
|||
|
||||
set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.")
|
||||
|
||||
include_guard()
|
||||
add_library( ll::ndof INTERFACE IMPORTED )
|
||||
|
||||
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)
|
||||
if (WINDOWS OR DARWIN)
|
||||
use_prebuilt_binary(libndofdev)
|
||||
elseif (LINUX)
|
||||
use_prebuilt_binary(open-libndofdev)
|
||||
endif (WINDOWS OR DARWIN)
|
||||
|
||||
if (WINDOWS)
|
||||
set(NDOF_LIBRARY libndofdev)
|
||||
elseif (DARWIN OR LINUX)
|
||||
set(NDOF_LIBRARY ndofdev)
|
||||
endif (WINDOWS)
|
||||
|
||||
set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
|
||||
set(NDOF_FOUND 1)
|
||||
endif (USESYSTEMLIBS)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::ndof INTERFACE libndofdev)
|
||||
elseif (DARWIN OR LINUX)
|
||||
target_link_libraries( ll::ndof INTERFACE 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)
|
||||
message(STATUS "Building without N-DoF joystick support")
|
||||
set(NDOF_INCLUDE_DIR "")
|
||||
set(NDOF_LIBRARY "")
|
||||
endif (NDOF_FOUND)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,18 @@
|
|||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
set(NGHTTP2_FIND_QUIETLY ON)
|
||||
set(NGHTTP2_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::nghttp2 INTERFACE IMPORTED )
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindNGHTTP2)
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(nghttp2)
|
||||
if (WINDOWS)
|
||||
set(NGHTTP2_LIBRARIES
|
||||
# <FS:Ansariel> ARCH_PREBUILT_DIRS_RELEASE is "." and would cause searching for the lib in the wrong place when not using VS
|
||||
#${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib
|
||||
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_system_binary(nghttp2)
|
||||
use_prebuilt_binary(nghttp2)
|
||||
if (WINDOWS)
|
||||
# <FS:Ansariel> ARCH_PREBUILT_DIRS_RELEASE is "." and would cause searching for the lib in the wrong place when not using VS
|
||||
##target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
|
||||
target_link_libraries( ll::nghttp2 INTERFACE nghttp2.lib)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.dylib)
|
||||
else (WINDOWS)
|
||||
target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a )
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2)
|
||||
|
|
|
|||
|
|
@ -5,12 +5,9 @@ set(NVAPI ON CACHE BOOL "Use NVAPI.")
|
|||
|
||||
if (NVAPI)
|
||||
if (WINDOWS)
|
||||
add_library( ll::nvapi INTERFACE IMPORTED )
|
||||
target_link_libraries( ll::nvapi INTERFACE nvapi)
|
||||
use_prebuilt_binary(nvapi)
|
||||
set(NVAPI_LIBRARY nvapi)
|
||||
else (WINDOWS)
|
||||
set(NVAPI_LIBRARY "")
|
||||
endif (WINDOWS)
|
||||
else (NVAPI)
|
||||
set(NVAPI_LIBRARY "")
|
||||
endif (NVAPI)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,33 +2,43 @@
|
|||
include(Linking)
|
||||
include(Prebuilt)
|
||||
|
||||
include_guard()
|
||||
|
||||
# ND: Turn this off by default, the openal code in the viewer isn't very well maintained, seems
|
||||
# to have memory leaks, has no option to play music streams
|
||||
# It probably makes sense to to completely remove it
|
||||
|
||||
set(USE_OPENAL OFF CACHE BOOL "Enable OpenAL")
|
||||
|
||||
# <FS:Zi> Always download the libopenal.so library on Linux for SLVoice
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(openal) #Always need the .so for voice
|
||||
set(OPENAL OFF CACHE BOOL "Enable OpenAL")
|
||||
else (LINUX)
|
||||
set(OPENAL OFF CACHE BOOL "Enable OpenAL")
|
||||
use_prebuilt_binary(openal)
|
||||
endif (LINUX)
|
||||
|
||||
if (OPENAL)
|
||||
message( WARNING "Using OpenAL is discouraged due to no maintenance of the viewers openal integration, possible memory leaks and no support for streaming audio. Switch to fmodstudio if possible" )
|
||||
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)
|
||||
# ND: To streamline arguments passed, switch from OPENAL to USE_OPENAL
|
||||
# To not break all old build scripts convert old arguments but warn about it
|
||||
if(OPENAL)
|
||||
message( WARNING "Use of the OPENAL argument is deprecated, please switch to USE_OPENAL")
|
||||
set(USE_OPENAL ${OPENAL})
|
||||
endif()
|
||||
|
||||
if (USE_OPENAL)
|
||||
add_library( ll::openal INTERFACE IMPORTED )
|
||||
target_include_directories( ll::openal SYSTEM INTERFACE "${LIBS_PREBUILT_DIR}/include/AL")
|
||||
target_compile_definitions( ll::openal INTERFACE LL_OPENAL=1)
|
||||
use_prebuilt_binary(openal)
|
||||
|
||||
if(WINDOWS)
|
||||
set(OPENAL_LIBRARIES
|
||||
OpenAL32
|
||||
alut
|
||||
)
|
||||
target_link_libraries( ll::openal INTERFACE
|
||||
OpenAL32
|
||||
alut
|
||||
)
|
||||
elseif(LINUX)
|
||||
target_link_libraries( ll::openal INTERFACE
|
||||
openal
|
||||
alut
|
||||
)
|
||||
else()
|
||||
set(OPENAL_LIBRARIES
|
||||
openal
|
||||
alut
|
||||
)
|
||||
message(FATAL_ERROR "OpenAL is not available for this platform")
|
||||
endif()
|
||||
endif (OPENAL)
|
||||
endif ()
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
if(LINUX)
|
||||
# <FS:Zi> make sure to link to libGL.so instead of libOpenGL.so so the linker does not
|
||||
# complain about libGL.so.1: error adding symbols: DSO missing from command line
|
||||
set(OpenGL_GL_PREFERENCE "LEGACY")
|
||||
endif()
|
||||
|
||||
include(Variables)
|
||||
include(Prebuilt)
|
||||
|
||||
# <FS:TS> Shut cmake up about OpenGL library preference. This can
|
||||
# be either LEGACY or GLVND.
|
||||
if (LINUX)
|
||||
SET(OpenGL_GL_PREFERENCE LEGACY)
|
||||
endif (LINUX)
|
||||
|
||||
if (BUILD_HEADLESS)
|
||||
SET(OPENGL_glu_LIBRARY GLU)
|
||||
SET(OPENGL_HEADLESS_LIBRARIES OSMesa16 dl GLU)
|
||||
endif (BUILD_HEADLESS)
|
||||
|
||||
include(FindOpenGL)
|
||||
|
||||
if(LINUX)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,11 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(OPENJPEG_FIND_QUIETLY ON)
|
||||
set(OPENJPEG_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::openjpeg INTERFACE IMPORTED )
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindOpenJPEG)
|
||||
else (USESYSTEMLIBS)
|
||||
use_prebuilt_binary(openjpeg)
|
||||
use_system_binary(openjpeg)
|
||||
use_prebuilt_binary(openjpeg)
|
||||
|
||||
set(OPENJPEG_LIBRARIES openjp2)
|
||||
set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg)
|
||||
endif (USESYSTEMLIBS)
|
||||
target_link_libraries(ll::openjpeg INTERFACE openjp2 )
|
||||
target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/openjpeg)
|
||||
|
|
|
|||
|
|
@ -1,23 +1,17 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(OpenSSL_FIND_QUIETLY ON)
|
||||
set(OpenSSL_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::openssl INTERFACE IMPORTED )
|
||||
|
||||
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_system_binary(openssl)
|
||||
use_prebuilt_binary(openssl)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::openssl INTERFACE libssl libcrypto)
|
||||
elseif (LINUX)
|
||||
target_link_libraries(ll::openssl INTERFACE ssl crypto dl)
|
||||
else()
|
||||
target_link_libraries(ll::openssl INTERFACE ssl crypto)
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::openssl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
||||
if (LINUX)
|
||||
set(CRYPTO_LIBRARIES crypto dl pthread)
|
||||
elseif (DARWIN)
|
||||
set(CRYPTO_LIBRARIES crypto)
|
||||
endif (LINUX)
|
||||
|
|
|
|||
|
|
@ -9,21 +9,14 @@ endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CM
|
|||
|
||||
include(Prebuilt)
|
||||
|
||||
set(PNG_FIND_QUIETLY ON)
|
||||
set(PNG_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::libpng INTERFACE IMPORTED )
|
||||
|
||||
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()
|
||||
set(PNG_LIBRARIES png16)
|
||||
set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng16)
|
||||
endif()
|
||||
endif (USESYSTEMLIBS)
|
||||
use_system_binary(libpng)
|
||||
use_prebuilt_binary(libpng)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::libpng INTERFACE libpng16)
|
||||
else()
|
||||
target_link_libraries(ll::libpng INTERFACE png16 )
|
||||
endif()
|
||||
target_include_directories( ll::libpng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/libpng16)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
add_library( ll::pluginlibraries INTERFACE IMPORTED )
|
||||
|
||||
if (WINDOWS)
|
||||
set(PLUGIN_API_WINDOWS_LIBRARIES
|
||||
target_link_libraries( ll::pluginlibraries INTERFACE
|
||||
wsock32
|
||||
ws2_32
|
||||
psapi
|
||||
|
|
@ -9,8 +11,6 @@ if (WINDOWS)
|
|||
advapi32
|
||||
user32
|
||||
)
|
||||
else (WINDOWS)
|
||||
set(PLUGIN_API_WINDOWS_LIBRARIES "")
|
||||
endif (WINDOWS)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -25,40 +23,50 @@ endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING
|
|||
# of previous attempts is serialized in the file
|
||||
# ${PREBUILD_TRACKING_DIR}/${_binary}_installed)
|
||||
macro (use_prebuilt_binary _binary)
|
||||
if (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||
set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS})
|
||||
endif (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||
if( NOT DEFINED ${_binary}_installed )
|
||||
set( ${_binary}_installed "")
|
||||
endif()
|
||||
|
||||
if (NOT USESYSTEMLIBS_${_binary})
|
||||
if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed")
|
||||
file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed")
|
||||
if(DEBUG_PREBUILT)
|
||||
message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"")
|
||||
endif(DEBUG_PREBUILT)
|
||||
file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed")
|
||||
if(DEBUG_PREBUILT)
|
||||
message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"")
|
||||
endif(DEBUG_PREBUILT)
|
||||
endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed")
|
||||
|
||||
if(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0)
|
||||
if(DEBUG_PREBUILT)
|
||||
message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install
|
||||
if(DEBUG_PREBUILT)
|
||||
message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install
|
||||
--install-dir=${AUTOBUILD_INSTALL_DIR}
|
||||
${_binary} ")
|
||||
endif(DEBUG_PREBUILT)
|
||||
execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}"
|
||||
install
|
||||
--install-dir=${AUTOBUILD_INSTALL_DIR}
|
||||
${_binary}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE ${_binary}_installed
|
||||
)
|
||||
file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}")
|
||||
endif(DEBUG_PREBUILT)
|
||||
execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}"
|
||||
install
|
||||
--install-dir=${AUTOBUILD_INSTALL_DIR}
|
||||
${_binary}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE ${_binary}_installed
|
||||
)
|
||||
file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}")
|
||||
endif(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0)
|
||||
|
||||
if(NOT ${_binary}_installed EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"Failed to download or unpack prebuilt '${_binary}'."
|
||||
" Process returned ${${_binary}_installed}.")
|
||||
message(FATAL_ERROR
|
||||
"Failed to download or unpack prebuilt '${_binary}'."
|
||||
" Process returned ${${_binary}_installed}.")
|
||||
endif (NOT ${_binary}_installed EQUAL 0)
|
||||
endif (NOT USESYSTEMLIBS_${_binary})
|
||||
endmacro (use_prebuilt_binary _binary)
|
||||
|
||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
#Sadly we need a macro here, otherwise the return() will not properly work
|
||||
macro ( use_system_binary package )
|
||||
if( USE_CONAN )
|
||||
target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} )
|
||||
foreach( extra_pkg "${ARGN}" )
|
||||
if( extra_pkg )
|
||||
target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${extra_pkg} )
|
||||
endif()
|
||||
endforeach()
|
||||
return()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,4 @@
|
|||
# -*- cmake -*-
|
||||
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)
|
||||
endif (PULSEAUDIO)
|
||||
|
||||
if (PULSEAUDIO_FOUND)
|
||||
add_definitions(-DLL_PULSEAUDIO_ENABLED=1)
|
||||
endif (PULSEAUDIO_FOUND)
|
||||
message( FATAL_ERROR "Pulseaudio cmake file is broken" )
|
||||
|
|
|
|||
|
|
@ -13,30 +13,51 @@ if (WINDOWS)
|
|||
NO_DEFAULT_PATH
|
||||
)
|
||||
else()
|
||||
# if the user has their own version of Python installed, prefer that
|
||||
foreach(hive HKEY_CURRENT_USER HKEY_LOCAL_MACHINE)
|
||||
# prefer more recent Python versions to older ones, if multiple versions
|
||||
# are installed
|
||||
foreach(pyver 3.11 3.10 3.9)
|
||||
list(APPEND regpaths "[${hive}\\SOFTWARE\\Python\\PythonCore\\${pyver}\\InstallPath]")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# TODO: This logic has the disadvantage that if you have multiple versions
|
||||
# of Python installed, the selected path won't necessarily be the newest -
|
||||
# e.g. this GLOB will prefer Python310 to Python311. But since pymaybe is
|
||||
# checked AFTER the registry entries, this will only surface as a problem if
|
||||
# no installed Python appears in the registry.
|
||||
file(GLOB pymaybe
|
||||
"$ENV{PROGRAMFILES}/Python*"
|
||||
## "$ENV{PROGRAMFILES(X86)}/Python*"
|
||||
# The Windows environment variable is in fact as shown above, but CMake
|
||||
# disallows querying an environment variable containing parentheses -
|
||||
# thanks, Windows. Fudge by just appending " (x86)" to $PROGRAMFILES and
|
||||
# hoping for the best.
|
||||
"$ENV{PROGRAMFILES} (x86)/Python*"
|
||||
"c:/Python*")
|
||||
|
||||
set(Python3_FIND_REGISTRY "LAST")
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python.exe
|
||||
find_program(python
|
||||
NAMES python3.exe python.exe
|
||||
NO_DEFAULT_PATH # added so that cmake does not find cygwin python
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.9\\InstallPath]
|
||||
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\3.10\\InstallPath]
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\3.11\\InstallPath]
|
||||
${regpaths}
|
||||
${pymaybe}
|
||||
)
|
||||
endif()
|
||||
include(FindPythonInterp)
|
||||
else()
|
||||
find_program(PYTHON_EXECUTABLE python3)
|
||||
find_program(python python3)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
if (python)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
endif (python)
|
||||
endif (WINDOWS)
|
||||
|
||||
if (NOT PYTHON_EXECUTABLE)
|
||||
if (NOT python)
|
||||
message(FATAL_ERROR "No Python interpreter found")
|
||||
endif (NOT PYTHON_EXECUTABLE)
|
||||
endif (NOT python)
|
||||
|
||||
set(PYTHON_EXECUTABLE "${python}" CACHE FILEPATH "Python interpreter for builds")
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
||||
|
|
|
|||
|
|
@ -1,29 +1,18 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
include_guard()
|
||||
add_library( ll::tracy INTERFACE IMPORTED )
|
||||
|
||||
set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.")
|
||||
|
||||
if (USE_TRACY)
|
||||
set(TRACY_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/tracy)
|
||||
|
||||
# See: indra/llcommon/llprofiler.h
|
||||
add_definitions(-DLL_PROFILER_CONFIGURATION=3)
|
||||
use_system_binary(tracy)
|
||||
use_prebuilt_binary(tracy)
|
||||
|
||||
# if (WINDOWS)
|
||||
# MESSAGE(STATUS "Including Tracy for Windows: '${TRACY_INCLUDE_DIR}'")
|
||||
# endif (WINDOWS)
|
||||
target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
|
||||
|
||||
# if (DARWIN)
|
||||
# MESSAGE(STATUS "Including Tracy for Darwin: '${TRACY_INCLUDE_DIR}'")
|
||||
# endif (DARWIN)
|
||||
|
||||
# if (LINUX)
|
||||
# MESSAGE(STATUS "Including Tracy for Linux: '${TRACY_INCLUDE_DIR}'")
|
||||
# endif (LINUX)
|
||||
else (USE_TRACY)
|
||||
# Tracy.cmake should not set LLCOMMON_INCLUDE_DIRS, let LLCommon.cmake do that
|
||||
set(TRACY_INCLUDE_DIR "")
|
||||
set(TRACY_LIBRARY "")
|
||||
# See: indra/llcommon/llprofiler.h
|
||||
target_compile_definitions(ll::tracy INTERFACE LL_PROFILER_CONFIGURATION=3 )
|
||||
endif (USE_TRACY)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (NOT USESYSTEMLIBS)
|
||||
use_prebuilt_binary(tut)
|
||||
endif(NOT USESYSTEMLIBS)
|
||||
use_prebuilt_binary(tut)
|
||||
|
|
|
|||
|
|
@ -3,77 +3,50 @@ include(Prebuilt)
|
|||
include(FreeType)
|
||||
include(GLIB)
|
||||
|
||||
if (USESYSTEMLIBS)
|
||||
include(FindPkgConfig)
|
||||
|
||||
if( NOT GTK_VERSION )
|
||||
set( GTK_VERSION 2.0 )
|
||||
endif()
|
||||
if (LINUX)
|
||||
set(PKGCONFIG_PACKAGES
|
||||
atk
|
||||
cairo
|
||||
gdk-${GTK_VERSION}
|
||||
gdk-pixbuf-2.0
|
||||
glib-2.0
|
||||
gmodule-2.0
|
||||
gtk+-${GTK_VERSION}
|
||||
gthread-2.0
|
||||
libpng
|
||||
pango
|
||||
pangoft2
|
||||
sdl2
|
||||
)
|
||||
if( GTK_VERSION LESS "3.0" )
|
||||
LIST( APPEND PKGCONFIG_PACKAGES pangoxft )
|
||||
else()
|
||||
add_definitions( -DGTK_DISABLE_DEPRECATED)
|
||||
endif()
|
||||
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)
|
||||
list(APPEND UI_LIBRARIES X11)
|
||||
else (USESYSTEMLIBS)
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(fltk)
|
||||
endif (LINUX)
|
||||
|
||||
if (LINUX)
|
||||
set(UI_LIB_NAMES
|
||||
libfltk.a
|
||||
# libfreetype.a # <FS:PC> fontconfig and freetype should be taken from the user's system, and not be packaged with the viewer
|
||||
)
|
||||
|
||||
foreach(libname ${UI_LIB_NAMES})
|
||||
find_library(UI_LIB_${libname}
|
||||
NAMES ${libname}
|
||||
PATHS
|
||||
debug ${LIBS_PREBUILT_DIR}/lib/debug
|
||||
optimized ${LIBS_PREBUILT_DIR}/lib/release
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
set(UI_LIBRARIES ${UI_LIBRARIES} ${UI_LIB_${libname}})
|
||||
endforeach(libname)
|
||||
|
||||
set(UI_LIBRARIES ${UI_LIBRARIES} Xinerama X11)
|
||||
include_directories ( ${GLIB_INCLUDE_DIRS} )
|
||||
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)
|
||||
add_library( ll::uilibraries INTERFACE IMPORTED )
|
||||
|
||||
if (LINUX)
|
||||
add_definitions(-DLL_X11=1 -DLL_FLTK=1)
|
||||
use_prebuilt_binary(fltk)
|
||||
target_compile_definitions(ll::uilibraries INTERFACE LL_FLTK=1 LL_X11=1 )
|
||||
|
||||
if( USE_CONAN )
|
||||
target_link_libraries( ll::uilibraries INTERFACE CONAN_PKG::gtk )
|
||||
return()
|
||||
endif()
|
||||
|
||||
target_link_libraries( ll::uilibraries INTERFACE
|
||||
fltk
|
||||
X11
|
||||
Xinerama
|
||||
glib-2.0
|
||||
gmodule-2.0
|
||||
gobject-2.0
|
||||
gthread-2.0
|
||||
Xinerama
|
||||
ll::freetype
|
||||
)
|
||||
target_include_directories( ll::uilibraries SYSTEM INTERFACE
|
||||
${GLIB_INCLUDE_DIRS}
|
||||
)
|
||||
endif (LINUX)
|
||||
if( WINDOWS )
|
||||
target_link_libraries( ll::uilibraries INTERFACE
|
||||
opengl32
|
||||
comdlg32
|
||||
dxguid
|
||||
kernel32
|
||||
odbc32
|
||||
odbccp32
|
||||
oleaut32
|
||||
shell32
|
||||
Vfw32
|
||||
wer
|
||||
winspool
|
||||
imm32
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories( ll::uilibraries SYSTEM INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,35 +1,19 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
set(URIPARSER_FIND_QUIETLY ON)
|
||||
set(URIPARSER_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
|
||||
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)
|
||||
add_library( ll::uriparser INTERFACE IMPORTED )
|
||||
|
||||
use_system_binary( uriparser )
|
||||
|
||||
use_prebuilt_binary(uriparser)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::uriparser INTERFACE uriparser)
|
||||
elseif (LINUX)
|
||||
target_link_libraries( ll::uriparser INTERFACE uriparser)
|
||||
elseif (DARWIN)
|
||||
target_link_libraries( ll::uriparser INTERFACE liburiparser.dylib)
|
||||
endif (WINDOWS)
|
||||
target_include_directories( ll::uriparser SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/uriparser)
|
||||
|
|
|
|||
|
|
@ -12,15 +12,18 @@
|
|||
# Switches set here and in 00-Common.cmake must agree with
|
||||
# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables
|
||||
# Reading $LL_BUILD is an attempt to directly use those switches.
|
||||
if ("$ENV{LL_BUILD}" STREQUAL "")
|
||||
if ("$ENV{LL_BUILD}" STREQUAL "" AND "${LL_BUILD_ENV}" STREQUAL "" )
|
||||
message(FATAL_ERROR "Environment variable LL_BUILD must be set")
|
||||
elseif("$ENV{LL_BUILD}" STREQUAL "")
|
||||
set( ENV{LL_BUILD} "${LL_BUILD_ENV}" )
|
||||
message( "Setting ENV{LL_BUILD} to cached variable ${LL_BUILD_ENV}" )
|
||||
else()
|
||||
set( LL_BUILD_ENV "$ENV{LL_BUILD}" CACHE STRING "Save environment" FORCE )
|
||||
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)
|
||||
|
|
@ -70,39 +73,36 @@ endif (NOT CMAKE_BUILD_TYPE)
|
|||
# If someone has specified an address size, use that to determine the
|
||||
# architecture. Otherwise, let the architecture specify the address size.
|
||||
if (ADDRESS_SIZE EQUAL 32)
|
||||
#message(STATUS "ADDRESS_SIZE is 32")
|
||||
set(ARCH i686)
|
||||
elseif (ADDRESS_SIZE EQUAL 64)
|
||||
#message(STATUS "ADDRESS_SIZE is 64")
|
||||
set(ARCH x86_64)
|
||||
else (ADDRESS_SIZE EQUAL 32)
|
||||
#message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'")
|
||||
# Use Python's platform.machine() since uname -m isn't available everywhere.
|
||||
# Even if you can assume cygwin uname -m, the answer depends on whether
|
||||
# you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will
|
||||
# report a 64-bit processor.
|
||||
execute_process(COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "-c"
|
||||
"import platform; print platform.machine()"
|
||||
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# We expect values of the form i386, i686, x86_64, AMD64.
|
||||
# In CMake, expressing ARCH.endswith('64') is awkward:
|
||||
string(LENGTH "${ARCH}" ARCH_LENGTH)
|
||||
math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2")
|
||||
string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2)
|
||||
if (ARCH_LAST_2 STREQUAL 64)
|
||||
#message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}")
|
||||
# Note we cannot use if(DARWIN) here, this variable is set way lower
|
||||
if( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
|
||||
set(ADDRESS_SIZE 64)
|
||||
else ()
|
||||
#message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}")
|
||||
set(ADDRESS_SIZE 32)
|
||||
endif ()
|
||||
set(ARCH x86_64)
|
||||
else()
|
||||
# Use Python's platform.machine() since uname -m isn't available everywhere.
|
||||
# Even if you can assume cygwin uname -m, the answer depends on whether
|
||||
# you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will
|
||||
# report a 64-bit processor.
|
||||
execute_process(COMMAND
|
||||
"${PYTHON_EXECUTABLE}" "-c"
|
||||
"import platform; print( platform.machine() )"
|
||||
OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string( REGEX MATCH ".*(64)$" RE_MATCH "${ARCH}" )
|
||||
if( RE_MATCH AND ${CMAKE_MATCH_1} STREQUAL "64" )
|
||||
set(ADDRESS_SIZE 64)
|
||||
set(ARCH x86_64)
|
||||
else()
|
||||
set(ADDRESS_SIZE 32)
|
||||
set(ARCH i686)
|
||||
endif()
|
||||
endif()
|
||||
endif (ADDRESS_SIZE EQUAL 32)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(WINDOWS ON BOOL FORCE)
|
||||
set(LL_ARCH ${ARCH}_win32)
|
||||
set(LL_ARCH_DIR ${ARCH}-win32)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
|
@ -129,9 +129,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|||
|
||||
include(ConfigurePkgConfig)
|
||||
|
||||
set(LL_ARCH ${ARCH}_linux)
|
||||
set(LL_ARCH_DIR ${ARCH}-linux)
|
||||
|
||||
if (INSTALL_PROPRIETARY)
|
||||
# Only turn on headless if we can find osmesa libraries.
|
||||
include(FindPkgConfig)
|
||||
|
|
@ -206,9 +203,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|||
set(CMAKE_OSX_ARCHITECTURES "${ARCH}")
|
||||
string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
|
||||
string(REPLACE "AMD64" "x86_64" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}")
|
||||
|
||||
set(LL_ARCH ${ARCH}_darwin)
|
||||
set(LL_ARCH_DIR universal-darwin)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
# Default deploy grid
|
||||
|
|
@ -231,7 +225,6 @@ set(ENABLE_SIGNING OFF)
|
|||
#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(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") # <FS:Ansariel> No Teamcity -> allow unattended
|
||||
|
||||
set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")
|
||||
|
|
@ -252,4 +245,5 @@ endif (HAVOK_TPV)
|
|||
|
||||
source_group("CMake Rules" FILES CMakeLists.txt)
|
||||
|
||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
get_property(LL_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,20 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
if (NOT USESYSTEMLIBS)
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(libuuid)
|
||||
find_package(Fontconfig REQUIRED) # <FS:PC> fontconfig and freetype should be taken from the
|
||||
# use_prebuilt_binary(fontconfig) # user's system, and not be packaged with the viewer
|
||||
endif (LINUX)
|
||||
use_prebuilt_binary(libhunspell)
|
||||
use_prebuilt_binary(slvoice)
|
||||
# use_prebuilt_binary(libidn)
|
||||
endif(NOT USESYSTEMLIBS)
|
||||
if (LINUX)
|
||||
use_prebuilt_binary(libuuid)
|
||||
add_library( ll::fontconfig INTERFACE IMPORTED )
|
||||
|
||||
if( NOT USE_CONAN )
|
||||
find_package(Fontconfig REQUIRED) # <FS:PC> Use system wide Fontconfig
|
||||
target_link_libraries( ll::fontconfig INTERFACE Fontconfig::Fontconfig )
|
||||
else()
|
||||
target_link_libraries( ll::fontconfig INTERFACE CONAN_PKG::fontconfig )
|
||||
endif()
|
||||
endif (LINUX)
|
||||
|
||||
if( NOT USE_CONAN )
|
||||
use_prebuilt_binary(libhunspell)
|
||||
endif()
|
||||
|
||||
use_prebuilt_binary(slvoice)
|
||||
|
|
|
|||
|
|
@ -1,20 +1,11 @@
|
|||
# -*- cmake -*-
|
||||
include(Prebuilt)
|
||||
|
||||
set(XMLRPCEPI_FIND_QUIETLY ON)
|
||||
set(XMLRPCEPI_FIND_REQUIRED ON)
|
||||
include_guard()
|
||||
add_library( ll::xmlrpc-epi INTERFACE IMPORTED )
|
||||
|
||||
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_system_binary( xmlrpc-epi )
|
||||
|
||||
use_prebuilt_binary(xmlrpc-epi)
|
||||
target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi )
|
||||
target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -1,37 +1,22 @@
|
|||
# -*- 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)
|
||||
if (WINDOWS OR LINUX)
|
||||
set(ZLIBNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib-ng)
|
||||
endif (WINDOWS OR LINUX)
|
||||
endif (USESYSTEMLIBS)
|
||||
include_guard()
|
||||
add_library( ll::zlib-ng INTERFACE IMPORTED )
|
||||
|
||||
if(USE_CONAN )
|
||||
target_link_libraries( ll::zlib-ng INTERFACE CONAN_PKG::zlib )
|
||||
return()
|
||||
endif()
|
||||
|
||||
use_prebuilt_binary(zlib-ng)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::zlib-ng INTERFACE zlib )
|
||||
else()
|
||||
target_link_libraries( ll::zlib-ng INTERFACE z )
|
||||
endif (WINDOWS)
|
||||
|
||||
if( NOT LINUX )
|
||||
target_include_directories( ll::zlib-ng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/zlib-ng)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -9,37 +9,33 @@ else (INSTALL_PROPRIETARY)
|
|||
set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
|
||||
endif (INSTALL_PROPRIETARY)
|
||||
|
||||
include_guard()
|
||||
add_library( ll::bugsplat INTERFACE IMPORTED )
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
if (NOT USESYSTEMLIBS)
|
||||
include(Prebuilt)
|
||||
if (WINDOWS)
|
||||
use_prebuilt_binary(bugsplat)
|
||||
set(BUGSPLAT_LIBRARIES
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(bugsplat)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::bugsplat INTERFACE
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
|
||||
)
|
||||
elseif (DARWIN)
|
||||
use_prebuilt_binary(bugsplat)
|
||||
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
|
||||
target_include_directories( ll::bugsplat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/bugsplat)
|
||||
elseif (DARWIN)
|
||||
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
|
||||
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
message("Bugsplat for OSX not fully implemented, please adapt llappdelegate-objc.mm to honor options of sending user name and settings.xml.")
|
||||
else (WINDOWS)
|
||||
use_prebuilt_binary(breakpad)
|
||||
set(BUGSPLAT_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/libbreakpad.a ${ARCH_PREBUILT_DIRS_RELEASE}/libbreakpad_client.a )
|
||||
endif (WINDOWS)
|
||||
else (NOT USESYSTEMLIBS)
|
||||
set(BUGSPLAT_FIND_QUIETLY ON)
|
||||
set(BUGSPLAT_FIND_REQUIRED ON)
|
||||
include(FindBUGSPLAT)
|
||||
endif (NOT USESYSTEMLIBS)
|
||||
target_link_libraries( ll::bugsplat INTERFACE
|
||||
${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")
|
||||
|
||||
if( LINUX )
|
||||
set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/breakpad)
|
||||
add_compile_definitions(__STDC_FORMAT_MACROS)
|
||||
else()
|
||||
set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
|
||||
if( NOT BUGSPLAT_DB )
|
||||
message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" )
|
||||
endif()
|
||||
set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
|
||||
|
||||
set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT)
|
||||
else()
|
||||
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ def main(command, arguments=[], libpath=[], vars={}):
|
|||
if sys.platform == "win32":
|
||||
lpvars = ["PATH"]
|
||||
elif sys.platform == "darwin":
|
||||
lpvars = ["LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH"]
|
||||
lpvars = ["LD_LIBRARY_PATH"] # , "DYLD_LIBRARY_PATH"]
|
||||
elif sys.platform.startswith("linux"):
|
||||
lpvars = ["LD_LIBRARY_PATH"]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -12,16 +12,6 @@ include(LLImageJ2COJ)
|
|||
include(LLKDU)
|
||||
include(LLFileSystem)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLFILESYSTEM_INCLUDE_DIRS}
|
||||
${LLIMAGE_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
)
|
||||
include_directories(SYSTEM
|
||||
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llimage_libtest_SOURCE_FILES
|
||||
llimage_libtest.cpp
|
||||
)
|
||||
|
|
@ -31,9 +21,6 @@ set(llimage_libtest_HEADER_FILES
|
|||
llimage_libtest.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llimage_libtest_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llimage_libtest_SOURCE_FILES ${llimage_libtest_HEADER_FILES})
|
||||
|
||||
add_executable(llimage_libtest
|
||||
|
|
@ -48,37 +35,21 @@ set_target_properties(llimage_libtest
|
|||
FALSE
|
||||
)
|
||||
|
||||
# OS-specific libraries
|
||||
if (DARWIN)
|
||||
include(CMakeFindFrameworks)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
set(OS_LIBRARIES ${COREFOUNDATION_LIBRARY})
|
||||
elseif (WINDOWS)
|
||||
set(OS_LIBRARIES)
|
||||
elseif (LINUX)
|
||||
set(OS_LIBRARIES)
|
||||
else (DARWIN)
|
||||
message(FATAL_ERROR "Unknown platform")
|
||||
endif (DARWIN)
|
||||
|
||||
# Libraries on which this application depends on
|
||||
# Sort by high-level to low-level
|
||||
target_link_libraries(llimage_libtest
|
||||
${LEGACY_STDIO_LIBS}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${LLFILESYSTEM_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLIMAGE_LIBRARIES}
|
||||
${LLKDU_LIBRARIES}
|
||||
${KDU_LIBRARY}
|
||||
${LLIMAGEJ2COJ_LIBRARIES}
|
||||
${OS_LIBRARIES}
|
||||
)
|
||||
llcommon
|
||||
llfilesystem
|
||||
llmath
|
||||
llimage
|
||||
llkdu
|
||||
llimagej2coj
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
# Path inside the app bundle where we'll need to copy libraries
|
||||
set(LLIMAGE_LIBTEST_DESTINATION_DIR
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llimage_libtest.app/Contents/Resources
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/llimage_libtest.app/Contents/Resources
|
||||
)
|
||||
# Create the Contents/Resources directory
|
||||
add_custom_command(
|
||||
|
|
|
|||
|
|
@ -22,23 +22,6 @@ include(Hunspell)
|
|||
include(Linking)
|
||||
# include(Tut)
|
||||
|
||||
include_directories(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
${LLIMAGE_INCLUDE_DIRS}
|
||||
${LLMATH_INCLUDE_DIRS}
|
||||
${LLRENDER_INCLUDE_DIRS}
|
||||
${LLUI_INCLUDE_DIRS}
|
||||
${LLFILESYSTEM_INCLUDE_DIRS}
|
||||
${LLWINDOW_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
${LIBS_PREBUILD_DIR}/include/hunspell
|
||||
)
|
||||
include_directories(SYSTEM
|
||||
${LLCOMMON_SYSTEM_INCLUDE_DIRS}
|
||||
${LLXML_SYSTEM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llui_libtest_SOURCE_FILES
|
||||
llui_libtest.cpp
|
||||
llwidgetreg.cpp
|
||||
|
|
@ -50,50 +33,26 @@ set(llui_libtest_HEADER_FILES
|
|||
llwidgetreg.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llui_libtest_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llui_libtest_SOURCE_FILES ${llui_libtest_HEADER_FILES})
|
||||
|
||||
add_executable(llui_libtest ${llui_libtest_SOURCE_FILES})
|
||||
|
||||
# Link with OS-specific libraries for LLWindow dependency
|
||||
if (DARWIN)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(IOKIT_LIBRARY IOKit)
|
||||
set(OS_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY})
|
||||
elseif (WINDOWS)
|
||||
#ll_stack_trace needs this now...
|
||||
list(APPEND WINDOWS_LIBRARIES dbghelp)
|
||||
set(OS_LIBRARIES ${WINDOWS_LIBRARIES})
|
||||
elseif (LINUX)
|
||||
set(OS_LIBRARIES)
|
||||
else (DARWIN)
|
||||
message(FATAL_ERROR "unknown platform")
|
||||
endif (DARWIN)
|
||||
|
||||
# Libraries on which this library depends, needed for Linux builds
|
||||
# Sort by high-level to low-level
|
||||
target_link_libraries(llui_libtest
|
||||
${LEGACY_STDIO_LIBS}
|
||||
llui
|
||||
llinventory
|
||||
llmessage
|
||||
${LLRENDER_LIBRARIES}
|
||||
${LLIMAGE_LIBRARIES}
|
||||
${LLKDU_LIBRARIES}
|
||||
${KDU_LIBRARY}
|
||||
${LLIMAGEJ2COJ_LIBRARIES}
|
||||
${OS_LIBRARIES}
|
||||
${GOOGLE_PERFTOOLS_LIBRARIES}
|
||||
${HUNSPELL_LIBRARY}
|
||||
)
|
||||
llui
|
||||
llinventory
|
||||
llmessage
|
||||
llrender
|
||||
llimage
|
||||
llkdu
|
||||
llimagej2coj
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set_target_properties(llui_libtest
|
||||
PROPERTIES
|
||||
LINK_FLAGS "/NODEFAULTLIB:LIBCMT"
|
||||
LINK_FLAGS_DEBUG "/NODEFAULTLIB:MSVCRT /NODEFAULTLIB:LIBCMTD"
|
||||
)
|
||||
|
||||
# Copy over OpenJPEG.dll
|
||||
|
|
@ -101,7 +60,7 @@ if (WINDOWS)
|
|||
set(OPENJPEG_RELEASE
|
||||
"${ARCH_PREBUILT_DIRS_RELEASE}/openjp2.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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ BASE_ARGUMENTS=[
|
|||
but not application name (used internally)""",
|
||||
default=None),
|
||||
dict(name='configuration',
|
||||
description="""The build configuration used.""",
|
||||
description="""The build configurations sub directory used.""",
|
||||
default="Release"),
|
||||
dict(name='dest', description='Destination directory.', default=DEFAULT_SRCTREE),
|
||||
dict(name='grid',
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ set(linux_crash_logger_HEADER_FILES
|
|||
llcrashloggerlinux.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${linux_crash_logger_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND linux_crash_logger_SOURCE_FILES
|
||||
${linux_crash_logger_HEADER_FILES}
|
||||
)
|
||||
|
|
@ -53,12 +50,14 @@ set(LIBRT_LIBRARY rt)
|
|||
|
||||
|
||||
target_link_libraries(linux-crash-logger
|
||||
${UI_LIBRARIES}
|
||||
${CURL_LIBRARIES}
|
||||
${OPENSSL_LIBRARIES}
|
||||
${CRYPTO_LIBRARIES}
|
||||
${ZLIBNG_LIBRARIES}
|
||||
${LIBRT_LIBRARY}
|
||||
llcrashlogger
|
||||
llfilesystem
|
||||
llxml
|
||||
llmessage
|
||||
llmath
|
||||
llcorehttp
|
||||
llcommon
|
||||
ll::uilibraries
|
||||
X11
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -69,41 +50,37 @@ set(llappearance_HEADER_FILES
|
|||
llavatarappearancedefines.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llappearance_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llappearance_SOURCE_FILES ${llappearance_HEADER_FILES})
|
||||
|
||||
add_library (llappearance ${llappearance_SOURCE_FILES})
|
||||
|
||||
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
|
||||
)
|
||||
target_include_directories( llappearance INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
if (BUILD_HEADLESS)
|
||||
add_library (llappearanceheadless ${llappearance_SOURCE_FILES})
|
||||
|
||||
target_include_directories( llappearanceheadless INTERFACE ${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)
|
||||
|
|
|
|||
|
|
@ -7,25 +7,8 @@ include(LLAudio)
|
|||
include(FMODSTUDIO)
|
||||
include(OPENAL)
|
||||
include(LLCommon)
|
||||
include(LLMath)
|
||||
include(LLMessage)
|
||||
include(LLFileSystem)
|
||||
include(LLWindow)
|
||||
|
||||
include_directories( SYSTEM
|
||||
${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
|
||||
lllistener.cpp
|
||||
|
|
@ -43,10 +26,7 @@ set(llaudio_HEADER_FILES
|
|||
llwindgen.h
|
||||
)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
include_directories(
|
||||
${FMODSTUDIO_INCLUDE_DIR}
|
||||
)
|
||||
if (TARGET ll::fmodstudio)
|
||||
list(APPEND llaudio_SOURCE_FILES
|
||||
llaudioengine_fmodstudio.cpp
|
||||
lllistener_fmodstudio.cpp
|
||||
|
|
@ -58,13 +38,9 @@ if (FMODSTUDIO)
|
|||
lllistener_fmodstudio.h
|
||||
llstreamingaudio_fmodstudio.h
|
||||
)
|
||||
endif (FMODSTUDIO)
|
||||
|
||||
if (OPENAL)
|
||||
include_directories(
|
||||
${OPENAL_LIBRARIES}
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (TARGET ll::openal)
|
||||
list(APPEND llaudio_SOURCE_FILES
|
||||
llaudioengine_openal.cpp
|
||||
lllistener_openal.cpp
|
||||
|
|
@ -74,22 +50,23 @@ if (OPENAL)
|
|||
llaudioengine_openal.h
|
||||
lllistener_openal.h
|
||||
)
|
||||
endif (OPENAL)
|
||||
|
||||
set_source_files_properties(${llaudio_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
endif ()
|
||||
|
||||
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}
|
||||
target_include_directories( llaudio INTERFACE ${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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -73,18 +57,16 @@ set(llcharacter_HEADER_FILES
|
|||
llvisualparam.h
|
||||
)
|
||||
|
||||
set_source_files_properties(${llcharacter_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
list(APPEND llcharacter_SOURCE_FILES ${llcharacter_HEADER_FILES})
|
||||
|
||||
add_library (llcharacter ${llcharacter_SOURCE_FILES})
|
||||
target_include_directories( llcharacter INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(
|
||||
llcharacter
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLMESSAGE_LIBRARIES}
|
||||
${LLFILESYSTEM_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
llcharacter
|
||||
llcommon
|
||||
llmath
|
||||
llmessage
|
||||
llfilesystem
|
||||
llxml
|
||||
)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue