diff options
Diffstat (limited to 'indra/cmake')
28 files changed, 414 insertions, 130 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 452fd5f356..b969084632 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -2,6 +2,9 @@ # # Compilation options shared by all Second Life components. +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + include(Variables) # Portable compilation flags. @@ -150,25 +153,6 @@ if (LINUX) -pthread ) - if (SERVER) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-60") - if (EXISTS /etc/debian_version) - FILE(READ /etc/debian_version DEBIAN_VERSION) - else (EXISTS /etc/debian_version) - set(DEBIAN_VERSION "") - endif (EXISTS /etc/debian_version) - - if (NOT DEBIAN_VERSION STREQUAL "3.1") - add_definitions(-DCTYPE_WORKAROUND) - endif (NOT DEBIAN_VERSION STREQUAL "3.1") - - if (EXISTS /usr/lib/mysql4/mysql) - link_directories(/usr/lib/mysql4/mysql) - endif (EXISTS /usr/lib/mysql4/mysql) - - endif (SERVER) - - if (VIEWER) add_definitions(-DAPPID=secondlife) add_definitions(-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. @@ -184,7 +168,6 @@ if (LINUX) # linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") endif (NOT STANDALONE) - endif (VIEWER) set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}") @@ -198,7 +181,7 @@ if (DARWIN) # ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ). # As a workaround, define _XOPEN_SOURCE before including ucontext.h. add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE) - set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") + set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") set(DARWIN_extra_cstar_flags "-mlong-branch -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") @@ -254,6 +237,4 @@ else (STANDALONE) ) endif (STANDALONE) -if(SERVER) - include_directories(${LIBS_PREBUILT_DIR}/include/havok) -endif(SERVER) +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index daafa00fe2..a87027f5f6 100644 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -49,9 +49,7 @@ else (STANDALONE) set(APR_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/apr-1) if (LINUX) - if (VIEWER) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid) - endif (VIEWER) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt) endif (LINUX) endif (STANDALONE) diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 569034a6fb..10a23ea068 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -14,48 +14,66 @@ set(cmake_SOURCE_FILES Boost.cmake BuildVersion.cmake CARes.cmake - CURL.cmake CMakeCopyIfDifferent.cmake + ConfigurePkgConfig.cmake + CURL.cmake Copy3rdPartyLibs.cmake - CSharpMacros.cmake DBusGlib.cmake + DeploySharedLibs.cmake DirectX.cmake + DragDrop.cmake EXPAT.cmake + ExamplePlugin.cmake FindAPR.cmake + FindAutobuild.cmake FindBerkeleyDB.cmake FindCARes.cmake - FindELFIO.cmake - FindFMOD.cmake + FindFMODEX.cmake + FindGLH.cmake + FindGoogleBreakpad.cmake FindGooglePerfTools.cmake - FindMono.cmake - FindMySQL.cmake + FindHUNSPELL.cmake + FindJsonCpp.cmake + FindNDOF.cmake FindOpenJPEG.cmake + FindSCP.cmake FindXmlRpcEpi.cmake FindZLIB.cmake - FMOD.cmake + FMODEX.cmake FreeType.cmake + GLEXT.cmake + GLH.cmake GLOD.cmake GStreamer010Plugin.cmake + GetPrerequisites_2_8.cmake + Glui.cmake + Glut.cmake + GoogleBreakpad.cmake + GoogleMock.cmake GooglePerfTools.cmake + Havok.cmake Hunspell.cmake JPEG.cmake + JsonCpp.cmake LLAddBuildTest.cmake + LLAppearance.cmake + LLAppearanceUtility.cmake LLAudio.cmake LLCharacter.cmake LLCommon.cmake LLCrashLogger.cmake - LLDatabase.cmake LLImage.cmake LLImageJ2COJ.cmake LLInventory.cmake LLKDU.cmake + LLLogin.cmake LLMath.cmake LLMessage.cmake + LLPhysicsExtensions.cmake LLPlugin.cmake LLPrimitive.cmake - LLPhysicsExtensions.cmake LLRender.cmake - LLScene.cmake + LLSharedLibs.cmake LLTestCommand.cmake LLUI.cmake LLVFS.cmake @@ -63,21 +81,26 @@ set(cmake_SOURCE_FILES LLXML.cmake LScript.cmake Linking.cmake - MonoEmbed.cmake - MySQL.cmake + MediaPluginBase.cmake NDOF.cmake OPENAL.cmake OpenGL.cmake OpenJPEG.cmake OpenSSL.cmake PNG.cmake - Python.cmake + PluginAPI.cmake Prebuilt.cmake + PulseAudio.cmake + Python.cmake + QuickTimePlugin.cmake TemplateCheck.cmake Tut.cmake UI.cmake UnixInstall.cmake Variables.cmake + ViewerMiscLibs.cmake + VisualLeakDetector.cmake + WebKitLibPlugin.cmake XmlRpcEpi.cmake ZLIB.cmake ) @@ -88,10 +111,6 @@ set(master_SOURCE_FILES ../CMakeLists.txt ) -if (SERVER) - list(APPEND master_SOURCE_FILES ../Server.cmake) -endif (SERVER) - source_group("Master Rules" FILES ${master_SOURCE_FILES}) set_source_files_properties(${cmake_SOURCE_FILES} ${master_SOURCE_FILES} diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake new file mode 100644 index 0000000000..03e19a3211 --- /dev/null +++ b/indra/cmake/ConfigurePkgConfig.cmake @@ -0,0 +1,74 @@ +# -*- cmake -*- + +SET(DEBUG_PKG_CONFIG "YES") + +# Don't change this if manually set by user. +IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") + + # Guess at architecture-specific system library paths. + if (WORD_SIZE EQUAL 32) + SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib) + SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib) + SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu) + else (WORD_SIZE EQUAL 32) + SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) + SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) + SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) + endif (WORD_SIZE EQUAL 32) + + # Use DPKG architecture, if available. + IF (${DPKG_ARCH}) + SET(PKG_CONFIG_MULTI_GUESS /usr/lib/${DPKG_ARCH}) + SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usrlocal/lib/${DPKG_ARCH}) + ENDIF (${DPKG_ARCH}) + + # Explicitly include anything listed in PKG_CONFIG_PATH + string(REPLACE ":" ";" PKG_CONFIG_PATH_LIST "$ENV{PKG_CONFIG_PATH}") + FOREACH(PKG_CONFIG_DIR ${PKG_CONFIG_PATH_LIST}) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_DIR}/pkgconfig") + ENDFOREACH(PKG_CONFIG_DIR) + + # Look for valid pkgconfig directories. + FIND_PATH(PKG_CONFIG_ENV pkgconfig ENV LD_LIBRARY_PATH) + FIND_PATH(PKG_CONFIG_MULTI pkgconfig HINT ${PKG_CONFIG_MULTI_GUESS}) + FIND_PATH(PKG_CONFIG_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_MULTI_LOCAL_GUESS}) + FIND_PATH(PKG_CONFIG_NO_MULTI pkgconfig HINT ${PKG_CONFIG_NO_MULTI_GUESS}) + FIND_PATH(PKG_CONFIG_NO_MULTI_LOCAL pkgconfig HINT ${PKG_CONFIG_NO_MULTI_LOCAL_GUESS}) + + # Add anything we found to our list. + IF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_ENV}/pkgconfig") + ENDIF(NOT PKG_CONFIG_ENV STREQUAL PKG_CONFIG_ENV-NOTFOUND) + + IF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI}/pkgconfig") + ENDIF(NOT PKG_CONFIG_MULTI STREQUAL PKG_CONFIG_MULTI-NOTFOUND) + + IF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_MULTI_LOCAL}/pkgconfig") + ENDIF(NOT PKG_CONFIG_MULTI_LOCAL STREQUAL PKG_CONFIG_MULTI_LOCAL-NOTFOUND) + + IF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI}/pkgconfig") + ENDIF(NOT PKG_CONFIG_NO_MULTI STREQUAL PKG_CONFIG_NO_MULTI-NOTFOUND) + + IF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:${PKG_CONFIG_NO_MULTI_LOCAL}/pkgconfig") + ENDIF(NOT PKG_CONFIG_NO_MULTI_LOCAL STREQUAL PKG_CONFIG_NO_MULTI_LOCAL-NOTFOUND) + + # Also add some non-architecture specific package locations. + SET(VALID_PKG_LIBDIRS "${VALID_PKG_LIBDIRS}:/usr/share/pkgconfig:/usr/local/share/pkgconfig") + + # Remove first unwanted ':' + string(SUBSTRING ${VALID_PKG_LIBDIRS} 1 0 VALID_PKG_LIBDIRS) + + # Set PKG_CONFIG_LIBDIR environment. + SET(ENV{PKG_CONFIG_LIBDIR} ${VALID_PKG_LIBDIRS}) +ENDIF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") + +IF(DEBUG_PKG_CONFIG) + MESSAGE(STATUS "Using PKG_CONFIG_LIBDIR=$ENV{PKG_CONFIG_LIBDIR}") +ENDIF(DEBUG_PKG_CONFIG) + diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 2a73900c71..a03c1a4281 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -62,10 +62,9 @@ if(WINDOWS) set(release_files ${release_files} libtcmalloc_minimal.dll) endif(USE_TCMALLOC) - if (FMOD) - set(debug_files ${debug_files} fmod.dll) - set(release_files ${release_files} fmod.dll) - endif (FMOD) + if (FMODEX) + set(release_files ${release_files} fmodex.dll) + endif (FMODEX) #******************************* # Copy MS C runtime dlls, required for packaging. @@ -265,7 +264,7 @@ elseif(LINUX) libdb-5.1.so libexpat.so libexpat.so.1 - libglod.so + libGLOD.so libgmock_main.so libgmock.so.0 libgmodule-2.0.so @@ -287,9 +286,9 @@ elseif(LINUX) set(release_files ${release_files} "libtcmalloc_minimal.so") endif (USE_TCMALLOC) - if (FMOD) - set(release_files ${release_files} "libfmod-3.75.so") - endif (FMOD) + if (FMODEX) + set(release_file ${release_files} "libfmodex.so") + endif (FMODEX) else(WINDOWS) message(STATUS "WARNING: unrecognized platform for staging 3rd party libs, skipping...") @@ -304,8 +303,6 @@ else(WINDOWS) set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-linux/lib/release") set(release_files "") - set(fmod_files "") - set(debug_llkdu_src "") set(debug_llkdu_dst "") set(release_llkdu_src "") diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake index b2a18805d4..25163d0322 100644 --- a/indra/cmake/DirectX.cmake +++ b/indra/cmake/DirectX.cmake @@ -1,8 +1,9 @@ # -*- cmake -*- -if (VIEWER AND WINDOWS) +if (WINDOWS) find_path(DIRECTX_INCLUDE_DIR dxdiag.h "$ENV{DXSDK_DIR}/Include" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" @@ -25,6 +26,7 @@ if (VIEWER AND WINDOWS) find_path(DIRECTX_LIBRARY_DIR dxguid.lib "$ENV{DXSDK_DIR}/Lib/x86" + "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86" "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86" @@ -43,4 +45,4 @@ if (VIEWER AND WINDOWS) message(FATAL_ERROR "Could not find DirectX SDK Libraries") endif (DIRECTX_LIBRARY_DIR) -endif (VIEWER AND WINDOWS) +endif (WINDOWS) diff --git a/indra/cmake/DragDrop.cmake b/indra/cmake/DragDrop.cmake index c0424396e5..73ef59b18f 100644 --- a/indra/cmake/DragDrop.cmake +++ b/indra/cmake/DragDrop.cmake @@ -1,7 +1,5 @@ # -*- cmake -*- -if (VIEWER) - set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off") if (OS_DRAG_DROP) @@ -20,4 +18,3 @@ if (VIEWER) endif (OS_DRAG_DROP) -endif (VIEWER) diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake new file mode 100644 index 0000000000..65bc1cabeb --- /dev/null +++ b/indra/cmake/FMODEX.cmake @@ -0,0 +1,46 @@ +# -*- cmake -*- + +# FMOD can be set when launching the make using the argument -DFMOD:BOOL=ON +# When building using proprietary binaries though (i.e. having access to LL private servers), +# we always build with FMODEX. +# Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMOD, whether +# they are using STANDALONE or not. +if (INSTALL_PROPRIETARY) + set(FMODEX ON CACHE BOOL "Using FMOD Ex sound library.") +endif (INSTALL_PROPRIETARY) + +if (FMODEX) + if (STANDALONE) + # In that case, we use the version of the library installed on the system + set(FMODEX_FIND_REQUIRED ON) + include(FindFMODEX) + else (STANDALONE) + if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) + # If the path have been specified in the arguments, use that + set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) + MESSAGE(STATUS "Using FMODEX path: ${FMODEX_LIBRARIES}, ${FMODEX_INCLUDE_DIR}") + else (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) + # If not, we're going to try to get the package listed in autobuild.xml + # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL) + # as accessing the private LL location will fail if you don't have the credential + include(Prebuilt) + use_prebuilt_binary(fmodex) + if (WINDOWS) + set(FMODEX_LIBRARY + debug fmodexL_vc + optimized fmodex_vc) + elseif (DARWIN) + set(FMODEX_LIBRARY + debug fmodexL + optimized fmodex) + elseif (LINUX) + set(FMODEX_LIBRARY + debug fmodexL + optimized fmodex) + endif (WINDOWS) + set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) + set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex) + endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) + endif (STANDALONE) +endif (FMODEX) + diff --git a/indra/cmake/FindFMODEX.cmake b/indra/cmake/FindFMODEX.cmake new file mode 100644 index 0000000000..b621727c0e --- /dev/null +++ b/indra/cmake/FindFMODEX.cmake @@ -0,0 +1,65 @@ +# -*- cmake -*- + +# - Find FMODEX +# Find the FMODEX includes and library +# This module defines +# FMODEX_INCLUDE_DIR, where to find fmod.h and fmod_errors.h +# FMODEX_LIBRARIES, the libraries needed to use FMODEX. +# FMODEX, If false, do not try to use FMODEX. +# also defined, but not for general use are +# FMODEX_LIBRARY, where to find the FMODEX library. + +FIND_PATH(FMODEX_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod) + +SET(FMODEX_NAMES ${FMODEX_NAMES} fmodex fmodvc fmodexL_vc) +FIND_LIBRARY(FMODEX_LIBRARY + NAMES ${FMODEX_NAMES} + PATH_SUFFIXES fmodex + ) + +IF (FMODEX_SDK_DIR OR WINDOWS) + if(WINDOWS) + set(FMODEX_SDK_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows" CACHE PATH "Path to FMODEX") + STRING(REGEX REPLACE "\\\\" "/" FMODEX_SDK_DIR ${FMODEX_SDK_DIR}) + endif(WINDOWS) + find_library(FMODEX_LIBRARY + fmodex_vc fmodexL_vc + PATHS + ${FMODEX_SDK_DIR}/api/lib + ${FMODEX_SDK_DIR}/api + ${FMODEX_SDK_DIR} + ) + find_path(FMODEX_INCLUDE_DIR fmod.h + ${FMODEX_SDK_DIR}/api/inc + ${FMODEX_SDK_DIR}/api + ${FMODEX_SDK_DIR} + ) + find_path(FMODEX_INCLUDE_DIR fmod.h + ${FMODEX_SDK_DIR}/api/inc + ${FMODEX_SDK_DIR}/api + ${FMODEX_SDK_DIR} + ) + IF (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) + SET(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) + SET(FMODEX_FOUND "YES") + endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) +ENDIF (FMODEX_SDK_DIR OR WINDOWS) + +IF (FMODEX_FOUND) + IF (NOT FMODEX_FIND_QUIETLY) + MESSAGE(STATUS "Found FMODEX: ${FMODEX_LIBRARIES}") + ENDIF (NOT FMODEX_FIND_QUIETLY) +ELSE (FMODEX_FOUND) + IF (FMODEX_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find FMODEX library") + ENDIF (FMODEX_FIND_REQUIRED) +ENDIF (FMODEX_FOUND) + +# Deprecated declarations. +SET (NATIVE_FMODEX_INCLUDE_PATH ${FMODEX_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_FMODEX_LIB_PATH ${FMODEX_LIBRARY} PATH) + +MARK_AS_ADVANCED( + FMODEX_LIBRARY + FMODEX_INCLUDE_DIR + ) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake new file mode 100644 index 0000000000..0a3dd976b4 --- /dev/null +++ b/indra/cmake/GLEXT.cmake @@ -0,0 +1,8 @@ +# -*- cmake -*- +include(Prebuilt) + +if (NOT STANDALONE) + use_prebuilt_binary(glext) + use_prebuilt_binary(glh_linear) + set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) +endif (NOT STANDALONE) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 77221d55ed..6bdbaf621e 100644 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -6,4 +6,4 @@ if (NOT STANDALONE) endif (NOT STANDALONE) set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -set(GLOD_LIBRARIES glod) +set(GLOD_LIBRARIES GLOD) diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index cabc00ff9a..96e22791ec 100644 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -18,8 +18,5 @@ else (STANDALONE) # yes, this does look dumb, no, it's not incorrect # set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") - # yes, this does look dumb, no, it's not incorrect - # - set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") endif (STANDALONE) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 73b3642ae6..f3fd008e49 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -10,7 +10,7 @@ if (STANDALONE) else (STANDALONE) if (WINDOWS) if (USE_TCMALLOC) - use_prebuilt_binary(tcmalloc) + use_prebuilt_binary(gperftools) set(TCMALLOC_LIBRARIES debug libtcmalloc_minimal-debug optimized libtcmalloc_minimal) @@ -23,7 +23,7 @@ else (STANDALONE) endif (WINDOWS) if (LINUX) if (USE_TCMALLOC) - use_prebuilt_binary(tcmalloc) + use_prebuilt_binary(gperftools) set(TCMALLOC_LIBRARIES tcmalloc) else (USE_TCMALLOC) diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 5c0768abfa..8b7f01d20b 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -1,6 +1,10 @@ # -*- cmake -*- +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + use_prebuilt_binary(havok-source) + set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source) list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo) @@ -45,31 +49,80 @@ unset(HK_DEBUG_LIBRARIES) unset(HK_RELEASE_LIBRARIES) unset(HK_RELWITHDEBINFO_LIBRARIES) +# *TODO: Figure out why we need to extract like this... foreach(HAVOK_LIB ${HAVOK_LIBS}) find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH}) find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}) if(LINUX) - set(cmd "mkdir") set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}") set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}") set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}") + # Try to avoid extracting havok library each time we run cmake. + if("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted") + file(READ ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted "havok_${HAVOK_LIB}_extracted") + if(DEBUG_PREBUILT) + message(STATUS "havok_${HAVOK_LIB}_extracted: \"${havok_${HAVOK_LIB}_extracted}\"") + endif(DEBUG_PREBUILT) + endif("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted") + + if(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) + if(DEBUG_PREBUILT) + MESSAGE(STATUS "Extracting ${HAVOK_LIB}...") + endif(DEBUG_PREBUILT) + set(cmd "mkdir") + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "${cmd} ${debug_dir}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv) + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "${cmd} ${release_dir}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv) + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "${cmd} ${relwithdebinfo_dir}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv) set(cmd "ar") set(arg " -xv") set(arg "${arg} ../lib${HAVOK_LIB}.a") + if(DEBUG_PREBUILT) + MESSAGE(STATUS "cd ${debug_dir} && ${cmd} ${arg}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv) + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "cd ${release_dir} && ${cmd} ${arg}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv) + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "cd ${relwithdebinfo_dir} && ${cmd} ${arg}") + endif(DEBUG_PREBUILT) exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv) + # Just assume success for now. + set(havok_${HAVOK_LIB}_extracted 0) + file(WRITE ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted "${havok_${HAVOK_LIB}_extracted}") + + endif(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) + file(GLOB extracted_debug "${debug_dir}/*.o") file(GLOB extracted_release "${release_dir}/*.o") file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o") + + if(DEBUG_PREBUILT) + MESSAGE(STATUS "extracted_debug ${debug_dir}/*.o") + MESSAGE(STATUS "extracted_release ${release_dir}/*.o") + MESSAGE(STATUS "extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o") + endif(DEBUG_PREBUILT) + list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug}) list(APPEND HK_RELEASE_LIBRARIES ${extracted_release}) list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo}) @@ -81,3 +134,4 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) endif (LINUX) endforeach(HAVOK_LIB) +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake new file mode 100644 index 0000000000..bd3795a526 --- /dev/null +++ b/indra/cmake/LLAppearance.cmake @@ -0,0 +1,17 @@ +# -*- cmake -*- + +include(Variables) + +set(LLAPPEARANCE_INCLUDE_DIRS + ${LIBS_OPEN_DIR}/llappearance + ) + +if (BUILD_HEADLESS) + set(LLAPPEARANCE_HEADLESS_LIBRARIES + llappearanceheadless + ) +endif (BUILD_HEADLESS) + +set(LLAPPEARANCE_LIBRARIES llappearance) + + diff --git a/indra/cmake/LLAppearanceUtility.cmake b/indra/cmake/LLAppearanceUtility.cmake new file mode 100644 index 0000000000..bea45543de --- /dev/null +++ b/indra/cmake/LLAppearanceUtility.cmake @@ -0,0 +1,12 @@ +# -*- cmake -*- +include(Prebuilt) + +# Linux proprietary build only +if (INSTALL_PROPRIETARY) + if(LINUX) + use_prebuilt_binary(llappearanceutility-source) + set(LLAPPEARANCEUTILITY_SRC_DIR ${LIBS_PREBUILT_DIR}/llappearanceutility/src) + set(LLAPPEARANCEUTILITY_BIN_DIR ${CMAKE_BINARY_DIR}/llappearanceutility) + endif (LINUX) +endif (INSTALL_PROPRIETARY) + diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index c254bf6f05..b52556a73e 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -10,6 +10,8 @@ set(LLCOMMON_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcommon ${APRUTIL_INCLUDE_DIR} ${APR_INCLUDE_DIR} + ) +set(LLCOMMON_SYSTEM_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index ab39cbb6be..0d87ff579a 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -2,6 +2,8 @@ # these should be moved to their own cmake file include(Prebuilt) +include(Boost) + use_prebuilt_binary(colladadom) use_prebuilt_binary(pcre) use_prebuilt_binary(libxml) @@ -15,10 +17,7 @@ if (WINDOWS) optimized llprimitive debug libcollada14dom22-d optimized libcollada14dom22 - debug libboost_filesystem-mt-gd - optimized libboost_filesystem-mt - debug libboost_system-mt-gd - optimized libboost_system-mt + ${BOOST_SYSTEM_LIBRARIES} ) else (WINDOWS) set(LLPRIMITIVE_LIBRARIES diff --git a/indra/cmake/LLRender.cmake b/indra/cmake/LLRender.cmake index 8427928151..868922451f 100644 --- a/indra/cmake/LLRender.cmake +++ b/indra/cmake/LLRender.cmake @@ -1,5 +1,6 @@ # -*- cmake -*- +include(Variables) include(FreeType) include(GLH) @@ -8,27 +9,12 @@ set(LLRENDER_INCLUDE_DIRS ${GLH_INCLUDE_DIR} ) -if (SERVER AND LINUX) - set(LLRENDER_LIBRARIES +if (BUILD_HEADLESS) + set(LLRENDER_HEADLESS_LIBRARIES llrenderheadless ) -else (SERVER AND LINUX) +endif (BUILD_HEADLESS) set(LLRENDER_LIBRARIES llrender ) -endif (SERVER AND LINUX) -# mapserver requires certain files to be copied so LL_MESA_HEADLESS can be set -# differently for different object files. -macro (copy_server_sources ) - foreach (PREFIX ${ARGV}) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp - COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp - ${CMAKE_CURRENT_BINARY_DIR}/${PREFIX}_server.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PREFIX}.cpp - ) - list(APPEND server_SOURCE_FILES ${PREFIX}_server.cpp) - endforeach (PREFIX ${_copied_SOURCES}) -endmacro (copy_server_sources _copied_SOURCES) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index b4bb9a078a..ad732ef650 100644 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -1,6 +1,7 @@ # -*- cmake -*- -include(OpenGL) +include(Variables) +include(GLEXT) include(Prebuilt) if (STANDALONE) @@ -13,17 +14,15 @@ if (STANDALONE) SDL_LIBRARY ) else (STANDALONE) - use_prebuilt_binary(mesa) - if (LINUX AND VIEWER) + if (LINUX) use_prebuilt_binary(SDL) set (SDL_FOUND TRUE) set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux) set (SDL_LIBRARY SDL directfb fusion direct) - endif (LINUX AND VIEWER) + endif (LINUX) endif (STANDALONE) if (SDL_FOUND) - add_definitions(-DLL_SDL=1) include_directories(${SDL_INCLUDE_DIR}) endif (SDL_FOUND) @@ -32,12 +31,12 @@ set(LLWINDOW_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llwindow ) -if (SERVER AND LINUX) - set(LLWINDOW_LIBRARIES +if (BUILD_HEADLESS) + set(LLWINDOW_HEADLESS_LIBRARIES llwindowheadless ) -else (SERVER AND LINUX) +endif (BUILD_HEADLESS) + set(LLWINDOW_LIBRARIES llwindow ) -endif (SERVER AND LINUX) diff --git a/indra/cmake/LLXML.cmake b/indra/cmake/LLXML.cmake index 64dfdb604f..b093c76297 100644 --- a/indra/cmake/LLXML.cmake +++ b/indra/cmake/LLXML.cmake @@ -5,8 +5,10 @@ include(EXPAT) set(LLXML_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llxml - ${Boost_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ) +set(LLXML_SYSTEM_INCLUDE_DIRS + ${Boost_INCLUDE_DIRS} + ) set(LLXML_LIBRARIES llxml) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index c3e3a80fd0..b9c9e531fc 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -1,5 +1,8 @@ # -*- cmake -*- +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + include(Variables) set(ARCH_PREBUILT_DIRS ${AUTOBUILD_INSTALL_DIR}/lib) @@ -69,3 +72,5 @@ else (WINDOWS) endif (WINDOWS) mark_as_advanced(DL_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES) + +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 0a3dd976b4..2259c99293 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -1,8 +1,12 @@ # -*- cmake -*- + +include(Variables) include(Prebuilt) -if (NOT STANDALONE) - use_prebuilt_binary(glext) - use_prebuilt_binary(glh_linear) - set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -endif (NOT STANDALONE) +if (BUILD_HEADLESS) + SET(OPENGL_glu_LIBRARY GLU) + SET(OPENGL_HEADLESS_LIBRARIES OSMesa16 dl GLU) +endif (BUILD_HEADLESS) + +include(FindOpenGL) + diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index dbb4dfc46c..ac0cbde253 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -1,5 +1,8 @@ # -*- cmake -*- +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + include(FindAutobuild) if(INSTALL_PROPRIETARY) include(FindSCP) @@ -51,3 +54,5 @@ macro (use_prebuilt_binary _binary) endif (NOT ${_binary}_installed EQUAL 0) endif (NOT STANDALONE_${_binary}) endmacro (use_prebuilt_binary _binary) + +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/Python.cmake b/indra/cmake/Python.cmake index 748c8c2bec..a81c9307fc 100644 --- a/indra/cmake/Python.cmake +++ b/indra/cmake/Python.cmake @@ -23,7 +23,7 @@ if (WINDOWS) elseif (EXISTS /etc/debian_version) # On Debian and Ubuntu, avoid Python 2.4 if possible. - find_program(PYTHON_EXECUTABLE python2.5 python2.3 python PATHS /usr/bin) + find_program(PYTHON_EXECUTABLE python PATHS /usr/bin) if (PYTHON_EXECUTABLE) set(PYTHONINTERP_FOUND ON) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 91e5258fb7..d0fd4df03a 100644 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -1,5 +1,6 @@ # -*- cmake -*- include(Prebuilt) +include(FreeType) if (STANDALONE) include(FindPkgConfig) @@ -47,6 +48,7 @@ else (STANDALONE) pangoft2-1.0 pangox-1.0 pangoxft-1.0 + ${FREETYPE_LIBRARIES} ) endif (LINUX) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 4b459f1a48..6ec621632b 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -8,24 +8,20 @@ # DARWIN - Mac OS X # LINUX - Linux # WINDOWS - Windows -# -# What to build: -# -# VIEWER - viewer and other viewer-side components -# SERVER - simulator and other server-side bits # Relative and absolute paths to subtrees. +if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) +set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") + if(NOT DEFINED COMMON_CMAKE_DIR) set(COMMON_CMAKE_DIR "${CMAKE_SOURCE_DIR}/cmake") endif(NOT DEFINED COMMON_CMAKE_DIR) set(LIBS_CLOSED_PREFIX) set(LIBS_OPEN_PREFIX) -set(LIBS_SERVER_PREFIX) set(SCRIPTS_PREFIX ../scripts) -set(SERVER_PREFIX) set(VIEWER_PREFIX) set(INTEGRATION_TESTS_PREFIX) set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation") @@ -43,9 +39,7 @@ else(LIBS_COMMON_DIR) endif(LIBS_COMMON_DIR) set(LIBS_OPEN_DIR ${LIBS_COMMON_DIR}) -set(LIBS_SERVER_DIR ${CMAKE_SOURCE_DIR}/${LIBS_SERVER_PREFIX}) set(SCRIPTS_DIR ${CMAKE_SOURCE_DIR}/${SCRIPTS_PREFIX}) -set(SERVER_DIR ${CMAKE_SOURCE_DIR}/${SERVER_PREFIX}) set(VIEWER_DIR ${CMAKE_SOURCE_DIR}/${VIEWER_PREFIX}) set(AUTOBUILD_INSTALL_DIR ${CMAKE_BINARY_DIR}/packages) @@ -79,21 +73,57 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. if (WORD_SIZE EQUAL 32) + #message(STATUS "WORD_SIZE is 32") set(ARCH i686) elseif (WORD_SIZE EQUAL 64) + #message(STATUS "WORD_SIZE is 64") set(ARCH x86_64) else (WORD_SIZE EQUAL 32) + #message(STATUS "WORD_SIZE is UNDEFINED") execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) if (ARCH STREQUAL x86_64) + #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") set(WORD_SIZE 64) else (ARCH STREQUAL x86_64) + #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") set(WORD_SIZE 32) endif (ARCH STREQUAL x86_64) endif (WORD_SIZE EQUAL 32) + if (WORD_SIZE EQUAL 32) + set(DEB_ARCHITECTURE i386) + set(FIND_LIBRARY_USE_LIB64_PATHS OFF) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) + else (WORD_SIZE EQUAL 32) + set(DEB_ARCHITECTURE amd64) + set(FIND_LIBRARY_USE_LIB64_PATHS ON) + endif (WORD_SIZE EQUAL 32) + + execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH + RESULT_VARIABLE DPKG_RESULT + OUTPUT_VARIABLE DPKG_ARCH + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) + #message (STATUS "DPKG_RESULT ${DPKG_RESULT}, DPKG_ARCH ${DPKG_ARCH}") + if (DPKG_RESULT EQUAL 0) + set(CMAKE_LIBRARY_ARCHITECTURE ${DPKG_ARCH}) + set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib/${DPKG_ARCH} /usr/local/lib/${DPKG_ARCH} ${CMAKE_SYSTEM_LIBRARY_PATH}) + endif (DPKG_RESULT EQUAL 0) + + include(ConfigurePkgConfig) + set(LL_ARCH ${ARCH}_linux) set(LL_ARCH_DIR ${ARCH}-linux) + + if (INSTALL_PROPRIETARY) + # Only turn on headless if we can find osmesa libraries. + include(FindPkgConfig) + #pkg_check_modules(OSMESA osmesa) + #if (OSMESA_FOUND) + # set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.") + #endif (OSMESA_FOUND) + endif (INSTALL_PROPRIETARY) + endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -140,7 +170,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid set(GRID agni CACHE STRING "Target Grid") -set(VIEWER ON CACHE BOOL "Build Second Life viewer.") set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name") set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing") @@ -153,21 +182,8 @@ set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") -if (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) - set(SERVER ON CACHE BOOL "Build Second Life server software.") -endif (NOT STANDALONE AND EXISTS ${CMAKE_SOURCE_DIR}/llphysics) - -if (LINUX AND SERVER AND VIEWER) - MESSAGE(FATAL_ERROR " -The indra source does not currently support building SERVER and VIEWER at the same time. -Please set one of these values to OFF in your CMake cache file. -(either by running ccmake or by editing CMakeCache.txt by hand) -For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both VIEWER and SERVER in one build environment - ") -endif (LINUX AND SERVER AND VIEWER) - - set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") source_group("CMake Rules" FILES CMakeLists.txt) +endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/VisualLeakDetector.cmake b/indra/cmake/VisualLeakDetector.cmake index d3ba554e46..6a20148b47 100644 --- a/indra/cmake/VisualLeakDetector.cmake +++ b/indra/cmake/VisualLeakDetector.cmake @@ -1,7 +1,5 @@ # -*- cmake -*- -if (VIEWER) - set(INCLUDE_VLD_CMAKE OFF CACHE BOOL "Build the Windows viewer with Visual Leak Detector turned on or off") if (INCLUDE_VLD_CMAKE) @@ -12,4 +10,3 @@ if (VIEWER) endif (INCLUDE_VLD_CMAKE) -endif (VIEWER) |