Skip to content
Snippets Groups Projects
Commit 0710d95f authored by Nicky Dasmijn's avatar Nicky Dasmijn
Browse files

Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into DRTVWR-568_cmake

parents f08f20db 6fdd35d5
No related branches found
No related tags found
No related merge requests found
Showing
with 499 additions and 720 deletions
...@@ -331,6 +331,16 @@ ...@@ -331,6 +331,16 @@
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
</map> </map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>ac54672e0b38f52726f5c99047c913e4</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89306/815431/cubemaptoequirectangular-1.1.0-windows64-564841.tar.bz2</string>
</map>
</map>
</map> </map>
<key>version</key> <key>version</key>
<string>1.1.0</string> <string>1.1.0</string>
...@@ -1077,6 +1087,16 @@ ...@@ -1077,6 +1087,16 @@
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
</map> </map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>e70898903475d8ac2e81ff33278fc987</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/89309/815433/jpegencoderbasic-1.0-windows64-564842.tar.bz2</string>
</map>
</map>
</map> </map>
<key>version</key> <key>version</key>
<string>1.0</string> <string>1.0</string>
...@@ -2488,6 +2508,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> ...@@ -2488,6 +2508,16 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key> <key>name</key>
<string>windows64</string> <string>windows64</string>
</map> </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> </map>
<key>version</key> <key>version</key>
<string>0.132.2</string> <string>0.132.2</string>
...@@ -2991,6 +3021,68 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> ...@@ -2991,6 +3021,68 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>name</key> <key>name</key>
<string>common</string> <string>common</string>
</map> </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>
</map>
<key>name</key>
<string>linux64</string>
</map>
<key>darwin64</key> <key>darwin64</key>
<map> <map>
<key>build_directory</key> <key>build_directory</key>
...@@ -3183,7 +3275,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> ...@@ -3183,7 +3275,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string> <string>${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN}</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string> <string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string> <string>-DUSE_KDU=FALSE</string>
<string>-DOPENAL:BOOL=ON</string> <string>-DUSE_OPENAL:BOOL=ON</string>
</array> </array>
</map> </map>
<key>name</key> <key>name</key>
...@@ -3254,7 +3346,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string> ...@@ -3254,7 +3346,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>-DUNATTENDED:BOOL=ON</string> <string>-DUNATTENDED:BOOL=ON</string>
<string>-DINSTALL_PROPRIETARY=FALSE</string> <string>-DINSTALL_PROPRIETARY=FALSE</string>
<string>-DUSE_KDU=FALSE</string> <string>-DUSE_KDU=FALSE</string>
<string>-DOPENAL:BOOL=ON</string> <string>-DUSE_OPENAL:BOOL=ON</string>
</array> </array>
</map> </map>
<key>name</key> <key>name</key>
......
...@@ -4,23 +4,40 @@ ...@@ -4,23 +4,40 @@
# other commands to guarantee full compatibility # other commands to guarantee full compatibility
# with the version specified # with the version specified
## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support ## 3.8 added VS_DEBUGGER_WORKING_DIRECTORY support
## 3.13/12 is needed for add_link_options/add_compile_definitions
## 3.14 added FILE CREATE_LINK ## 3.14 added FILE CREATE_LINK
cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR) ## 3.16 is needed for target_precompile_headers
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING set(ROOT_PROJECT_NAME "SecondLife" CACHE STRING
"The root project/makefile/solution name. Defaults to SecondLife.") "The root project/makefile/solution name. Defaults to SecondLife.")
project(${ROOT_PROJECT_NAME}) 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(Variables)
include(BuildVersion) include(BuildVersion)
set(LEGACY_STDIO_LIBS)
if (WINDOWS)
set(LEGACY_STDIO_LIBS legacy_stdio_definitions)
endif (WINDOWS)
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Build type. One of: Debug Release RelWithDebInfo" FORCE) "Build type. One of: Debug Release RelWithDebInfo" FORCE)
...@@ -60,8 +77,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin) ...@@ -60,8 +77,10 @@ add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
add_subdirectory(${LIBS_OPEN_PREFIX}llui) add_subdirectory(${LIBS_OPEN_PREFIX}llui)
add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
if( LL_TESTS )
# Legacy C++ tests. Build always, run if LL_TESTS is true. # Legacy C++ tests. Build always, run if LL_TESTS is true.
add_subdirectory(${VIEWER_PREFIX}test) add_subdirectory(${VIEWER_PREFIX}test)
endif()
if (ENABLE_MEDIA_PLUGINS) if (ENABLE_MEDIA_PLUGINS)
# viewer media plugins # viewer media plugins
...@@ -73,7 +92,6 @@ if (LINUX) ...@@ -73,7 +92,6 @@ if (LINUX)
include(LLAppearanceUtility) include(LLAppearanceUtility)
add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR}) add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
endif (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY)
add_dependencies(viewer linux-crash-logger-strip-target)
elseif (WINDOWS) elseif (WINDOWS)
# cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
if (EXISTS ${VIEWER_DIR}win_setup) if (EXISTS ${VIEWER_DIR}win_setup)
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
# Also realize that CMAKE_CXX_FLAGS may already be partially populated on # Also realize that CMAKE_CXX_FLAGS may already be partially populated on
# entry to this file. # entry to this file.
#***************************************************************************** #*****************************************************************************
include_guard()
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
include(Variables) include(Variables)
...@@ -27,32 +25,22 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") ...@@ -27,32 +25,22 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}")
# as well? # as well?
# Portable compilation flags. # Portable compilation flags.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") add_compile_definitions( ADDRESS_SIZE=${ADDRESS_SIZE})
# Configure crash reporting # Configure crash reporting
set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") 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") set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds")
if(RELEASE_CRASH_REPORTING) 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() endif()
if(NON_RELEASE_CRASH_REPORTING) if(NON_RELEASE_CRASH_REPORTING)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DLL_SEND_CRASH_REPORTS=1") add_compile_definitions( LL_SEND_CRASH_REPORTS=1)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLL_SEND_CRASH_REPORTS=1") endif()
endif()
# Don't bother with a MinSizeRel or Debug builds.
# Don't bother with MinSizeRel or Debug builds. set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING "Supported build types." FORCE)
set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release" CACHE STRING
"Supported build types." FORCE)
# 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)
# Platform-specific compilation flags. # Platform-specific compilation flags.
...@@ -73,98 +61,94 @@ if (WINDOWS) ...@@ -73,98 +61,94 @@ if (WINDOWS)
# CP changed to only append the flag for 32bit builds - on 64bit builds, # 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' # locally at least, the build output is spammed with 1000s of 'D9002'
# warnings about this switch being ignored. # warnings about this switch being ignored.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
if( ADDRESS_SIZE EQUAL 32 ) if( ADDRESS_SIZE EQUAL 32 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
endif() 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 # 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") add_link_options(/LARGEADDRESSAWARE
/SAFESEH:NO
set(CMAKE_CXX_STANDARD_LIBRARIES "") /NODEFAULTLIB:LIBCMT
set(CMAKE_C_STANDARD_LIBRARIES "") /IGNORE:4099)
add_definitions( add_definitions(
/DNOMINMAX -DNOMINMAX
# /DDOM_DYNAMIC # For shared library colladadom # /DDOM_DYNAMIC # For shared library colladadom
) )
add_compile_options( add_compile_options(
/GS /Zo
/TP /GS
/W3 /TP
/c /W3
/Zc:forScope /c
/nologo /Zc:forScope
/Oy- /nologo
# /arch:SSE2 /Oy-
/fp:fast /fp:fast
/MP
) )
# Nicky: x64 implies SSE2 # Nicky: x64 implies SSE2
if( ADDRESS_SIZE EQUAL 32 ) if( ADDRESS_SIZE EQUAL 32 )
add_definitions( /arch:SSE2 ) add_compile_options( /arch:SSE2 )
endif() endif()
# Are we using the crummy Visual Studio KDU build workaround? # Are we using the crummy Visual Studio KDU build workaround?
if (NOT VS_DISABLE_FATAL_WARNINGS) if (NOT VS_DISABLE_FATAL_WARNINGS)
add_definitions(/WX) add_compile_options(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS) 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) endif (WINDOWS)
if (LINUX) if (LINUX)
set(CMAKE_SKIP_RPATH TRUE) set(CMAKE_SKIP_RPATH TRUE)
add_definitions(-D_FORTIFY_SOURCE=2) # EXTERNAL_TOS
# force this platform to accept TOS via external browser
set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}")
# LL_IGNORE_SIGCHLD
# gcc 4.3 and above don't like the LL boost and also # don't catch SIGCHLD in our base application class for the viewer - some of
# cause warnings due to our use of deprecated headers # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
add_definitions(-Wno-parentheses) # viewer doesn't need to catch SIGCHLD anyway.
add_definitions( add_compile_definitions(
-D_REENTRANT _REENTRANT
) _FORTIFY_SOURCE=2
EXTERNAL_TOS
APPID=secondlife
LL_IGNORE_SIGCHLD
)
add_compile_options( add_compile_options(
-fexceptions -fexceptions
-fno-math-errno -fno-math-errno
-fno-strict-aliasing -fno-strict-aliasing
-fsigned-char -fsigned-char
-msse2 -msse2
-mfpmath=sse -mfpmath=sse
-pthread -pthread
) -Wno-parentheses
-Wno-deprecated
# force this platform to accept TOS via external browser -fvisibility=hidden
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) if (ADDRESS_SIZE EQUAL 32)
add_compile_options(-march=pentium4) add_compile_options(-march=pentium4)
endif (ADDRESS_SIZE EQUAL 32) 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
# this stops us requiring a really recent glibc at runtime add_compile_options(-fno-stack-protector)
add_compile_options(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link
# 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")
endif (NOT USESYSTEMLIBS)
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
endif (LINUX) endif (LINUX)
...@@ -189,47 +173,17 @@ if (DARWIN) ...@@ -189,47 +173,17 @@ if (DARWIN)
##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
endif (DARWIN) endif (DARWIN)
if (LINUX OR DARWIN) if (LINUX OR DARWIN)
if (CMAKE_CXX_COMPILER MATCHES ".*clang") set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif (CMAKE_CXX_COMPILER MATCHES ".*clang")
if (CMAKE_COMPILER_IS_GNUCXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
elseif (CMAKE_COMPILER_IS_CLANGXX)
set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs")
endif()
if (NOT GCC_DISABLE_FATAL_WARNINGS) if (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") list(APPEND GCC_WARNINGS -Werror)
endif (NOT GCC_DISABLE_FATAL_WARNINGS) endif (NOT GCC_DISABLE_FATAL_WARNINGS)
set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor -Wno-unused-but-set-variable -Wno-unused-variable )
set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") add_compile_options(${GCC_WARNINGS})
set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") add_compile_options(-m${ADDRESS_SIZE})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}")
endif (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
glib-2.0
gstreamer-0.10
gtk-2.0
pango-1.0
)
endif (USESYSTEMLIBS)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
include(Linking) include(Linking)
include(Prebuilt) include(Prebuilt)
set(APR_FIND_QUIETLY ON) include_guard()
set(APR_FIND_REQUIRED ON)
set(APRUTIL_FIND_QUIETLY ON) add_library( ll::apr INTERFACE IMPORTED )
set(APRUTIL_FIND_REQUIRED ON)
if (USESYSTEMLIBS) use_system_binary( apr apr-util )
include(FindAPR) use_prebuilt_binary(apr_suite)
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)
if (LINUX) if (WINDOWS)
list(APPEND APRUTIL_LIBRARIES uuid) if (LLCOMMON_LINK_SHARED)
list(APPEND APRUTIL_LIBRARIES rt) set(APR_selector "lib")
endif (LINUX) else (LLCOMMON_LINK_SHARED)
endif (USESYSTEMLIBS) 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)
target_link_libraries( ll::apr INTERFACE
apr-1
aprutil-1
iconv
uuid
rt
)
endif (WINDOWS)
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )
# -*- cmake -*-
include(Prebuilt)
use_prebuilt_binary(libatmosphere)
set(LIBATMOSPHERE_LIBRARIES atmosphere)
set(LIBATMOSPHERE_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/atmosphere)
# -*- cmake -*- # -*- cmake -*-
include(Prebuilt) include(Prebuilt)
if (USESYSTEMLIBS) include_guard()
include(FindPkgConfig) add_library( ll::vorbis INTERFACE IMPORTED )
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})
if (WINDOWS) use_system_binary(vorbis)
set(OGG_LIBRARIES use_prebuilt_binary(ogg_vorbis)
optimized ogg_static target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
debug ogg_static_d)
set(VORBIS_LIBRARIES if (WINDOWS)
optimized vorbis_static target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
debug vorbis_static_d) else (WINDOWS)
set(VORBISENC_LIBRARIES target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile )
optimized vorbisenc_static endif (WINDOWS)
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)
link_directories(
${VORBIS_LIBRARY_DIRS}
${VORBISENC_LIBRARY_DIRS}
${VORBISFILE_LIBRARY_DIRS}
${OGG_LIBRARY_DIRS}
)
# -*- cmake -*- # -*- cmake -*-
include(Prebuilt) include(Prebuilt)
set(Boost_FIND_QUIETLY ON) include_guard()
set(Boost_FIND_REQUIRED ON)
if (USESYSTEMLIBS) add_library( ll::boost INTERFACE IMPORTED )
include(FindBoost) 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) use_prebuilt_binary(boost)
set(BOOST_FIBER_LIBRARY boost_fiber-mt)
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
set(BOOST_REGEX_LIBRARY boost_regex-mt)
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
set(BOOST_THREAD_LIBRARY boost_thread-mt)
else (USESYSTEMLIBS)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
# with the address size. # with the address size.
set(addrsfx "-x${ADDRESS_SIZE}") set(addrsfx "-x${ADDRESS_SIZE}")
if (WINDOWS) if (WINDOWS)
set(BOOST_CONTEXT_LIBRARY target_link_libraries( ll::boost INTERFACE
optimized libboost_context-mt${addrsfx} libboost_context-mt${addrsfx}
debug libboost_context-mt${addrsfx}-gd) libboost_fiber-mt${addrsfx}
set(BOOST_FIBER_LIBRARY libboost_filesystem-mt${addrsfx}
optimized libboost_fiber-mt${addrsfx} libboost_program_options-mt${addrsfx}
debug libboost_fiber-mt${addrsfx}-gd) libboost_regex-mt${addrsfx}
set(BOOST_FILESYSTEM_LIBRARY libboost_system-mt${addrsfx}
optimized libboost_filesystem-mt${addrsfx} libboost_thread-mt${addrsfx})
debug libboost_filesystem-mt${addrsfx}-gd) elseif (LINUX)
set(BOOST_PROGRAM_OPTIONS_LIBRARY target_link_libraries( ll::boost INTERFACE
optimized libboost_program_options-mt${addrsfx} boost_context-mt${addrsfx}
debug libboost_program_options-mt${addrsfx}-gd) boost_fiber-mt${addrsfx}
set(BOOST_REGEX_LIBRARY boost_filesystem-mt${addrsfx}
optimized libboost_regex-mt${addrsfx} boost_program_options-mt${addrsfx}
debug libboost_regex-mt${addrsfx}-gd) boost_regex-mt${addrsfx}
set(BOOST_SIGNALS_LIBRARY boost_signals-mt${addrsfx}
optimized libboost_signals-mt${addrsfx} boost_system-mt${addrsfx}
debug libboost_signals-mt${addrsfx}-gd) boost_thread-mt${addrsfx})
set(BOOST_SYSTEM_LIBRARY elseif (DARWIN)
optimized libboost_system-mt${addrsfx} target_link_libraries( ll::boost INTERFACE
debug libboost_system-mt${addrsfx}-gd) boost_context-mt${addrsfx}
set(BOOST_THREAD_LIBRARY boost_fiber-mt${addrsfx}
optimized libboost_thread-mt${addrsfx} boost_filesystem-mt${addrsfx}
debug libboost_thread-mt${addrsfx}-gd) boost_program_options-mt${addrsfx}
elseif (LINUX) boost_regex-mt${addrsfx}
set(BOOST_CONTEXT_LIBRARY boost_system-mt${addrsfx}
optimized boost_context-mt${addrsfx} boost_thread-mt${addrsfx})
debug boost_context-mt${addrsfx}-d) endif (WINDOWS)
set(BOOST_FIBER_LIBRARY
optimized boost_fiber-mt${addrsfx}
debug boost_fiber-mt${addrsfx}-d)
set(BOOST_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt${addrsfx}
debug boost_filesystem-mt${addrsfx}-d)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt${addrsfx}
debug boost_program_options-mt${addrsfx}-d)
set(BOOST_REGEX_LIBRARY
optimized boost_regex-mt${addrsfx}
debug boost_regex-mt${addrsfx}-d)
set(BOOST_SIGNALS_LIBRARY
optimized boost_signals-mt${addrsfx}
debug boost_signals-mt${addrsfx}-d)
set(BOOST_SYSTEM_LIBRARY
optimized boost_system-mt${addrsfx}
debug boost_system-mt${addrsfx}-d)
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt${addrsfx}
debug boost_thread-mt${addrsfx}-d)
elseif (DARWIN)
set(BOOST_CONTEXT_LIBRARY
optimized boost_context-mt${addrsfx}
debug boost_context-mt${addrsfx})
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})
endif (WINDOWS)
endif (USESYSTEMLIBS)
if (LINUX) if (LINUX)
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt) set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)
......
...@@ -16,5 +16,5 @@ add_custom_command(OUTPUT packages-info.txt ...@@ -16,5 +16,5 @@ add_custom_command(OUTPUT packages-info.txt
COMMAND ${PYTHON_EXECUTABLE} COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE}
${PYTHON_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
) )
...@@ -19,33 +19,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n ...@@ -19,33 +19,23 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n
message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}") message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}")
else (DEFINED ENV{revision}) else (DEFINED ENV{revision})
find_program(MERCURIAL find_program(GIT git)
NAMES hg if (DEFINED GIT )
PATHS [HKEY_LOCAL_MACHINE\\Software\\TortoiseHG] execute_process(
PATH_SUFFIXES Mercurial) COMMAND ${GIT} rev-list --count HEAD
mark_as_advanced(MERCURIAL) OUTPUT_VARIABLE VIEWER_VERSION_REVISION
if (MERCURIAL) OUTPUT_STRIP_TRAILING_WHITESPACE
execute_process(COMMAND ${MERCURIAL} identify --num --rev tip )
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
RESULT_VARIABLE hg_id_result message(STATUS "Revision (from git) ${VIEWER_VERSION_REVISION}")
ERROR_VARIABLE hg_id_error else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
OUTPUT_VARIABLE VIEWER_VERSION_REVISION message(STATUS "Revision not set (repository not found?); using 0")
OUTPUT_STRIP_TRAILING_WHITESPACE) set(VIEWER_VERSION_REVISION 0 )
if (NOT ${hg_id_result} EQUAL 0) endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
message(SEND_ERROR "Revision number generation failed with output:\n${hg_id_error}") else (DEFINED GIT )
else (NOT ${hg_id_result} EQUAL 0) message(STATUS "Revision not set: 'git' found; using 0")
string(REGEX REPLACE "[^0-9a-f]" "" VIEWER_VERSION_REVISION ${VIEWER_VERSION_REVISION}) set(VIEWER_VERSION_REVISION 0)
endif (NOT ${hg_id_result} EQUAL 0) endif (DEFINED GIT)
if ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
message(STATUS "Revision (from hg) ${VIEWER_VERSION_REVISION}")
else ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
message(STATUS "Revision not set (repository not found?); using 0")
set(VIEWER_VERSION_REVISION 0 )
endif ("${VIEWER_VERSION_REVISION}" MATCHES "^[0-9]+$")
else (MERCURIAL)
message(STATUS "Revision not set: mercurial not found; using 0")
set(VIEWER_VERSION_REVISION 0)
endif (MERCURIAL)
endif (DEFINED ENV{revision}) endif (DEFINED ENV{revision})
message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}") message(STATUS "Building '${VIEWER_CHANNEL}' Version ${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}")
else ( EXISTS ${VIEWER_VERSION_BASE_FILE} ) else ( EXISTS ${VIEWER_VERSION_BASE_FILE} )
......
...@@ -2,18 +2,14 @@ ...@@ -2,18 +2,14 @@
include(Linking) include(Linking)
include(Prebuilt) include(Prebuilt)
if (USESYSTEMLIBS) include_guard()
set(CEFPLUGIN OFF CACHE BOOL add_library( ll::cef INTERFACE IMPORTED )
"CEFPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS) use_prebuilt_binary(dullahan)
use_prebuilt_binary(dullahan) target_include_directories( ll::cef SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/cef)
set(CEFPLUGIN ON CACHE BOOL
"CEFPLUGIN support for the llplugin/llmedia test apps.")
set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef)
endif (USESYSTEMLIBS)
if (WINDOWS) if (WINDOWS)
set(CEF_PLUGIN_LIBRARIES target_link_libraries( ll::cef INTERFACE
libcef.lib libcef.lib
libcef_dll_wrapper.lib libcef_dll_wrapper.lib
dullahan.lib dullahan.lib
...@@ -29,7 +25,7 @@ elseif (DARWIN) ...@@ -29,7 +25,7 @@ elseif (DARWIN)
message(FATAL_ERROR "CEF not found") message(FATAL_ERROR "CEF not found")
endif() endif()
set(CEF_PLUGIN_LIBRARIES target_link_libraries( ll::cef INTERFACE
${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a
${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a
${APPKIT_LIBRARY} ${APPKIT_LIBRARY}
......
...@@ -5,108 +5,78 @@ include(00-Common) ...@@ -5,108 +5,78 @@ include(00-Common)
project(cmake) project(cmake)
set(cmake_SOURCE_FILES set(cmake_SOURCE_FILES
CMakeLists.txt CMakeLists.txt
00-Common.cmake
00-Common.cmake APR.cmake
APR.cmake Audio.cmake
Audio.cmake Boost.cmake
Boost.cmake bugsplat.cmake
bugsplat.cmake BuildVersion.cmake
BuildVersion.cmake CEFPlugin.cmake
CEFPlugin.cmake CEFPlugin.cmake
CEFPlugin.cmake CMakeCopyIfDifferent.cmake
CMakeCopyIfDifferent.cmake ConfigurePkgConfig.cmake
ConfigurePkgConfig.cmake CURL.cmake
CURL.cmake Copy3rdPartyLibs.cmake
Copy3rdPartyLibs.cmake DBusGlib.cmake
DBusGlib.cmake DeploySharedLibs.cmake
DeploySharedLibs.cmake DragDrop.cmake
DragDrop.cmake EXPAT.cmake
EXPAT.cmake FindAutobuild.cmake
FindAPR.cmake FMODSTUDIO.cmake
FindAutobuild.cmake FreeType.cmake
FindGLH.cmake GLEXT.cmake
FindHUNSPELL.cmake GLH.cmake
FindJsonCpp.cmake GoogleMock.cmake
FindNDOF.cmake Havok.cmake
FindOpenJPEG.cmake Hunspell.cmake
FindSCP.cmake JsonCpp.cmake
FindURIPARSER.cmake LLAddBuildTest.cmake
FindXmlRpcEpi.cmake LLAppearance.cmake
FindZLIBNG.cmake LLAudio.cmake
FMODSTUDIO.cmake LLCommon.cmake
FreeType.cmake LLImage.cmake
GLEXT.cmake LLKDU.cmake
GLH.cmake LLPhysicsExtensions.cmake
## GStreamer010Plugin.cmake LLPrimitive.cmake
GoogleMock.cmake LLSharedLibs.cmake
Havok.cmake LLTestCommand.cmake
Hunspell.cmake LLWindow.cmake
JPEG.cmake Linking.cmake
JsonCpp.cmake MESHOPTIMIZER.cmake
LLAddBuildTest.cmake NDOF.cmake
LLAppearance.cmake OPENAL.cmake
LLAudio.cmake OpenGL.cmake
LLCharacter.cmake OpenJPEG.cmake
LLCommon.cmake OpenSSL.cmake
LLCrashLogger.cmake PNG.cmake
LLImage.cmake PluginAPI.cmake
LLImageJ2COJ.cmake Prebuilt.cmake
LLInventory.cmake PulseAudio.cmake
LLKDU.cmake Python.cmake
LLLogin.cmake TemplateCheck.cmake
LLMath.cmake Tut.cmake
LLMeshOptimizer.cmake UI.cmake
LLMessage.cmake UnixInstall.cmake
LLPhysicsExtensions.cmake URIPARSER.cmake
LLPlugin.cmake Variables.cmake
LLPrimitive.cmake ViewerMiscLibs.cmake
LLRender.cmake VisualLeakDetector.cmake
LLSharedLibs.cmake LibVLCPlugin.cmake
LLTestCommand.cmake XmlRpcEpi.cmake
LLUI.cmake ZLIBNG.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
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}) source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
set(master_SOURCE_FILES set(master_SOURCE_FILES
../CMakeLists.txt ../CMakeLists.txt
) )
source_group("Master Rules" FILES ${master_SOURCE_FILES}) 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 add_library(cmake
cmake_dummy.cpp cmake_dummy.cpp
${cmake_SOURCE_FILES} ${cmake_SOURCE_FILES}
${master_SOURCE_FILES} ${master_SOURCE_FILES}
) )
# -*- cmake -*- # -*- cmake -*-
include(Prebuilt) include(Prebuilt)
set(CURL_FIND_QUIETLY ON) include_guard()
set(CURL_FIND_REQUIRED ON) add_library( ll::libcurl INTERFACE IMPORTED )
if (USESYSTEMLIBS) use_system_binary(libcurl)
include(FindCURL) use_prebuilt_binary(curl)
else (USESYSTEMLIBS) if (WINDOWS)
use_prebuilt_binary(curl) target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
if (WINDOWS) else (WINDOWS)
set(CURL_LIBRARIES target_link_libraries(ll::libcurl INTERFACE libcurl.a)
debug libcurld.lib endif (WINDOWS)
optimized libcurl.lib) target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
else (WINDOWS)
set(CURL_LIBRARIES libcurl.a)
endif (WINDOWS)
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
include(CMakeCopyIfDifferent) include(CMakeCopyIfDifferent)
include(Linking) include(Linking)
include(OPENAL)
include(FMODSTUDIO)
# When we copy our dependent libraries, we almost always want to copy them to # When we copy our dependent libraries, we almost always want to copy them to
# both the Release and the RelWithDebInfo staging directories. This has # both the Release and the RelWithDebInfo staging directories. This has
...@@ -13,27 +15,27 @@ include(Linking) ...@@ -13,27 +15,27 @@ include(Linking)
# copy_if_different commands. Encapsulate that usage. # copy_if_different commands. Encapsulate that usage.
# Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit. # 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. # to_staging_dirs diverges from copy_if_different in that it appends to TARGETS.
MACRO(to_staging_dirs from_dir targets) macro(to_staging_dirs from_dir targets)
foreach(staging_dir set( targetDir "${SHARED_LIB_STAGING_DIR}")
"${SHARED_LIB_STAGING_DIR_RELEASE}" copy_if_different("${from_dir}" "${targetDir}" out_targets ${ARGN})
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}")
copy_if_different("${from_dir}" "${staging_dir}" out_targets ${ARGN})
list(APPEND "${targets}" "${out_targets}") list(APPEND "${targets}" "${out_targets}")
endforeach() endmacro()
ENDMACRO(to_staging_dirs from_dir to_dir targets)
################################################################### ###################################################################
# set up platform specific lists of files that need to be copied # set up platform specific lists of files that need to be copied
################################################################### ###################################################################
if(WINDOWS) 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 # VIVOX - *NOTE: no debug version
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") 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 ) set(slvoice_files SLVoice.exe )
if (ADDRESS_SIZE EQUAL 64) if (ADDRESS_SIZE EQUAL 64)
list(APPEND vivox_libs list(APPEND vivox_libs
...@@ -84,14 +86,14 @@ if(WINDOWS) ...@@ -84,14 +86,14 @@ if(WINDOWS)
endif(ADDRESS_SIZE EQUAL 32) endif(ADDRESS_SIZE EQUAL 32)
endif (USE_BUGSPLAT) endif (USE_BUGSPLAT)
if (FMODSTUDIO) if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} fmodL.dll) set(debug_files ${debug_files} fmodL.dll)
set(release_files ${release_files} fmod.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) list(APPEND release_files openal32.dll alut.dll)
endif (OPENAL) endif ()
#******************************* #*******************************
# Copy MS C runtime dlls, required for packaging. # Copy MS C runtime dlls, required for packaging.
...@@ -150,14 +152,13 @@ if(WINDOWS) ...@@ -150,14 +152,13 @@ if(WINDOWS)
endforeach() endforeach()
elseif(DARWIN) 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")
# Support our "@executable_path/../Resources" load path for executables # Support our "@executable_path/../Resources" load path for executables
# that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE
# directories. # directories.
file(MAKE_DIRECTORY "${SHARED_LIB_STAGING_DIR}") # Cannot use ${SHARED_LIB_STAGING_DIR} here as it used a generator expression and tha this not
file(CREATE_LINK "Release/Resources" "${SHARED_LIB_STAGING_DIR}/Resources" # supported by file(...)
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources")
file(CREATE_LINK "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/sharedlibs/Resources"
SYMBOLIC) SYMBOLIC)
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
...@@ -186,10 +187,10 @@ elseif(DARWIN) ...@@ -186,10 +187,10 @@ elseif(DARWIN)
liburiparser.1.0.27.dylib liburiparser.1.0.27.dylib
) )
if (FMODSTUDIO) if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} libfmodL.dylib) set(debug_files ${debug_files} libfmodL.dylib)
set(release_files ${release_files} libfmod.dylib) set(release_files ${release_files} libfmod.dylib)
endif (FMODSTUDIO) endif ()
elseif(LINUX) elseif(LINUX)
# linux is weird, multiple side by side configurations aren't supported # linux is weird, multiple side by side configurations aren't supported
...@@ -217,28 +218,31 @@ elseif(LINUX) ...@@ -217,28 +218,31 @@ elseif(LINUX)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
# *FIX - figure out what to do with duplicate libalut.so here -brad # *FIX - figure out what to do with duplicate libalut.so here -brad
set(release_files set(release_files
libapr-1.so.0 ${EXPAT_COPY}
libaprutil-1.so.0 )
libatk-1.0.so
libdb-5.1.so
${EXPAT_COPY}
libfreetype.so.6.6.2
libfreetype.so.6
libgmodule-2.0.so
libgobject-2.0.so
libhunspell-1.3.so.0.0.0
libopenal.so
libopenjpeg.so
libuuid.so.16
libuuid.so.16.0.22
libfontconfig.so.1.8.0
libfontconfig.so.1
)
if (FMODSTUDIO) if( USE_AUTOBUILD_3P )
list( APPEND release_files
libapr-1.so.0
libaprutil-1.so.0
libatk-1.0.so
libfreetype.so.6.6.2
libfreetype.so.6
libhunspell-1.3.so.0.0.0
libuuid.so.16
libuuid.so.16.0.22
libfontconfig.so.1.8.0
libfontconfig.so.1
libgmodule-2.0.so
libgobject-2.0.so
)
endif()
if (TARGET ll::fmodstudio)
set(debug_files ${debug_files} "libfmodL.so") set(debug_files ${debug_files} "libfmodL.so")
set(release_files ${release_files} "libfmod.so") set(release_files ${release_files} "libfmod.so")
endif (FMODSTUDIO) endif ()
else(WINDOWS) else(WINDOWS)
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
...@@ -268,13 +272,16 @@ endif(WINDOWS) ...@@ -268,13 +272,16 @@ endif(WINDOWS)
# Curiously, slvoice_files are only copied to SHARED_LIB_STAGING_DIR_RELEASE. # 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 # It's unclear whether this is oversight or intentional, but anyway leave the
# single copy_if_different command rather than using to_staging_dirs. # single copy_if_different command rather than using to_staging_dirs.
copy_if_different(
${slvoice_src_dir} if( slvoice_src_dir )
"${SHARED_LIB_STAGING_DIR_RELEASE}" copy_if_different(
out_targets ${slvoice_src_dir}
${slvoice_files} "${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( to_staging_dirs(
${vivox_lib_dir} ${vivox_lib_dir}
...@@ -288,9 +295,7 @@ to_staging_dirs( ...@@ -288,9 +295,7 @@ to_staging_dirs(
${release_files} ${release_files}
) )
if(NOT USESYSTEMLIBS) add_custom_target(
add_custom_target( stage_third_party_libs ALL
stage_third_party_libs ALL DEPENDS ${third_party_targets}
DEPENDS ${third_party_targets} )
)
endif(NOT USESYSTEMLIBS)
# -*- cmake -*- # -*- cmake -*-
include(Prebuilt) include(Prebuilt)
if (USESYSTEMLIBS) add_library( ll::dbus INTERFACE IMPORTED)
include(FindPkgConfig)
pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) 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)
elseif (LINUX)
use_prebuilt_binary(dbus_glib) use_prebuilt_binary(dbus_glib)
set(DBUSGLIB_FOUND ON FORCE BOOL) endif()
set(DBUSGLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/dbus
)
# We don't need to explicitly link against dbus-glib itself, because
# the viewer probes for the system's copy at runtime.
set(DBUSGLIB_LIBRARIES
gobject-2.0
glib-2.0
)
endif (USESYSTEMLIBS)
if (DBUSGLIB_FOUND)
set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.")
endif (DBUSGLIB_FOUND)
if (DBUSGLIB)
add_definitions(-DLL_DBUS_ENABLED=1)
endif (DBUSGLIB)
# -*- cmake -*- # -*- cmake -*-
set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off") 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 (OS_DRAG_DROP)
if (WINDOWS) if (WINDOWS)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (WINDOWS) endif (WINDOWS)
if (DARWIN) if (DARWIN)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (DARWIN) endif (DARWIN)
if (LINUX) if (LINUX)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=0) add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (LINUX) endif (LINUX)
endif (OS_DRAG_DROP)
endif (OS_DRAG_DROP)
# -*- cmake -*- # -*- cmake -*-
include(Prebuilt) include(Prebuilt)
set(EXPAT_FIND_QUIETLY ON) include_guard()
set(EXPAT_FIND_REQUIRED ON) add_library( ll::expat INTERFACE IMPORTED )
if (USESYSTEMLIBS) use_system_binary(expat)
include(FindEXPAT) use_prebuilt_binary(expat)
else (USESYSTEMLIBS) if (WINDOWS)
use_prebuilt_binary(expat) target_link_libraries( ll::expat INTERFACE libexpatMT )
if (WINDOWS) set(EXPAT_COPY libexpatMT.dll)
set(EXPAT_LIBRARIES libexpatMT) else (WINDOWS)
set(EXPAT_COPY libexpatMT.dll) target_link_libraries( ll::expat INTERFACE expat )
else (WINDOWS) if (DARWIN)
set(EXPAT_LIBRARIES expat) set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
if (DARWIN) else ()
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib) set(EXPAT_COPY libexpat.so.1 libexpat.so)
else () endif ()
set(EXPAT_COPY libexpat.so.1 libexpat.so) endif (WINDOWS)
endif () target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
endif (WINDOWS)
set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
...@@ -2,15 +2,5 @@ ...@@ -2,15 +2,5 @@
include(Linking) include(Linking)
include(Prebuilt) include(Prebuilt)
if (USESYSTEMLIBS) set(EXAMPLEPLUGIN ON CACHE BOOL
set(EXAMPLEPLUGIN OFF CACHE BOOL
"EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") "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)
# -*- cmake -*- # -*- cmake -*-
include_guard()
# FMODSTUDIO can be set when launching the make using the argument -DFMODSTUDIO:BOOL=ON # 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), # When building using proprietary binaries though (i.e. having access to LL private servers),
# we always build with FMODSTUDIO. # we always build with FMODSTUDIO.
if (INSTALL_PROPRIETARY) if (INSTALL_PROPRIETARY)
set(FMODSTUDIO ON CACHE BOOL "Using FMODSTUDIO sound library.") set(USE_FMODSTUDIO ON CACHE BOOL "Using FMODSTUDIO sound library.")
endif (INSTALL_PROPRIETARY) endif (INSTALL_PROPRIETARY)
if (FMODSTUDIO) # 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 (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 (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If the path have been specified in the arguments, use that # If the path have been specified in the arguments, use that
set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
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) else (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
# If not, we're going to try to get the package listed in autobuild.xml # 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) # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
...@@ -18,21 +32,17 @@ if (FMODSTUDIO) ...@@ -18,21 +32,17 @@ if (FMODSTUDIO)
include(Prebuilt) include(Prebuilt)
use_prebuilt_binary(fmodstudio) use_prebuilt_binary(fmodstudio)
if (WINDOWS) if (WINDOWS)
set(FMODSTUDIO_LIBRARY target_link_libraries( ll::fmodstudio INTERFACE fmod_vc)
debug fmodL_vc
optimized fmod_vc)
elseif (DARWIN) elseif (DARWIN)
#despite files being called libfmod.dylib, we are searching for fmod #despite files being called libfmod.dylib, we are searching for fmod
set(FMODSTUDIO_LIBRARY target_link_libraries( ll::fmodstudio INTERFACE fmod)
debug fmodL
optimized fmod)
elseif (LINUX) elseif (LINUX)
set(FMODSTUDIO_LIBRARY target_link_libraries( ll::fmodstudio INTERFACE fmod)
debug fmodL
optimized fmod)
endif (WINDOWS) endif (WINDOWS)
set(FMODSTUDIO_LIBRARIES ${FMODSTUDIO_LIBRARY})
set(FMODSTUDIO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodstudio) target_include_directories( ll::fmodstudio SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/fmodstudio)
endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR) endif (FMODSTUDIO_LIBRARY AND FMODSTUDIO_INCLUDE_DIR)
endif (FMODSTUDIO) else()
set( USE_FMODSTUDIO "OFF")
endif ()
# -*- 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
)
# -*- 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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment