Major breaking changes
This commit is contained in:
@@ -40,22 +40,6 @@ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING
|
||||
# Platform-specific compilation flags.
|
||||
|
||||
if (WINDOWS)
|
||||
# Various libs are compiler specific, generate some variables here we can just use
|
||||
# when we require them instead of reimplementing the test each time.
|
||||
if (MSVC10)
|
||||
set(MSVC_DIR 10.0)
|
||||
set(MSVC_SUFFIX 100)
|
||||
elseif (MSVC12)
|
||||
set(MSVC_DIR 12.0)
|
||||
set(MSVC_SUFFIX 120)
|
||||
endif (MSVC10)
|
||||
|
||||
# Remove default /Zm1000 flag that cmake inserts
|
||||
string (REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
# Always use /Zm140
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm140")
|
||||
|
||||
# Don't build DLLs.
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
@@ -70,52 +54,43 @@ if (WINDOWS)
|
||||
set(CMAKE_C_FLAGS_RELEASE
|
||||
"${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast"
|
||||
CACHE STRING "C compiler release options" FORCE)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "")
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "")
|
||||
|
||||
add_definitions(
|
||||
/DLL_WINDOWS=1
|
||||
/DNOMINMAX
|
||||
/DUNICODE
|
||||
/D_UNICODE
|
||||
/D_UNICODE
|
||||
/GS
|
||||
/TP
|
||||
/W3
|
||||
/c
|
||||
/Zc:forScope
|
||||
/Zc:wchar_t-
|
||||
/Zc:rvalueCast
|
||||
/Zc:wchar_t
|
||||
/nologo
|
||||
/Oy-
|
||||
/Zm140
|
||||
)
|
||||
|
||||
# SSE2 is implied on win64
|
||||
if(WORD_SIZE EQUAL 32)
|
||||
add_definitions(/arch:SSE2 /D_ATL_XP_TARGETING)
|
||||
else(WORD_SIZE EQUAL 32)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4267 /wd4250 /wd4244")
|
||||
endif(WORD_SIZE EQUAL 32)
|
||||
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
# configure win32 API for windows XP+ compatibility
|
||||
set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
||||
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
# configure win32 API for windows vista+ compatibility
|
||||
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
||||
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
||||
add_compile_options(/arch:SSE2)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
|
||||
# Use special XP-compatible toolchain on 32-bit builds
|
||||
if (MSVC12 AND (WORD_SIZE EQUAL 32))
|
||||
set(CMAKE_GENERATOR_TOOLSET "v120xp")
|
||||
endif (MSVC12 AND (WORD_SIZE EQUAL 32))
|
||||
|
||||
# Are we using the crummy Visual Studio KDU build workaround?
|
||||
if (NOT DISABLE_FATAL_WARNINGS)
|
||||
add_definitions(/WX)
|
||||
endif (NOT DISABLE_FATAL_WARNINGS)
|
||||
|
||||
# configure win32 API for windows Vista+ compatibility
|
||||
set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
|
||||
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO")
|
||||
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO")
|
||||
|
||||
@@ -13,37 +13,43 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
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 libapr-1.lib
|
||||
optimized libapr-1.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apr-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
|
||||
)
|
||||
set(APRICONV_LIBRARIES
|
||||
debug libapriconv-1.lib
|
||||
optimized libapriconv-1.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}apriconv-1.lib
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
|
||||
)
|
||||
set(APRUTIL_LIBRARIES
|
||||
debug libaprutil-1.lib
|
||||
optimized libaprutil-1.lib
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib ${APRICONV_LIBRARIES}
|
||||
)
|
||||
if(NOT LLCOMMON_LINK_SHARED)
|
||||
list(APPEND APR_LIBRARIES Rpcrt4)
|
||||
endif(NOT LLCOMMON_LINK_SHARED)
|
||||
elseif (DARWIN)
|
||||
set(APR_LIBRARIES
|
||||
debug libapr-1.0.dylib
|
||||
optimized libapr-1.0.dylib
|
||||
)
|
||||
set(APRUTIL_LIBRARIES
|
||||
debug libaprutil-1.dylib
|
||||
optimized libaprutil-1.dylib
|
||||
)
|
||||
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
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/apr-1
|
||||
)
|
||||
set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1)
|
||||
|
||||
if (LINUX)
|
||||
list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES})
|
||||
|
||||
@@ -8,11 +8,8 @@ if (STANDALONE)
|
||||
pkg_check_modules(VORBISENC REQUIRED vorbisenc)
|
||||
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(ogg-vorbis)
|
||||
set(VORBIS_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
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})
|
||||
|
||||
|
||||
@@ -11,11 +11,8 @@ if (STANDALONE)
|
||||
find_package(Boost 1.51.0 COMPONENTS date_time filesystem program_options regex system thread wave context)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(Boost_VERSION "1.52")
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
set(Boost_VERSION "1.60")
|
||||
|
||||
if (WINDOWS)
|
||||
set(Boost_CONTEXT_LIBRARY
|
||||
|
||||
11
indra/cmake/BuildPackagesInfo.cmake
Normal file
11
indra/cmake/BuildPackagesInfo.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- cmake -*-
|
||||
# Construct the version and copyright information based on package data.
|
||||
include(Python)
|
||||
include(Variables)
|
||||
|
||||
add_custom_command(OUTPUT packages-info.txt
|
||||
COMMENT "Generating packages-info.txt for the about box"
|
||||
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py -p=${AUTOBUILD_PLATFORM_NAME} > packages-info.txt
|
||||
)
|
||||
@@ -20,8 +20,5 @@ else (STANDALONE)
|
||||
else (WINDOWS)
|
||||
set(CARES_LIBRARIES cares)
|
||||
endif (WINDOWS)
|
||||
set(CARES_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include/ares
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/ares
|
||||
)
|
||||
set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/ares)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -20,18 +20,17 @@ set(cmake_SOURCE_FILES
|
||||
CURL.cmake
|
||||
Colladadom.cmake
|
||||
ConfigurePkgConfig.cmake
|
||||
CopyBackToSource.cmake
|
||||
CopyWinLibs.cmake
|
||||
Copy3rdPartyLibs.cmake
|
||||
Cwdebug.cmake
|
||||
DBusGlib.cmake
|
||||
DirectX.cmake
|
||||
DownloadPrebuilt.cmake.in
|
||||
DeploySharedLibs.cmake
|
||||
ELFIO.cmake
|
||||
EXPAT.cmake
|
||||
ExamplePlugin.cmake
|
||||
FMODEX.cmake
|
||||
FMODSTUDIO.cmake
|
||||
FindAPR.cmake
|
||||
FindAutobuild.cmake
|
||||
FindBerkeleyDB.cmake
|
||||
FindCARes.cmake
|
||||
FindColladadom.cmake
|
||||
@@ -73,6 +72,7 @@ set(cmake_SOURCE_FILES
|
||||
LLSharedLibs.cmake
|
||||
LLQtWebkit.cmake
|
||||
LLRender.cmake
|
||||
LLSharedLibs.cmake
|
||||
LLUI.cmake
|
||||
LLVFS.cmake
|
||||
LLWindow.cmake
|
||||
@@ -110,7 +110,6 @@ source_group("Shared Rules" FILES ${cmake_SOURCE_FILES})
|
||||
|
||||
set(master_SOURCE_FILES
|
||||
../CMakeLists.txt
|
||||
../develop.py
|
||||
)
|
||||
|
||||
source_group("Master Rules" FILES ${master_SOURCE_FILES})
|
||||
|
||||
@@ -18,8 +18,5 @@ else (STANDALONE)
|
||||
list(APPEND CURL_LIBRARIES idn)
|
||||
endif(LINUX AND WORD_SIZE EQUAL 64)
|
||||
endif (WINDOWS)
|
||||
set(CURL_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -10,49 +10,22 @@ if (STANDALONE)
|
||||
include (FindColladadom)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(colladadom)
|
||||
|
||||
if (NOT WINDOWS AND NOT LINUX)
|
||||
use_prebuilt_binary(pcre)
|
||||
endif (NOT WINDOWS AND NOT LINUX)
|
||||
|
||||
if (NOT DARWIN AND NOT WINDOWS)
|
||||
use_prebuilt_binary(libxml)
|
||||
endif (NOT DARWIN AND NOT WINDOWS)
|
||||
|
||||
set(COLLADADOM_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include/collada
|
||||
${LIBS_PREBUILT_DIR}/include/collada/1.4
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/collada
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/collada/1.4
|
||||
)
|
||||
${LIBS_PREBUILT_DIR}/include/collada
|
||||
${LIBS_PREBUILT_DIR}/include/collada/1.4
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
if(MSVC12)
|
||||
use_prebuilt_binary(pcre)
|
||||
use_prebuilt_binary(libxml)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
debug libcollada14dom23-sd
|
||||
optimized libcollada14dom23-s
|
||||
libxml2_a
|
||||
debug pcrecppd
|
||||
optimized pcrecpp
|
||||
debug pcred
|
||||
optimized pcre
|
||||
${BOOST_SYSTEM_LIBRARIES}
|
||||
)
|
||||
else(MSVC12)
|
||||
add_definitions(-DDOM_DYNAMIC)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
debug libcollada14dom22-d
|
||||
optimized libcollada14dom22
|
||||
)
|
||||
endif(MSVC12)
|
||||
else (WINDOWS)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
collada14dom
|
||||
minizip
|
||||
xml2
|
||||
)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
debug libcollada14dom23-sd
|
||||
optimized libcollada14dom23-s
|
||||
)
|
||||
else(WINDOWS)
|
||||
set(COLLADADOM_LIBRARIES
|
||||
debug collada14dom-d
|
||||
optimized collada14dom
|
||||
minizip
|
||||
)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
|
||||
244
indra/cmake/Copy3rdPartyLibs.cmake
Normal file
244
indra/cmake/Copy3rdPartyLibs.cmake
Normal file
@@ -0,0 +1,244 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# The copy_win_libs folder contains file lists and a script used to
|
||||
# copy dlls, exes and such needed to run the SecondLife from within
|
||||
# VisualStudio.
|
||||
|
||||
include(CMakeCopyIfDifferent)
|
||||
include(Linking)
|
||||
|
||||
###################################################################
|
||||
# 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_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(vivox_files
|
||||
SLVoice.exe
|
||||
ca-bundle.crt
|
||||
libsndfile-1.dll
|
||||
vivoxplatform.dll
|
||||
vivoxsdk.dll
|
||||
ortp.dll
|
||||
zlib1.dll
|
||||
vivoxoal.dll
|
||||
)
|
||||
|
||||
#*******************************
|
||||
# Misc shared libs
|
||||
|
||||
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
set(debug_files
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
ssleay32.dll
|
||||
libeay32.dll
|
||||
glod.dll
|
||||
libhunspell.dll
|
||||
)
|
||||
|
||||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(release_files
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
ssleay32.dll
|
||||
libeay32.dll
|
||||
glod.dll
|
||||
libhunspell.dll
|
||||
)
|
||||
|
||||
if(USE_TCMALLOC)
|
||||
set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll)
|
||||
set(release_files ${release_files} libtcmalloc_minimal.dll)
|
||||
endif(USE_TCMALLOC)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
if(WORD_SIZE STREQUAL 64)
|
||||
set(debug_files ${debug_files} fmodL64.dll)
|
||||
set(release_files ${release_files} fmod64.dll)
|
||||
else(WORD_SIZE STREQUAL 64)
|
||||
set(debug_files ${debug_files} fmodL.dll)
|
||||
set(release_files ${release_files} fmod.dll)
|
||||
endif(WORD_SIZE STREQUAL 64)
|
||||
endif (FMODSTUDIO)
|
||||
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_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(vivox_files
|
||||
SLVoice
|
||||
ca-bundle.crt
|
||||
libsndfile.dylib
|
||||
libvivoxoal.dylib
|
||||
libortp.dylib
|
||||
libvivoxplatform.dylib
|
||||
libvivoxsdk.dylib
|
||||
)
|
||||
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
set(debug_files
|
||||
)
|
||||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(release_files
|
||||
libapr-1.0.dylib
|
||||
libapr-1.dylib
|
||||
libaprutil-1.0.dylib
|
||||
libaprutil-1.dylib
|
||||
libexception_handler.dylib
|
||||
libexpat.1.5.2.dylib
|
||||
libexpat.dylib
|
||||
libGLOD.dylib
|
||||
libhunspell-1.3.0.dylib
|
||||
libndofdev.dylib
|
||||
)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
set(debug_files ${debug_files} libfmodL.dylib)
|
||||
set(release_files ${release_files} libfmod.dylib)
|
||||
endif (FMODSTUDIO)
|
||||
|
||||
elseif(LINUX)
|
||||
# linux is weird, multiple side by side configurations aren't supported
|
||||
# and we don't seem to have any debug shared libs built yet anyways...
|
||||
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}")
|
||||
set(SHARED_LIB_STAGING_DIR_RELWITHDEBINFO "${SHARED_LIB_STAGING_DIR}")
|
||||
set(SHARED_LIB_STAGING_DIR_RELEASE "${SHARED_LIB_STAGING_DIR}")
|
||||
|
||||
set(vivox_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set(vivox_files
|
||||
libsndfile.so.1
|
||||
libortp.so
|
||||
libvivoxoal.so.1
|
||||
libvivoxplatform.so
|
||||
libvivoxsdk.so
|
||||
SLVoice
|
||||
# ca-bundle.crt #No cert for linux. It is actually still 3.2SDK.
|
||||
)
|
||||
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||
# or ARCH_PREBUILT_DIRS
|
||||
set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}")
|
||||
set(debug_files
|
||||
)
|
||||
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||
# or ARCH_PREBUILT_DIRS
|
||||
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
# *FIX - figure out what to do with duplicate libalut.so here -brad
|
||||
set(release_files
|
||||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
libatk-1.0.so
|
||||
libdb-5.1.so
|
||||
libexpat.so
|
||||
libexpat.so.1
|
||||
libfreetype.so.6.6.2
|
||||
libfreetype.so.6
|
||||
libGLOD.so
|
||||
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 (USE_TCMALLOC)
|
||||
set(release_files ${release_files} "libtcmalloc_minimal.so")
|
||||
endif (USE_TCMALLOC)
|
||||
|
||||
if (FMODSTUDIO)
|
||||
set(debug_files ${debug_files} "libfmodL.so")
|
||||
set(release_files ${release_files} "libfmod.so")
|
||||
endif (FMODSTUDIO)
|
||||
|
||||
else(WINDOWS)
|
||||
message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...")
|
||||
set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-linux")
|
||||
set(vivox_files "")
|
||||
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||
# or ARCH_PREBUILT_DIRS
|
||||
set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/debug")
|
||||
set(debug_files "")
|
||||
# *TODO - update this to use LIBS_PREBUILT_DIR and LL_ARCH_DIR variables
|
||||
# or ARCH_PREBUILT_DIRS
|
||||
set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release")
|
||||
set(release_files "")
|
||||
|
||||
set(debug_llkdu_src "")
|
||||
set(debug_llkdu_dst "")
|
||||
set(release_llkdu_src "")
|
||||
set(release_llkdu_dst "")
|
||||
set(relwithdebinfo_llkdu_dst "")
|
||||
endif(WINDOWS)
|
||||
|
||||
|
||||
################################################################
|
||||
# Done building the file lists, now set up the copy commands.
|
||||
################################################################
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${vivox_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
|
||||
out_targets
|
||||
${vivox_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
|
||||
|
||||
copy_if_different(
|
||||
${debug_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_DEBUG}"
|
||||
out_targets
|
||||
${debug_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELEASE}"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
copy_if_different(
|
||||
${release_src_dir}
|
||||
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
|
||||
out_targets
|
||||
${release_files}
|
||||
)
|
||||
set(third_party_targets ${third_party_targets} ${out_targets})
|
||||
|
||||
if(NOT USESYSTEMLIBS)
|
||||
add_custom_target(
|
||||
stage_third_party_libs ALL
|
||||
DEPENDS ${third_party_targets}
|
||||
)
|
||||
endif(NOT USESYSTEMLIBS)
|
||||
@@ -1,16 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
# Copies a binary back to the source directory
|
||||
|
||||
MACRO(COPY_BACK_TO_SOURCE target)
|
||||
SET(FROM $<TARGET_FILE:${target}>)
|
||||
SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
#MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}
|
||||
DEPENDS ${FROM}
|
||||
COMMENT "Copying ${target} to ${CMAKE_CURRENT_BINARY_DIR}"
|
||||
)
|
||||
ENDMACRO(COPY_BACK_TO_SOURCE)
|
||||
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# The copy_win_libs folder contains file lists and a script used to
|
||||
# copy dlls, exes and such needed to run the SecondLife from within
|
||||
# VisualStudio.
|
||||
|
||||
set(LIBS_PREBUILT_DIR "@LIBS_PREBUILT_DIR@")
|
||||
set(LIBS_PREBUILT_LEGACY_DIR "@LIBS_PREBUILT_LEGACY_DIR@")
|
||||
set(MSVC10 "@MSVC10@")
|
||||
set(WORD_SIZE "@WORD_SIZE@")
|
||||
|
||||
set(LIBS_RELEASE_DIR
|
||||
${LIBS_PREBUILT_DIR}/lib/release
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
|
||||
)
|
||||
set(LIBS_DEBUG_DIR
|
||||
${LIBS_PREBUILT_DIR}/lib/debug
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/debug
|
||||
)
|
||||
|
||||
function(copy_files paths names dest)
|
||||
string(FIND ${dest} ${CUR_CONFIG} idx)
|
||||
if(${idx} LESS 0)
|
||||
return()
|
||||
endif(${idx} LESS 0)
|
||||
foreach(f ${names})
|
||||
foreach(p ${paths})
|
||||
set(from_file "${p}/${f}")
|
||||
set(to_dest "${CMAKE_BINARY_DIR}/newview/${dest}/")
|
||||
if(EXISTS ${from_file})
|
||||
message("Copying ${from_file} to ${to_dest}")
|
||||
if(NOT EXISTS ${to_dest})
|
||||
execute_process(COMMAND md "${to_dest}")
|
||||
endif(NOT EXISTS ${to_dest})
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${from_file}" "${to_dest}${f}" RESULT_VARIABLE result)
|
||||
if(${result})
|
||||
message(SEND_ERROR "Unsuccessful.")
|
||||
endif(${result})
|
||||
set(found 1)
|
||||
break()
|
||||
endif(EXISTS ${from_file})
|
||||
endforeach(p)
|
||||
if(NOT found)
|
||||
message(SEND_ERROR "Failed to find library: ${f}")
|
||||
endif(NOT found)
|
||||
endforeach(f)
|
||||
endfunction(copy_files)
|
||||
|
||||
set(vivox_files
|
||||
ca-bundle.crt
|
||||
libsndfile-1.dll
|
||||
ortp.dll
|
||||
SLVoice.exe
|
||||
vivoxoal.dll
|
||||
vivoxplatform.dll
|
||||
vivoxsdk.dll
|
||||
zlib1.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "Release" )
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${vivox_files}" "RelWithDebInfo")
|
||||
copy_files("${LIBS_DEBUG_DIR}" "${vivox_files}" "Debug")
|
||||
|
||||
set(release_files
|
||||
libhunspell.dll
|
||||
libapr-1.dll
|
||||
libaprutil-1.dll
|
||||
libapriconv-1.dll
|
||||
libeay32.dll
|
||||
ssleay32.dll
|
||||
glod.dll
|
||||
qtcore4.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
|
||||
copy_files("${LIBS_DEBUG_DIR}" "${release_files}" "Debug")
|
||||
|
||||
if(MSVC10)
|
||||
copy_files("${LIBS_DEBUG_DIR}" "libcollada14dom22-d.dll" "Debug")
|
||||
endif(MSVC10)
|
||||
|
||||
if(WORD_SIZE EQUAL 32)
|
||||
set(release_files
|
||||
libcollada14dom22.dll
|
||||
libtcmalloc_minimal.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "Release")
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${release_files}" "RelWithDebInfo")
|
||||
endif(WORD_SIZE EQUAL 32)
|
||||
|
||||
set(plugins_release_files
|
||||
libeay32.dll
|
||||
qtcore4.dll
|
||||
qtgui4.dll
|
||||
qtnetwork4.dll
|
||||
qtopengl4.dll
|
||||
qtwebkit4.dll
|
||||
ssleay32.dll
|
||||
qtxmlpatterns4.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "Release/llplugin")
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${plugins_release_files}" "RelWithDebInfo/llplugin")
|
||||
if(0)
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/Release")
|
||||
copy_files("${LIBS_RELEASE_DIR}" "${plugin_release_files}" "../test_apps/llplugintest/RelWithDebInfo")
|
||||
endif(0)
|
||||
|
||||
# Debug config runtime files required for the plugins
|
||||
set(plugins_debug_files
|
||||
libeay32.dll
|
||||
qtcored4.dll
|
||||
qtguid4.dll
|
||||
qtnetworkd4.dll
|
||||
qtopengld4.dll
|
||||
qtwebkitd4.dll
|
||||
ssleay32.dll
|
||||
qtxmlpatternsd4.dll
|
||||
)
|
||||
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "Debug/llplugin")
|
||||
if(0)
|
||||
copy_files("${LIBS_DEBUG_DIR}" "${plugins_debug_files}" "../test_apps/llplugintest/Debug")
|
||||
endif(0)
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugin_image_release_files
|
||||
qgif4.dll
|
||||
qico4.dll
|
||||
qjpeg4.dll
|
||||
qmng4.dll
|
||||
qsvg4.dll
|
||||
qtiff4.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "Release/llplugin/imageformats")
|
||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "RelWithDebInfo/llplugin/imageformats")
|
||||
if(0)
|
||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/Release")
|
||||
copy_files("${LIBS_RELEASE_DIR}/imageformats" "${plugin_image_release_files}" "../test_apps/llplugintest/imageformats/RelWithDebInfo")
|
||||
endif(0)
|
||||
|
||||
|
||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugin_image_debug_files
|
||||
qgifd4.dll
|
||||
qicod4.dll
|
||||
qjpegd4.dll
|
||||
qmngd4.dll
|
||||
qsvgd4.dll
|
||||
qtiffd4.dll
|
||||
)
|
||||
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "Debug/llplugin/imageformats")
|
||||
if(0)
|
||||
copy_files("${LIBS_DEBUG_DIR}/imageformats" "${plugin_image_debug_files}" "../test_apps/llplugintest/imageformats/Debug")
|
||||
endif(0)
|
||||
|
||||
# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugin_codec_release_files
|
||||
qcncodecs4.dll
|
||||
qjpcodecs4.dll
|
||||
qkrcodecs4.dll
|
||||
qtwcodecs4.dll
|
||||
)
|
||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "Release/llplugin/codecs")
|
||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "RelWithDebInfo/llplugin/codecs")
|
||||
if(0)
|
||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/Release")
|
||||
copy_files("${LIBS_RELEASE_DIR}/codecs" "${plugin_codec_release_files}" "../test_apps/llplugintest/codecs/RelWithDebInfo")
|
||||
endif(0)
|
||||
|
||||
# Debug config runtime files required for the plugin test mule (Qt image format plugins)
|
||||
set(plugin_codec_debug_files
|
||||
qcncodecsd4.dll
|
||||
qjpcodecsd4.dll
|
||||
qkrcodecsd4.dll
|
||||
qtwcodecsd4.dll
|
||||
)
|
||||
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "Debug/llplugin/codecs")
|
||||
if(0)
|
||||
copy_files("${LIBS_DEBUG_DIR}/codecs" "${plugin_codec_debug_files}" "../test_apps/llplugintest/codecs/Debug")
|
||||
endif(0)
|
||||
|
||||
|
||||
|
||||
70
indra/cmake/DeploySharedLibs.cmake
Normal file
70
indra/cmake/DeploySharedLibs.cmake
Normal file
@@ -0,0 +1,70 @@
|
||||
# DeploySharedLibs.cmake
|
||||
# This is a script to be run at build time! Its not part of the cmake configuration!
|
||||
# See indra/cmake/LLSharedLibs.cmake for a macro that simplifies adding a command to a target to run this script.
|
||||
|
||||
# This script requires a few cmake variable to be set on the command line:
|
||||
# BIN_NAME= The full path the the binary to search for dependecies.
|
||||
# SEARCH_DIRS= The full paths to dirs to search for dependencies.
|
||||
# DST_PATH= The full path where the dependecies will be copied.
|
||||
get_filename_component(current_dir ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
include(GetPrerequisites)
|
||||
|
||||
message("Getting recursive dependencies for file: ${BIN_NAME}")
|
||||
|
||||
set(EXCLUDE_SYSTEM 1)
|
||||
set(RECURSE 0)
|
||||
get_filename_component(EXE_PATH ${BIN_NAME} PATH)
|
||||
|
||||
get_prerequisites( ${BIN_NAME} RESULTS ${EXCLUDE_SYSTEM} ${RECURSE} "${EXE_PATH}" "${SEARCH_DIRS}" )
|
||||
|
||||
foreach(DEP ${RESULTS})
|
||||
Message("Processing dependency: ${DEP}")
|
||||
get_filename_component(DEP_FILE ${DEP} NAME)
|
||||
set(DEP_FILES ${DEP_FILES} ${DEP_FILE})
|
||||
endforeach(DEP)
|
||||
|
||||
if(DEP_FILES)
|
||||
list(REMOVE_DUPLICATES DEP_FILES)
|
||||
endif(DEP_FILES)
|
||||
|
||||
foreach(DEP_FILE ${DEP_FILES})
|
||||
if(FOUND_FILES)
|
||||
list(FIND FOUND_FILES ${DEP_FILE} FOUND)
|
||||
else(FOUND_FILES)
|
||||
set(FOUND -1)
|
||||
endif(FOUND_FILES)
|
||||
|
||||
if(FOUND EQUAL -1)
|
||||
find_path(DEP_PATH ${DEP_FILE} PATHS ${SEARCH_DIRS} NO_DEFAULT_PATH)
|
||||
if(DEP_PATH)
|
||||
set(FOUND_FILES ${FOUND_FILES} "${DEP_PATH}/${DEP_FILE}")
|
||||
set(DEP_PATH NOTFOUND) #reset DEP_PATH for the next find_path call.
|
||||
else(DEP_PATH)
|
||||
set(MISSING_FILES ${MISSING_FILES} ${DEP_FILE})
|
||||
endif(DEP_PATH)
|
||||
endif(FOUND EQUAL -1)
|
||||
endforeach(DEP_FILE)
|
||||
|
||||
if(MISSING_FILES)
|
||||
message("Missing:")
|
||||
foreach(FILE ${MISSING_FILES})
|
||||
message(" ${FILE}")
|
||||
endforeach(FILE)
|
||||
message("Searched in:")
|
||||
foreach(SEARCH_DIR ${SEARCH_DIRS})
|
||||
message(" ${SEARCH_DIR}")
|
||||
endforeach(SEARCH_DIR)
|
||||
message(FATAL_ERROR "Failed")
|
||||
endif(MISSING_FILES)
|
||||
|
||||
if(FOUND_FILES)
|
||||
foreach(FILE ${FOUND_FILES})
|
||||
get_filename_component(DST_FILE ${FILE} NAME)
|
||||
set(DST_FILE "${DST_PATH}/${DST_FILE}")
|
||||
message("Copying ${FILE} to ${DST_FILE}")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST_FILE}
|
||||
)
|
||||
endforeach(FILE ${FOUND_FILES})
|
||||
endif(FOUND_FILES)
|
||||
message("Success!")
|
||||
@@ -1,82 +0,0 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
include(Variables)
|
||||
|
||||
if (WINDOWS)
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set (DIRECTX_ARCHITECTURE x86)
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set (DIRECTX_ARCHITECTURE x64)
|
||||
else (WORD_SIZE EQUAL 32)
|
||||
set (DIRECTX_ARCHITECTURE x86)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
|
||||
SET(program_files $ENV{ProgramW6432})
|
||||
if(NOT program_files)
|
||||
SET(program_files $ENV{ProgramFiles})
|
||||
endif(NOT program_files)
|
||||
SET(program_files_x86 "ProgramFiles(x86)")
|
||||
SET(program_files_x86 $ENV{${program_files_x86}})
|
||||
|
||||
find_path(DIRECTX_ROOT_DIR Include/dxdiag.h
|
||||
PATHS
|
||||
"$ENV{DXSDK_DIR}"
|
||||
"${program_files}/Microsoft DirectX SDK (June 2010)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (June 2010)"
|
||||
"${program_files}/Microsoft DirectX SDK (February 2010)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (February 2010)"
|
||||
"${program_files}/Microsoft DirectX SDK (March 2009)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (March 2009)"
|
||||
"${program_files}/Microsoft DirectX SDK (August 2008)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (August 2008)"
|
||||
"${program_files}/Microsoft DirectX SDK (June 2008)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (June 2008)"
|
||||
"${program_files}/Microsoft DirectX SDK (March 2008)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (March 2008)"
|
||||
"${program_files}/Microsoft DirectX SDK (November 2007)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (November 2007)"
|
||||
"${program_files}/Microsoft DirectX SDK (August 2007)"
|
||||
"${program_files_x86}/Microsoft DirectX SDK (August 2007)"
|
||||
)
|
||||
|
||||
if (DIRECTX_ROOT_DIR)
|
||||
set (DIRECTX_INCLUDE_DIR "${DIRECTX_ROOT_DIR}/Include")
|
||||
set (DIRECTX_LIBRARY_DIR "${DIRECTX_ROOT_DIR}/Lib/${DIRECTX_ARCHITECTURE}")
|
||||
else (DIRECTX_ROOT_DIR)
|
||||
find_path (WIN_KIT_ROOT_DIR Include/um/windows.h
|
||||
PATHS
|
||||
"${program_files}/Windows Kits/8.1"
|
||||
"${program_files_x86}/Windows Kits/8.1"
|
||||
"${program_files}/Windows Kits/8.0"
|
||||
"${program_files_x86}/Windows Kits/8.0"
|
||||
)
|
||||
|
||||
find_path (WIN_KIT_LIB_DIR dxguid.lib
|
||||
"${WIN_KIT_ROOT_DIR}/Lib/winv6.3/um/${DIRECTX_ARCHITECTURE}"
|
||||
"${WIN_KIT_ROOT_DIR}/Lib/Win8/um/${DIRECTX_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
if (WIN_KIT_ROOT_DIR AND WIN_KIT_LIB_DIR)
|
||||
set (DIRECTX_INCLUDE_DIR "${WIN_KIT_ROOT_DIR}/Include/um" "${WIN_KIT_ROOT_DIR}/Include/shared")
|
||||
set (DIRECTX_LIBRARY_DIR "${WIN_KIT_LIB_DIR}")
|
||||
endif (WIN_KIT_ROOT_DIR AND WIN_KIT_LIB_DIR)
|
||||
endif (DIRECTX_ROOT_DIR)
|
||||
|
||||
if (DIRECTX_INCLUDE_DIR)
|
||||
include_directories(${DIRECTX_INCLUDE_DIR})
|
||||
if (DIRECTX_FIND_QUIETLY)
|
||||
message(STATUS "Found DirectX include: ${DIRECTX_INCLUDE_DIR}")
|
||||
endif (DIRECTX_FIND_QUIETLY)
|
||||
else (DIRECTX_INCLUDE_DIR)
|
||||
message(FATAL_ERROR "Could not find DirectX SDK Include")
|
||||
endif (DIRECTX_INCLUDE_DIR)
|
||||
|
||||
if (DIRECTX_LIBRARY_DIR)
|
||||
if (DIRECTX_FIND_QUIETLY)
|
||||
message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}")
|
||||
endif (DIRECTX_FIND_QUIETLY)
|
||||
else (DIRECTX_LIBRARY_DIR)
|
||||
message(FATAL_ERROR "Could not find DirectX SDK Libraries")
|
||||
endif (DIRECTX_LIBRARY_DIR)
|
||||
|
||||
endif (WINDOWS)
|
||||
@@ -1,45 +0,0 @@
|
||||
# This script drives download of prebuilt packages during the build.
|
||||
# The top-level CMakeLists.txt configures packages and tool locations.
|
||||
set(packages "@PREBUILT_PACKAGES@")
|
||||
set(python "@PYTHON_EXECUTABLE@")
|
||||
set(install_dir "@CMAKE_BINARY_DIR@/packages")
|
||||
set(scp "@SCP_EXECUTABLE@")
|
||||
set(scripts_dir "@SCRIPTS_DIR@")
|
||||
set(sentinel_dir "@CMAKE_BINARY_DIR@/prepare")
|
||||
set(prebuilt_type "@PREBUILT_TYPE@")
|
||||
|
||||
# In proprietary mode we use scp for download.
|
||||
set(proprietary "@INSTALL_PROPRIETARY@")
|
||||
if(proprietary)
|
||||
set(scp_option "--scp=${scp}")
|
||||
set(proprietary_message " proprietary")
|
||||
endif(proprietary)
|
||||
|
||||
foreach(package ${packages})
|
||||
if(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
||||
# This package is missing or out of date.
|
||||
message(STATUS "Obtaining${proprietary_message} prebuilt '${package}'")
|
||||
execute_process(
|
||||
COMMAND ${python} install.py -p${prebuilt_type} --install-dir=${install_dir} --installed-manifest=${install_dir}/installed.xml ${scp_option} ${package}
|
||||
WORKING_DIRECTORY ${scripts_dir}
|
||||
RESULT_VARIABLE result
|
||||
)
|
||||
if(result STREQUAL 0)
|
||||
# Write a sentinel to avoid attempting a download again.
|
||||
file(WRITE ${sentinel_dir}/${package}_installed "Obtained '${package}'")
|
||||
else(result STREQUAL 0)
|
||||
# Remove the sentinel to ensure a download is attempted again.
|
||||
file(REMOVE ${sentinel_dir}/prebuilt
|
||||
${sentinel_dir}/${package}_installed)
|
||||
message(FATAL_ERROR
|
||||
"Failed to download or unpack prebuilt '${package}'. "
|
||||
"Process returned: ${result}")
|
||||
endif(result STREQUAL 0)
|
||||
else(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
||||
# This package is ready.
|
||||
message(STATUS "Prebuilt '${package}' is up-to-date")
|
||||
endif(${install_dir}/install.xml IS_NEWER_THAN ${sentinel_dir}/${package}_installed)
|
||||
endforeach(package)
|
||||
|
||||
# Store a sentinel to avoid running this script unnecessarily.
|
||||
file(WRITE ${sentinel_dir}/prebuilt "All prebuilts obtained successfully\n")
|
||||
@@ -9,16 +9,9 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(expat)
|
||||
if (WINDOWS)
|
||||
if (MSVC12)
|
||||
set(EXPAT_LIBRARIES expat)
|
||||
else (MSVC12)
|
||||
set(EXPAT_LIBRARIES libexpatMT)
|
||||
endif (MSVC12)
|
||||
set(EXPAT_LIBRARIES expat)
|
||||
else (WINDOWS)
|
||||
set(EXPAT_LIBRARIES expat)
|
||||
endif (WINDOWS)
|
||||
set(EXPAT_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE)
|
||||
|
||||
43
indra/cmake/FindAutobuild.cmake
Normal file
43
indra/cmake/FindAutobuild.cmake
Normal file
@@ -0,0 +1,43 @@
|
||||
# -*- cmake -*-
|
||||
#
|
||||
# Find the autobuild tool
|
||||
#
|
||||
# Output variables:
|
||||
#
|
||||
# AUTOBUILD_EXECUTABLE - path to autobuild executable
|
||||
|
||||
|
||||
|
||||
IF (NOT AUTOBUILD_EXECUTABLE)
|
||||
|
||||
# If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var
|
||||
IF (DEFINED ENV{AUTOBUILD})
|
||||
SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD})
|
||||
ELSE (DEFINED ENV{AUTOBUILD})
|
||||
IF(WIN32)
|
||||
SET(AUTOBUILD_EXE_NAMES autobuild.exe autobuild.cmd)
|
||||
ELSE(WIN32)
|
||||
SET(AUTOBUILD_EXE_NAMES autobuild)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(AUTOBUILD_EXECUTABLE)
|
||||
FIND_PROGRAM(
|
||||
AUTOBUILD_EXECUTABLE
|
||||
NAMES ${AUTOBUILD_EXE_NAMES}
|
||||
PATHS
|
||||
ENV PATH
|
||||
${CMAKE_SOURCE_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/../..
|
||||
${CMAKE_SOURCE_DIR}/../../..
|
||||
PATH_SUFFIXES "/autobuild/bin/"
|
||||
)
|
||||
ENDIF (DEFINED ENV{AUTOBUILD})
|
||||
|
||||
IF (NOT AUTOBUILD_EXECUTABLE)
|
||||
IF (AUTOBUILD_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find autobuild executable")
|
||||
ENDIF (AUTOBUILD_FIND_REQUIRED)
|
||||
ENDIF (NOT AUTOBUILD_EXECUTABLE)
|
||||
|
||||
MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
|
||||
ENDIF (NOT AUTOBUILD_EXECUTABLE)
|
||||
@@ -7,18 +7,7 @@ if (STANDALONE)
|
||||
pkg_check_modules(FREETYPE REQUIRED freetype2)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(freetype)
|
||||
if(MSVC12)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include/freetype2
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/freetype2
|
||||
)
|
||||
else(MSVC12)
|
||||
set(FREETYPE_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
endif (MSVC12)
|
||||
|
||||
set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype2)
|
||||
set(FREETYPE_LIBRARIES freetype)
|
||||
endif (STANDALONE)
|
||||
|
||||
|
||||
@@ -7,10 +7,8 @@ set(GLOD_FIND_REQUIRED ON)
|
||||
if (STANDALONE)
|
||||
include(FindGLOD)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(GLOD)
|
||||
set(GLOD_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(GLOD_LIBRARIES glod)
|
||||
use_prebuilt_binary(glod)
|
||||
|
||||
set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
|
||||
set(GLOD_LIBRARIES GLOD)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -4,16 +4,12 @@ include(Prebuilt)
|
||||
if (STANDALONE)
|
||||
include(FindHunSpell)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(hunspell)
|
||||
|
||||
set(HUNSPELL_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/include/hunspell
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/hunspell
|
||||
)
|
||||
use_prebuilt_binary(libhunspell)
|
||||
|
||||
if (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY hunspell-1.3)
|
||||
else (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY libhunspell)
|
||||
endif (LINUX OR DARWIN)
|
||||
if (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY hunspell-1.3)
|
||||
else (LINUX OR DARWIN)
|
||||
set(HUNSPELL_LIBRARY libhunspell)
|
||||
endif (LINUX OR DARWIN)
|
||||
set(HUNSPELL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/hunspell )
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -19,8 +19,5 @@ else (STANDALONE)
|
||||
elseif (WINDOWS)
|
||||
set(JPEG_LIBRARIES jpeglib)
|
||||
endif (LINUX)
|
||||
set(JPEG_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -10,22 +10,13 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(jsoncpp)
|
||||
if (WINDOWS)
|
||||
if(MSVC12)
|
||||
set(JSONCPP_LIBRARIES
|
||||
debug json_vc${MSVC_SUFFIX}debug_libmt.lib
|
||||
optimized json_vc${MSVC_SUFFIX}_libmt)
|
||||
else(MSVC12)
|
||||
set(JSONCPP_LIBRARIES
|
||||
debug json_vc${MSVC_SUFFIX}d
|
||||
optimized json_vc${MSVC_SUFFIX})
|
||||
endif(MSVC12)
|
||||
set(JSONCPP_LIBRARIES
|
||||
debug jsoncppd.lib
|
||||
optimized jsoncpp.lib)
|
||||
elseif (DARWIN)
|
||||
set(JSONCPP_LIBRARIES json_linux-gcc-4.0.1_libmt)
|
||||
elseif (LINUX)
|
||||
set(JSONCPP_LIBRARIES jsoncpp)
|
||||
endif (WINDOWS)
|
||||
set(JSONCPP_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/include/jsoncpp
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/jsoncpp
|
||||
)
|
||||
set(JSONCPP_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/jsoncpp)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
include(Audio)
|
||||
include(OPENAL)
|
||||
|
||||
set(LLAUDIO_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llaudio
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
# these should be moved to their own cmake file
|
||||
include(Prebuilt)
|
||||
include(Boost)
|
||||
include(Colladadom)
|
||||
|
||||
|
||||
use_prebuilt_binary(libxml2)
|
||||
|
||||
set(LLPRIMITIVE_INCLUDE_DIRS
|
||||
${LIBS_OPEN_DIR}/llprimitive
|
||||
${COLLADADOM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if (WINDOWS)
|
||||
set(LLPRIMITIVE_LIBRARIES
|
||||
debug llprimitive
|
||||
optimized llprimitive
|
||||
${COLLADADOM_LIBRARIES}
|
||||
)
|
||||
set(LLPRIMITIVE_LIBRARIES
|
||||
llprimitive
|
||||
${COLLADADOM_LIBRARIES}
|
||||
libxml2_a
|
||||
${BOOST_SYSTEM_LIBRARIES}
|
||||
)
|
||||
else (WINDOWS)
|
||||
set(LLPRIMITIVE_LIBRARIES
|
||||
llprimitive
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
# ll_deploy_sharedlibs_command
|
||||
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
||||
macro(ll_deploy_sharedlibs_command target_exe)
|
||||
SET(OUTPUT_PATH $<TARGET_FILE:${target_exe}>)
|
||||
|
||||
set(OUTPUT_PATH $<TARGET_FILE_DIR:${target_exe}>)
|
||||
|
||||
if(DARWIN)
|
||||
SET_TEST_PATH(SEARCH_DIRS)
|
||||
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
|
||||
if(IS_BUNDLE)
|
||||
# If its a bundle the exe is not in the target location, this should find it.
|
||||
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
|
||||
endif(IS_BUNDLE)
|
||||
elseif(WINDOWS)
|
||||
@@ -38,8 +37,7 @@ macro(ll_stage_sharedlib DSO_TARGET)
|
||||
# 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)
|
||||
|
||||
SET(DSO_PATH $<TARGET_FILE:${DSO_TARGET}>)
|
||||
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)
|
||||
|
||||
@@ -1,42 +1,50 @@
|
||||
# -*- cmake -*-
|
||||
|
||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||
|
||||
include(Variables)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
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)
|
||||
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)
|
||||
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||
endif(CMAKE_BUILD_TYPE)
|
||||
# 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
|
||||
# the 'release' directory (as a default fallback).
|
||||
# *NOTE - we have to take special care to use CMAKE_CFG_INTDIR on IDE generators (like mac and
|
||||
# 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(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
# 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(ARCH_PREBUILT_LINK_DIRS
|
||||
${LIBS_PREBUILT_DIR}/lib
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/lib
|
||||
)
|
||||
else(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
# else block is for linux and any other makefile based generators
|
||||
set(ARCH_PREBUILT_LINK_DIRS
|
||||
${LIBS_PREBUILT_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER}
|
||||
)
|
||||
endif(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode")
|
||||
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
# 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})
|
||||
endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
|
||||
if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
|
||||
# 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 ARCH_PREBUILT_LINK_DIRS
|
||||
${LIBS_PREBUILT_DIR}/lib/release
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/lib/release
|
||||
)
|
||||
endif (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release")
|
||||
endif (NOT STANDALONE)
|
||||
|
||||
link_directories(${ARCH_PREBUILT_LINK_DIRS})
|
||||
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
|
||||
|
||||
if (LINUX)
|
||||
set(DL_LIBRARY dl)
|
||||
@@ -46,10 +54,11 @@ else (LINUX)
|
||||
set(PTHREAD_LIBRARY "")
|
||||
endif (LINUX)
|
||||
|
||||
if (WINDOWS)
|
||||
if (WINDOWS)
|
||||
set(WINDOWS_LIBRARIES
|
||||
advapi32
|
||||
shell32
|
||||
ole32
|
||||
ws2_32
|
||||
mswsock
|
||||
psapi
|
||||
|
||||
@@ -7,7 +7,11 @@ if (STANDALONE)
|
||||
message(STATUS "Building without N-DoF joystick support")
|
||||
endif(NOT NDOF_FOUND)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(ndofdev)
|
||||
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)
|
||||
@@ -15,10 +19,7 @@ else (STANDALONE)
|
||||
set(NDOF_LIBRARY ndofdev)
|
||||
endif (WINDOWS)
|
||||
|
||||
set(NDOF_INCLUDE_DIR
|
||||
${LIBS_PREBUILT_DIR}/include/ndofdev
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include/ndofdev
|
||||
)
|
||||
set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev)
|
||||
set(NDOF_FOUND 1)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -26,6 +27,8 @@ 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)
|
||||
|
||||
|
||||
@@ -7,16 +7,13 @@ set(OpenSSL_FIND_REQUIRED ON)
|
||||
if (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||
include(FindOpenSSL)
|
||||
else (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||
use_prebuilt_binary(openSSL)
|
||||
use_prebuilt_binary(openssl)
|
||||
if (WINDOWS)
|
||||
set(OPENSSL_LIBRARIES ssleay32 libeay32)
|
||||
else (WINDOWS)
|
||||
set(OPENSSL_LIBRARIES ssl)
|
||||
endif (WINDOWS)
|
||||
set(OPENSSL_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
|
||||
endif (STANDALONE OR USE_SYSTEM_OPENSSL)
|
||||
|
||||
if (LINUX)
|
||||
|
||||
@@ -9,11 +9,7 @@ if (STANDALONE)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(libpng)
|
||||
if (WINDOWS)
|
||||
if(MSVC12)
|
||||
set(PNG_LIBRARIES libpng16)
|
||||
else(MSVC12)
|
||||
set(PNG_LIBRARIES libpng15)
|
||||
endif(MSVC12)
|
||||
set(PNG_LIBRARIES libpng16)
|
||||
elseif(DARWIN)
|
||||
set(PNG_LIBRARIES png15)
|
||||
else(LINUX)
|
||||
|
||||
@@ -3,14 +3,64 @@
|
||||
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
|
||||
|
||||
include(FindAutobuild)
|
||||
include(Variables)
|
||||
if(INSTALL_PROPRIETARY)
|
||||
include(FindSCP)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
set(PREBUILD_TRACKING_DIR ${AUTOBUILD_INSTALL_DIR}/cmake_tracking)
|
||||
# For the library installation process;
|
||||
# see cmake/Prebuild.cmake for the counterpart code.
|
||||
if ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed")
|
||||
file(MAKE_DIRECTORY ${PREBUILD_TRACKING_DIR})
|
||||
file(WRITE ${PREBUILD_TRACKING_DIR}/sentinel_installed "0")
|
||||
endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed")
|
||||
|
||||
# The use_prebuilt_binary macro handles automated installation of package
|
||||
# dependencies using autobuild. The goal is that 'autobuild install' should
|
||||
# only be run when we know we need to install a new package. This should be
|
||||
# the case in a clean checkout, or if autobuild.xml has been updated since the
|
||||
# last run (encapsulated by the file ${PREBUILD_TRACKING_DIR}/sentinel_installed),
|
||||
# or if a previous attempt to install the package has failed (the exit status
|
||||
# of previous attempts is serialized in the file
|
||||
# ${PREBUILD_TRACKING_DIR}/${_binary}_installed)
|
||||
macro (use_prebuilt_binary _binary)
|
||||
if(NOT STANDALONE)
|
||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
||||
list(FIND PREBUILT_PACKAGES ${_binary} _index)
|
||||
if(_index LESS 0)
|
||||
set_property(TARGET prepare APPEND PROPERTY PREBUILT ${_binary})
|
||||
endif(_index LESS 0)
|
||||
endif(NOT STANDALONE)
|
||||
if (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||
set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS})
|
||||
endif (NOT DEFINED USESYSTEMLIBS_${_binary})
|
||||
|
||||
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)
|
||||
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("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}
|
||||
-p ${AUTOBUILD_PLATFORM_NAME}
|
||||
${_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}.")
|
||||
endif (NOT ${_binary}_installed EQUAL 0)
|
||||
endif (NOT USESYSTEMLIBS_${_binary})
|
||||
endmacro (use_prebuilt_binary _binary)
|
||||
|
||||
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
|
||||
|
||||
@@ -8,7 +8,7 @@ macro (check_message_template _target)
|
||||
PRE_LINK
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
ARGS ${SCRIPTS_DIR}/template_verifier.py
|
||||
--mode=development --cache_master
|
||||
COMMENT "Verifying message template"
|
||||
--mode=development --cache_master --master_url=${TEMPLATE_VERIFIER_MASTER_URL} ${TEMPLATE_VERIFIER_OPTIONS}
|
||||
COMMENT "Verifying message template - See http://wiki.secondlife.com/wiki/Template_verifier.py"
|
||||
)
|
||||
endmacro (check_message_template)
|
||||
|
||||
@@ -23,26 +23,59 @@ set(LIBS_CLOSED_PREFIX)
|
||||
set(LIBS_OPEN_PREFIX)
|
||||
set(SCRIPTS_PREFIX ../scripts)
|
||||
set(VIEWER_PREFIX)
|
||||
set(INTEGRATION_TESTS_PREFIX)
|
||||
|
||||
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
|
||||
set(LIBS_OPEN_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
|
||||
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
||||
set(DISABLE_TCMALLOC OFF CACHE BOOL "Disable linkage of TCMalloc. (64bit builds automatically disable TCMalloc)")
|
||||
set(LL_TESTS OFF CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation)")
|
||||
set(DISABLE_FATAL_WARNINGS TRUE CACHE BOOL "Set this to FALSE to enable fatal warnings.")
|
||||
|
||||
if(LIBS_CLOSED_DIR)
|
||||
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
|
||||
else(LIBS_CLOSED_DIR)
|
||||
set(LIBS_CLOSED_DIR ${CMAKE_SOURCE_DIR}/${LIBS_CLOSED_PREFIX})
|
||||
endif(LIBS_CLOSED_DIR)
|
||||
if(LIBS_COMMON_DIR)
|
||||
file(TO_CMAKE_PATH "${LIBS_COMMON_DIR}" LIBS_COMMON_DIR)
|
||||
else(LIBS_COMMON_DIR)
|
||||
set(LIBS_COMMON_DIR ${CMAKE_SOURCE_DIR}/${LIBS_OPEN_PREFIX})
|
||||
endif(LIBS_COMMON_DIR)
|
||||
set(LIBS_OPEN_DIR ${LIBS_COMMON_DIR})
|
||||
|
||||
set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX})
|
||||
set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX})
|
||||
|
||||
set(AUTOBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/packages)
|
||||
|
||||
set(LIBS_PREBUILT_DIR ${AUTOBUILD_INSTALL_DIR} CACHE PATH
|
||||
"Location of prebuilt libraries.")
|
||||
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||
# We use this as a marker that you can try to use the proprietary libraries.
|
||||
set(INSTALL_PROPRIETARY ON CACHE BOOL "Install proprietary binaries")
|
||||
endif (EXISTS ${CMAKE_SOURCE_DIR}/Server.cmake)
|
||||
set(TEMPLATE_VERIFIER_OPTIONS "" CACHE STRING "Options for scripts/template_verifier.py")
|
||||
set(TEMPLATE_VERIFIER_MASTER_URL "http://bitbucket.org/lindenlab/master-message-template/raw/tip/message_template.msg" CACHE STRING "Location of the master message template")
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
||||
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
|
||||
endif (NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(WINDOWS ON BOOL FORCE)
|
||||
if (WORD_SIZE EQUAL 32)
|
||||
set(ARCH i686)
|
||||
if (WORD_SIZE EQUAL 64)
|
||||
set(ARCH x86_64 CACHE STRING "Viewer Architecture")
|
||||
set(LL_ARCH ${ARCH}_win64)
|
||||
set(LL_ARCH_DIR ${ARCH}-win64)
|
||||
set(WORD_SIZE 64)
|
||||
set(AUTOBUILD_PLATFORM_NAME "windows64")
|
||||
else (WORD_SIZE EQUAL 64)
|
||||
set(ARCH i686 CACHE STRING "Viewer Architecture")
|
||||
set(LL_ARCH ${ARCH}_win32)
|
||||
set(LL_ARCH_DIR ${ARCH}-win32)
|
||||
elseif (WORD_SIZE EQUAL 64)
|
||||
set(ARCH x86_64)
|
||||
set(LL_ARCH ${ARCH}_win)
|
||||
set(LL_ARCH_DIR ${ARCH}-win)
|
||||
endif (WORD_SIZE EQUAL 32)
|
||||
set(WORD_SIZE 32)
|
||||
set(AUTOBUILD_PLATFORM_NAME "windows")
|
||||
endif (WORD_SIZE EQUAL 64)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
@@ -98,25 +131,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
COMMAND sh -c "xcodebuild -version | grep Xcode | cut -d ' ' -f2 | cut -d'.' -f1-2"
|
||||
OUTPUT_VARIABLE XCODE_VERSION )
|
||||
string(REGEX REPLACE "(\r?\n)+$" "" XCODE_VERSION "${XCODE_VERSION}")
|
||||
|
||||
# # To support a different SDK update these Xcode settings:
|
||||
# if (XCODE_VERSION GREATER 4.9) # (Which would be 5.0+)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.9)
|
||||
# else (XCODE_VERION GREATER 4.9)
|
||||
# if (XCODE_VERSION GREATER 4.5)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.8)
|
||||
# else (XCODE_VERSION GREATER 4.5)
|
||||
# if (XCODE_VERSION GREATER 4.2)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
||||
# else (XCODE_VERSION GREATER 4.2)
|
||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
||||
# set(CMAKE_OSX_SYSROOT macosx10.7)
|
||||
# endif (XCODE_VERSION GREATER 4.2)
|
||||
# endif (XCODE_VERSION GREATER 4.5)
|
||||
# endif (XCODE_VERSION GREATER 4.9)
|
||||
|
||||
# Hardcode SDK we build against until we can test and allow newer ones
|
||||
# as autodetected in the code above
|
||||
@@ -151,28 +165,11 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(LL_ARCH_DIR universal-darwin)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
|
||||
set(LIBS_PREBUILT_DIR ${CMAKE_BINARY_DIR}/packages CACHE PATH
|
||||
"Location of prebuilt libraries.")
|
||||
|
||||
set(LIBS_PREBUILT_LEGACY_DIR ${CMAKE_BINARY_DIR}/packages/libraries/${LL_ARCH_DIR} CACHE PATH
|
||||
"Legacy location of prebuilt libraries.")
|
||||
|
||||
if (WINDOWS AND WORD_SIZE EQUAL 32)
|
||||
set(PREBUILT_TYPE windows)
|
||||
elseif (WINDOWS AND WORD_SIZE EQUAL 64)
|
||||
set(PREBUILT_TYPE windows64)
|
||||
elseif(DARWIN)
|
||||
set(PREBUILT_TYPE darwin)
|
||||
elseif(LINUX AND WORD_SIZE EQUAL 32)
|
||||
set(PREBUILT_TYPE linux)
|
||||
elseif(LINUX AND WORD_SIZE EQUAL 64)
|
||||
set(PREBUILT_TYPE linux64)
|
||||
endif(WINDOWS AND WORD_SIZE EQUAL 32)
|
||||
|
||||
# Default deploy grid
|
||||
set(GRID agni CACHE STRING "Target Grid")
|
||||
|
||||
set(VIEWER_CHANNEL "Singularity" CACHE STRING "Viewer Channel Name")
|
||||
|
||||
set(VIEWER_LOGIN_CHANNEL "${VIEWER_CHANNEL}" CACHE STRING "Fake login channel for A/B Testing")
|
||||
set(VIEWER_BRANDING_ID "singularity" CACHE STRING "Viewer branding id (currently secondlife|snowglobe)")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
include(Prebuilt)
|
||||
|
||||
if (NOT STANDALONE)
|
||||
use_prebuilt_binary(vivox)
|
||||
use_prebuilt_binary(slvoice)
|
||||
if(LINUX)
|
||||
use_prebuilt_binary(libuuid)
|
||||
if (${ARCH} STREQUAL "x86_64")
|
||||
|
||||
@@ -8,9 +8,13 @@ if (STANDALONE)
|
||||
include(FindXmlRpcEpi)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(xmlrpc-epi)
|
||||
set(XMLRPCEPI_LIBRARIES xmlrpc-epi)
|
||||
set(XMLRPCEPI_INCLUDE_DIRS
|
||||
${LIBS_PREBUILT_DIR}/include
|
||||
${LIBS_PREBUILT_LEGACY_DIR}/include
|
||||
)
|
||||
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 (STANDALONE)
|
||||
|
||||
@@ -1,30 +1,24 @@
|
||||
/**
|
||||
* @file cmake_dummy.cpp
|
||||
*
|
||||
* $LicenseInfo:firstyear=2008&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2008-2009, Linden Research, Inc.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2008&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user