diff options
Diffstat (limited to 'indra/cmake')
26 files changed, 218 insertions, 177 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 15b827b217..0266239454 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -36,6 +36,13 @@ if (WINDOWS) # Don't build DLLs. set(BUILD_SHARED_LIBS OFF) + # for "backwards compatibility", cmake sneaks in the Zm1000 option which royally + # screws incredibuild. this hack disables it. + # for details see: http://connect.microsoft.com/VisualStudio/feedback/details/368107/clxx-fatal-error-c1027-inconsistent-values-for-ym-between-creation-and-use-of-precompiled-headers + # http://www.ogre3d.org/forums/viewtopic.php?f=2&t=60015 + # http://www.cmake.org/pipermail/cmake/2009-September/032143.html + string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1" CACHE STRING "C++ compiler debug options" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO @@ -50,16 +57,18 @@ if (WINDOWS) add_definitions( /DLL_WINDOWS=1 + /DDOM_DYNAMIC /DUNICODE /D_UNICODE /GS /TP - /W3 + /W2 /c /Zc:forScope /nologo /Oy- /Zc:wchar_t- + /arch:SSE2 ) # Are we using the crummy Visual Studio KDU build workaround? @@ -134,6 +143,8 @@ if (LINUX) -fno-strict-aliasing -fsigned-char -g + -msse2 + -mfpmath=sse -pthread ) @@ -153,10 +164,6 @@ if (LINUX) link_directories(/usr/lib/mysql4/mysql) endif (EXISTS /usr/lib/mysql4/mysql) - add_definitions( - -msse2 - -mfpmath=sse - ) endif (SERVER) if (VIEWER) @@ -164,6 +171,11 @@ if (LINUX) 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. add_definitions(-DLL_IGNORE_SIGCHLD) + if (WORD_SIZE EQUAL 32) + add_definitions(-march=pentium4) + endif (WORD_SIZE EQUAL 32) + add_definitions(-mfpmath=sse) + #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 if (NOT STANDALONE) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) @@ -203,7 +215,7 @@ if (LINUX OR DARWIN) set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") endif (NOT GCC_DISABLE_FATAL_WARNINGS) - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor") set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 89c1c3691a..279d577a27 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -34,6 +34,7 @@ set(cmake_SOURCE_FILES FindZLIB.cmake FMOD.cmake FreeType.cmake + GLOD.cmake GStreamer010Plugin.cmake GooglePerfTools.cmake JPEG.cmake @@ -41,6 +42,7 @@ set(cmake_SOURCE_FILES LLAudio.cmake LLCharacter.cmake LLCommon.cmake + LLConvexDecomposition.cmake LLCrashLogger.cmake LLDatabase.cmake LLImage.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 4698116022..394db362b1 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -39,6 +39,8 @@ if(WINDOWS) libapriconv-1.dll ssleay32.dll libeay32.dll + libcollada14dom22-d.dll + glod.dll ) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") @@ -49,6 +51,8 @@ if(WINDOWS) libapriconv-1.dll ssleay32.dll libeay32.dll + libcollada14dom22.dll + glod.dll ) if(USE_GOOGLE_PERFTOOLS) @@ -67,7 +71,7 @@ if(WINDOWS) if (MSVC80) FIND_PATH(debug_msvc8_redist_path msvcr80d.dll PATHS - ${MSVC_DEBUG_REDIST_PATH} + ${MSVC_DEBUG_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT NO_DEFAULT_PATH NO_DEFAULT_PATH @@ -92,7 +96,7 @@ if (MSVC80) FIND_PATH(release_msvc8_redist_path msvcr80.dll PATHS - ${MSVC_REDIST_PATH} + ${MSVC_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT NO_DEFAULT_PATH NO_DEFAULT_PATH @@ -127,7 +131,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_DEBUG_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC100.DebugCRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) @@ -151,7 +156,8 @@ elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 PATHS ${MSVC_REDIST_PATH} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC100.CRT - NO_DEFAULT_PATH + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 NO_DEFAULT_PATH ) @@ -205,9 +211,12 @@ elseif(DARWIN) libaprutil-1.dylib libexpat.1.5.2.dylib libexpat.dylib - libllqtwebkit.dylib + libGLOD.dylib + libllqtwebkit.dylib + libminizip.a libndofdev.dylib libexception_handler.dylib + libcollada14dom.dylib ) # fmod is statically linked on darwin @@ -243,23 +252,26 @@ elseif(LINUX) libaprutil-1.so.0 libatk-1.0.so libbreakpad_client.so.0 - libcrypto.so.0.9.8 + libcollada14dom.so + libcrypto.so.1.0.0 libdb-5.1.so libexpat.so libexpat.so.1 + libglod.so libgmock_main.so libgmock.so.0 libgmodule-2.0.so libgobject-2.0.so libgtest_main.so libgtest.so.0 + libminizip.so libopenal.so libopenjpeg.so libssl.so - libtcmalloc.so + libtcmalloc_minimal.so libuuid.so.16 libuuid.so.16.0.22 - libssl.so.0.9.8 + libssl.so.1.0.0 libfontconfig.so.1.4.4 ) diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake index cb5124812d..3586c1160a 100755..100644 --- a/indra/cmake/FMOD.cmake +++ b/indra/cmake/FMOD.cmake @@ -16,15 +16,15 @@ if (FMOD) include(FindFMOD) else (STANDALONE) if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR) - # If the path have been specified in the arguments, use that + # If the path have been specified in the arguments, use that set(FMOD_LIBRARIES ${FMOD_LIBRARY}) - MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}") + MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}") else (FMOD_LIBRARY AND FMOD_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(fmod) + # 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(fmod) if (WINDOWS) set(FMOD_LIBRARY fmod) elseif (DARWIN) diff --git a/indra/cmake/FindAutobuild.cmake b/indra/cmake/FindAutobuild.cmake index 45db2b6ed0..4b5fd484ae 100644 --- a/indra/cmake/FindAutobuild.cmake +++ b/indra/cmake/FindAutobuild.cmake @@ -21,10 +21,10 @@ IF (NOT AUTOBUILD_EXECUTABLE) AUTOBUILD_EXECUTABLE NAMES ${AUTOBUILD_EXE_NAMES} PATHS - ENV PATH - ${CMAKE_SOURCE_DIR}/.. - ${CMAKE_SOURCE_DIR}/../.. - ${CMAKE_SOURCE_DIR}/../../.. + ENV PATH + ${CMAKE_SOURCE_DIR}/.. + ${CMAKE_SOURCE_DIR}/../.. + ${CMAKE_SOURCE_DIR}/../../.. PATH_SUFFIXES "/autobuild/bin/" ) @@ -33,7 +33,7 @@ IF (NOT AUTOBUILD_EXECUTABLE) MESSAGE(STATUS "Using autobuild at: ${AUTOBUILD_EXECUTABLE}") ELSE (AUTOBUILD_EXECUTABLE) IF (AUTOBUILD_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find autobuild executable") + MESSAGE(FATAL_ERROR "Could not find autobuild executable") ENDIF (AUTOBUILD_FIND_REQUIRED) ENDIF (AUTOBUILD_EXECUTABLE) diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake index cf84b309c1..0b056ada58 100644 --- a/indra/cmake/FindJsonCpp.cmake +++ b/indra/cmake/FindJsonCpp.cmake @@ -24,8 +24,8 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER} # Try to find a library that was compiled with the same compiler version as we currently use. SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) IF (STANDALONE) - # On standalone, assume that the system installed library was compiled with the used compiler. - SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) + # On standalone, assume that the system installed library was compiled with the used compiler. + SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) ENDIF (STANDALONE) FIND_LIBRARY(JSONCPP_LIBRARY NAMES ${JSONCPP_NAMES} diff --git a/indra/cmake/FindLLQtWebkit.cmake b/indra/cmake/FindLLQtWebkit.cmake index 4bf5f5cb73..2f666d3bf0 100644 --- a/indra/cmake/FindLLQtWebkit.cmake +++ b/indra/cmake/FindLLQtWebkit.cmake @@ -35,7 +35,7 @@ find_path(LLQTWEBKIT_INCLUDE_DIR llqtwebkit.h NO_SYSTEM_ENVIRONMENT_PATH HINTS $ find_library(LLQTWEBKIT_LIBRARY NAMES llqtwebkit NO_SYSTEM_ENVIRONMENT_PATH HINTS ${LLQTWEBKIT_LIBRARY_DIRS}) -if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config. +if (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) # If pkg-config couldn't find it, pretend we don't have pkg-config. set(LLQTWEBKIT_LIBRARIES llqtwebkit) get_filename_component(LLQTWEBKIT_LIBRARY_DIRS ${LLQTWEBKIT_LIBRARY} PATH) endif (NOT PKG_CONFIG_FOUND OR NOT LLQTWEBKIT_FOUND) diff --git a/indra/cmake/FindTut.cmake b/indra/cmake/FindTut.cmake deleted file mode 100644 index c2a9f43053..0000000000 --- a/indra/cmake/FindTut.cmake +++ /dev/null @@ -1,30 +0,0 @@ -# -*- cmake -*- - -# - Find Tut -# Find the Tut unit test framework includes and library -# This module defines -# TUT_INCLUDE_DIR, where to find tut/tut.hpp. -# TUT_FOUND, If false, do not try to use Tut. - -find_path(TUT_INCLUDE_DIR tut/tut.hpp - NO_SYSTEM_ENVIRONMENT_PATH - ) - -if (TUT_INCLUDE_DIR) - set(TUT_FOUND "YES") -else (TUT_INCLUDE_DIR) - set(TUT_FOUND "NO") -endif (TUT_INCLUDE_DIR) - -if (TUT_FOUND) - if (NOT TUT_FIND_QUIETLY) - message(STATUS "Found Tut: ${TUT_INCLUDE_DIR}") - set(TUT_FIND_QUIETLY TRUE) # Only alert us the first time - endif (NOT TUT_FIND_QUIETLY) -else (TUT_FOUND) - if (TUT_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Tut") - endif (TUT_FIND_REQUIRED) -endif (TUT_FOUND) - -mark_as_advanced(TUT_INCLUDE_DIR) diff --git a/indra/cmake/FindZLIB.cmake b/indra/cmake/FindZLIB.cmake index 6d630f1ba9..03a7db9d6f 100644 --- a/indra/cmake/FindZLIB.cmake +++ b/indra/cmake/FindZLIB.cmake @@ -30,12 +30,12 @@ endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR) if (ZLIB_FOUND) if (NOT ZLIB_FIND_QUIETLY) - message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}") - SET(ZLIB_FIND_QUIETLY TRUE) + message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}") + SET(ZLIB_FIND_QUIETLY TRUE) endif (NOT ZLIB_FIND_QUIETLY) else (ZLIB_FOUND) if (ZLIB_FIND_REQUIRED) - message(FATAL_ERROR "Could not find ZLIB library") + message(FATAL_ERROR "Could not find ZLIB library") endif (ZLIB_FIND_REQUIRED) endif (ZLIB_FOUND) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake new file mode 100644 index 0000000000..77221d55ed --- /dev/null +++ b/indra/cmake/GLOD.cmake @@ -0,0 +1,9 @@ +# -*- cmake -*- +include(Prebuilt) + +if (NOT STANDALONE) + use_prebuilt_binary(GLOD) +endif (NOT STANDALONE) + +set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) +set(GLOD_LIBRARIES glod) diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake index 06d6d847a0..c4c96a9af7 100644 --- a/indra/cmake/GoogleMock.cmake +++ b/indra/cmake/GoogleMock.cmake @@ -8,7 +8,7 @@ set(GOOGLEMOCK_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) if (LINUX) - # VWR-24366: gmock is underlinked, it needs gtest. + # VWR-24366: gmock is underlinked, it needs gtest. set(GOOGLEMOCK_LIBRARIES gmock -Wl,--no-as-needed gtest -Wl,--as-needed) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 6c784a3a76..d9f91193be 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -5,15 +5,16 @@ if (STANDALONE) include(FindGooglePerfTools) else (STANDALONE) if (WINDOWS) - use_prebuilt_binary(google-perftools) + use_prebuilt_binary(tcmalloc) set(TCMALLOC_LIBRARIES debug libtcmalloc_minimal-debug optimized libtcmalloc_minimal) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) if (LINUX) - use_prebuilt_binary(google-perftools) - set(TCMALLOC_LIBRARIES tcmalloc) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + tcmalloc) set(PROFILER_LIBRARIES profiler) set(GOOGLE_PERFTOOLS_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) @@ -28,12 +29,11 @@ if (GOOGLE_PERFTOOLS_FOUND) endif (GOOGLE_PERFTOOLS_FOUND) if (WINDOWS) - # *TODO -reenable this once we get server usage sorted out - #set(USE_GOOGLE_PERFTOOLS ON) + set(USE_GOOGLE_PERFTOOLS ON) endif (WINDOWS) if (USE_GOOGLE_PERFTOOLS) - set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC=1) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES}) else (USE_GOOGLE_PERFTOOLS) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 3f259f6382..08feab6e36 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -95,7 +95,7 @@ INCLUDE(GoogleMock) IF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) SET(${name}_test_additional_INCLUDE_DIRS "") ENDIF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) - INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${name}_test_additional_INCLUDE_DIRS ) + INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${${name}_test_additional_INCLUDE_DIRS} ) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_INCLUDE_DIRS ${${name}_test_additional_INCLUDE_DIRS}") ENDIF(LL_TEST_VERBOSE) diff --git a/indra/cmake/LLConvexDecomposition.cmake b/indra/cmake/LLConvexDecomposition.cmake new file mode 100644 index 0000000000..8e44504782 --- /dev/null +++ b/indra/cmake/LLConvexDecomposition.cmake @@ -0,0 +1,12 @@ +# -*- cmake -*- +include(Prebuilt) + +set(LLCONVEXDECOMP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + +if (INSTALL_PROPRIETARY AND NOT STANDALONE) + use_prebuilt_binary(llconvexdecomposition) + set(LLCONVEXDECOMP_LIBRARY llconvexdecomposition) +else (INSTALL_PROPRIETARY AND NOT STANDALONE) + use_prebuilt_binary(llconvexdecompositionstub) + set(LLCONVEXDECOMP_LIBRARY llconvexdecompositionstub) +endif (INSTALL_PROPRIETARY AND NOT STANDALONE) diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake index 7ee404b9bd..399cb332dd 100644 --- a/indra/cmake/LLPlugin.cmake +++ b/indra/cmake/LLPlugin.cmake @@ -8,7 +8,7 @@ set(LLPLUGIN_INCLUDE_DIRS if (LINUX) # In order to support using ld.gold on linux, we need to explicitely # specify all libraries that llplugin uses. - set(LLPLUGIN_LIBRARIES llplugin pthread) + set(LLPLUGIN_LIBRARIES llplugin pthread) else (LINUX) - set(LLPLUGIN_LIBRARIES llplugin) + set(LLPLUGIN_LIBRARIES llplugin) endif (LINUX) diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake index d397b78f1c..f15a2c2649 100644 --- a/indra/cmake/LLPrimitive.cmake +++ b/indra/cmake/LLPrimitive.cmake @@ -1,7 +1,33 @@ # -*- cmake -*- +# these should be moved to their own cmake file +include(Prebuilt) +use_prebuilt_binary(colladadom) +use_prebuilt_binary(pcre) +use_prebuilt_binary(libxml) + set(LLPRIMITIVE_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llprimitive ) +if (WINDOWS) + set(LLPRIMITIVE_LIBRARIES + debug llprimitive + optimized llprimitive + debug libcollada14dom22-d + optimized libcollada14dom22 + debug libboost_filesystem-vc100-mt-gd-1_45 + optimized libboost_filesystem-vc100-mt-1_45 + debug libboost_system-vc100-mt-gd-1_45 + optimized libboost_system-vc100-mt-1_45 + ) +else (WINDOWS) + set(LLPRIMITIVE_LIBRARIES + llprimitive + collada14dom + minizip + xml2 + pcrecpp + pcre + ) +endif (WINDOWS) -set(LLPRIMITIVE_LIBRARIES llprimitive) diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake index 554559edbd..b5a0580a90 100644 --- a/indra/cmake/LLTestCommand.cmake +++ b/indra/cmake/LLTestCommand.cmake @@ -1,3 +1,4 @@ +include(Python) MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH) # nat wonders how Kitware can use the term 'function' for a construct that # cannot return a value. And yet, variables you set inside a FUNCTION are diff --git a/indra/cmake/LScript.cmake b/indra/cmake/LScript.cmake index 86bfcb7440..21e78fc2c0 100644 --- a/indra/cmake/LScript.cmake +++ b/indra/cmake/LScript.cmake @@ -13,4 +13,4 @@ set(LSCRIPT_LIBRARIES lscript_library ) -set(LSCRIPT_EXECUTE_MONO_LIBRARIES lscript_execute_mono)
\ No newline at end of file +set(LSCRIPT_EXECUTE_MONO_LIBRARIES lscript_execute_mono) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index 7a463d1190..be6fe415f2 100644 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -5,19 +5,19 @@ set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") if (NDOF) if (STANDALONE) - set(NDOF_FIND_REQUIRED ON) - include(FindNDOF) + set(NDOF_FIND_REQUIRED ON) + include(FindNDOF) else (STANDALONE) - use_prebuilt_binary(ndofdev) + use_prebuilt_binary(ndofdev) - if (WINDOWS) - set(NDOF_LIBRARY libndofdev) - elseif (DARWIN OR LINUX) - set(NDOF_LIBRARY ndofdev) - endif (WINDOWS) + if (WINDOWS) + set(NDOF_LIBRARY libndofdev) + elseif (DARWIN OR LINUX) + set(NDOF_LIBRARY ndofdev) + endif (WINDOWS) - set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) - set(NDOF_FOUND 1) + set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) + set(NDOF_FOUND 1) endif (STANDALONE) endif (NDOF) diff --git a/indra/cmake/OpenGL.cmake b/indra/cmake/OpenGL.cmake index 661666f00d..0a3dd976b4 100644 --- a/indra/cmake/OpenGL.cmake +++ b/indra/cmake/OpenGL.cmake @@ -2,8 +2,7 @@ include(Prebuilt) if (NOT STANDALONE) - use_prebuilt_binary(GL) - # possible glh_linear should have its own .cmake file instead + 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/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 1b60d176f1..dbb4dfc46c 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -1,35 +1,49 @@ # -*- cmake -*- include(FindAutobuild) +if(INSTALL_PROPRIETARY) + include(FindSCP) +endif(INSTALL_PROPRIETARY) +# 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 ${CMAKE_BINARY_DIR}/temp/sentinel_installed), +# or if a previous attempt to install the package has failed (the exit status +# of previous attempts is serialized in the file +# ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) macro (use_prebuilt_binary _binary) if (NOT DEFINED STANDALONE_${_binary}) set(STANDALONE_${_binary} ${STANDALONE}) endif (NOT DEFINED STANDALONE_${_binary}) if (NOT STANDALONE_${_binary}) - if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) - if(INSTALL_PROPRIETARY) - include(FindSCP) - endif(INSTALL_PROPRIETARY) - if(DEBUG_PREBUILT) - message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install - --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check - ${_binary} ") - endif(DEBUG_PREBUILT) - execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" - install - --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check - ${_binary} - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" - RESULT_VARIABLE ${_binary}_installed - ) + if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") + file(READ ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${_binary}_installed") + if(DEBUG_PREBUILT) + message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"") + endif(DEBUG_PREBUILT) + endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") + + if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if(DEBUG_PREBUILT) + message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install + --install-dir=${AUTOBUILD_INSTALL_DIR} + --skip-license-check + ${_binary} ") + endif(DEBUG_PREBUILT) + execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" + install + --install-dir=${AUTOBUILD_INSTALL_DIR} + --skip-license-check + ${_binary} + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + RESULT_VARIABLE ${_binary}_installed + ) file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") - else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) - set(${_binary}_installed 0) - endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) + endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if(NOT ${_binary}_installed EQUAL 0) message(FATAL_ERROR "Failed to download or unpack prebuilt '${_binary}'." diff --git a/indra/cmake/Pth.cmake b/indra/cmake/Pth.cmake deleted file mode 100644 index a28f6ec696..0000000000 --- a/indra/cmake/Pth.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - -set(PTH_FIND_QUIETLY ON) -set(PTH_FIND_REQUIRED ON) - -if (STANDALONE) -# ?? How would I construct FindPTH.cmake? This file was cloned from -# CURL.cmake, which uses include(FindCURL), but there's no FindCURL.cmake? -# include(FindPTH) -else (STANDALONE) - # This library is only needed to support Boost.Coroutine, and only on Mac. - if (DARWIN) - use_prebuilt_binary(pth) - set(PTH_LIBRARIES pth) - set(PTH_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) - else (DARWIN) - set(PTH_LIBRARIES) - set(PTH_INCLUDE_DIRS) - endif (DARWIN) -endif (STANDALONE) diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake index 738c08c42f..7488e9dcb0 100644 --- a/indra/cmake/Tut.cmake +++ b/indra/cmake/Tut.cmake @@ -1,11 +1,6 @@ # -*- cmake -*- include(Prebuilt) -set(TUT_FIND_REQUIRED TRUE) -set(TUT_FIND_QUIETLY TRUE) - -if (STANDALONE) - include(FindTut) -else (STANDALONE) +if (NOT STANDALONE) use_prebuilt_binary(tut) -endif (STANDALONE) +endif(NOT STANDALONE) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 77dd34d122..4cbf7aa043 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -29,6 +29,7 @@ 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") +set(INCREMENTAL_LINK OFF CACHE BOOL "Use incremental linking on win32 builds (enable for faster links on some machines)") if(LIBS_CLOSED_DIR) file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR) @@ -101,8 +102,8 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # To support a different SDK update these Xcode settings: set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5) set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) - set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2") - set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "DWARF with dSYM File") + set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0") + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) # NOTE: To attempt an i386/PPC Universal build, add this on the configure line: # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc' @@ -135,6 +136,7 @@ set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for 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.") @@ -150,7 +152,7 @@ For more information, please see JIRA DEV-14943 - Cmake Linux cannot build both endif (LINUX AND SERVER AND VIEWER) -set(USE_PRECOMPILED_HEADERS OFF CACHE BOOL "Enable use of precompiled header directives where supported.") +set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") source_group("CMake Rules" FILES CMakeLists.txt) diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake index 0f5a81c020..91b49e75d7 100644 --- a/indra/cmake/WebKitLibPlugin.cmake +++ b/indra/cmake/WebKitLibPlugin.cmake @@ -8,60 +8,63 @@ if (STANDALONE) include(${QT_USE_FILE}) set(QTDIR $ENV{QTDIR}) if (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin") - message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; " - "Qt is found by looking for qmake in your PATH. " - "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, " - "or unset QTDIR if the found Qt is correct.") - endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin") + message(FATAL_ERROR "\"${QT_BINARY_DIR}\" is unequal \"${QTDIR}/bin\"; " + "Qt is found by looking for qmake in your PATH. " + "Please set your PATH such that 'qmake' is found in \$QTDIR/bin, " + "or unset QTDIR if the found Qt is correct.") + endif (QTDIR AND NOT "${QT_BINARY_DIR}" STREQUAL "${QTDIR}/bin") find_package(LLQtWebkit REQUIRED QUIET) # Add the plugins. set(QT_PLUGIN_LIBRARIES) foreach(qlibname qgif qjpeg) - find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH) - if (QT_PLUGIN_${qlibname}) - list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}}) - else (QT_PLUGIN_${qtlibname}) - message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!") - endif (QT_PLUGIN_${qlibname}) + find_library(QT_PLUGIN_${qlibname} ${qlibname} PATHS ${QT_PLUGINS_DIR}/imageformats NO_DEFAULT_PATH) + if (QT_PLUGIN_${qlibname}) + list(APPEND QT_PLUGIN_LIBRARIES ${QT_PLUGIN_${qlibname}}) + else (QT_PLUGIN_${qtlibname}) + message(FATAL_ERROR "Could not find the Qt plugin ${qlibname} in \"${QT_PLUGINS_DIR}/imageformats\"!") + endif (QT_PLUGIN_${qlibname}) endforeach(qlibname) # qjpeg depends on libjpeg list(APPEND QT_PLUGIN_LIBRARIES jpeg) - set(WEBKITLIBPLUGIN OFF CACHE BOOL - "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") + set(WEBKITLIBPLUGIN OFF CACHE BOOL + "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") else (STANDALONE) - use_prebuilt_binary(llqtwebkit) - set(WEBKITLIBPLUGIN ON CACHE BOOL - "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") + use_prebuilt_binary(llqtwebkit) + set(WEBKITLIBPLUGIN ON CACHE BOOL + "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") endif (STANDALONE) if (WINDOWS) - set(WEBKIT_PLUGIN_LIBRARIES - debug llqtwebkitd - debug QtWebKitd4 - debug QtOpenGLd4 - debug QtNetworkd4 - debug QtGuid4 - debug QtCored4 - debug qtmaind - optimized llqtwebkit - optimized QtWebKit4 - optimized QtOpenGL4 - optimized QtNetwork4 - optimized QtGui4 - optimized QtCore4 - optimized qtmain - ) + set(WEBKIT_PLUGIN_LIBRARIES + debug llqtwebkitd + debug QtWebKitd4 + debug QtOpenGLd4 + debug QtNetworkd4 + debug QtGuid4 + debug QtCored4 + debug qtmaind + optimized llqtwebkit + optimized QtWebKit4 + optimized QtOpenGL4 + optimized QtNetwork4 + optimized QtGui4 + optimized QtCore4 + optimized qtmain + ) elseif (DARWIN) - set(WEBKIT_PLUGIN_LIBRARIES - optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib - debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib - ) + set(WEBKIT_PLUGIN_LIBRARIES + optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib + debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib + ) elseif (LINUX) - if (STANDALONE) set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES}) - else (STANDALONE) set(WEBKIT_PLUGIN_LIBRARIES llqtwebkit +# qico +# qpng +# qtiff +# qsvg +# QtSvg QtWebKit QtOpenGL QtNetwork @@ -74,6 +77,9 @@ elseif (LINUX) X11 Xrender GL + +# sqlite3 +# Xi +# SM ) - endif (STANDALONE) endif (WINDOWS) diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 320a9be8ab..ce2d1e0386 100755..100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -109,6 +109,8 @@ def main(command, libpath=[], vars={}): os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()])) # Run the child process. print "Running: %s" % " ".join(command) + # Make sure we see all relevant output *before* child-process output. + sys.stdout.flush() return subprocess.call(command) if __name__ == "__main__": |