From cbb6a416fc4111f08e014749a1f02cc1b1719d62 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 4 Dec 2014 21:48:13 -0500 Subject: Make havok_source package name agree with name from repo URL. Until we get a havok-source package built with new metadata-bearing autobuild, the package name in autobuild.xml and CMake must agree with the tarball filename. --- indra/cmake/Havok.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 8b7f01d20b..798e59a679 100755 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -3,7 +3,7 @@ if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") -use_prebuilt_binary(havok-source) +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) @@ -68,7 +68,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) 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(${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) @@ -111,7 +111,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) 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) + 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") -- cgit v1.2.3 From c56036a8cb759bc4ea911e8849ceec687c8545be Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 11 Dec 2014 12:13:07 -0500 Subject: Add /SAFESEH:NO /NODEFAULTLIB:LIBCMT to viewer linker switches. zlib cannot be linked with SAFESEH, which is the VS 2013 default, so every consumer must set /SAFESEH:NO. /NODEFAULTLIB:LIBCMT seems to eliminate many duplicate-symbol link errors. --- indra/cmake/00-Common.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index d2faa2d8c5..ec076837f4 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -54,7 +54,8 @@ if (WINDOWS) set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" CACHE STRING "C++ compiler release options" FORCE) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") + # zlib has assembly-language object files incompatible with SAFESEH + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT") set(CMAKE_CXX_STANDARD_LIBRARIES "") set(CMAKE_C_STANDARD_LIBRARIES "") -- cgit v1.2.3 From f7d1ece5bee79f030894cf24dc8e7a9135df9242 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 12 Dec 2014 17:33:24 -0500 Subject: Make JsonCpp.cmake reference Windows lib names we actually use. --- indra/cmake/JsonCpp.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index d6d05af315..bf2d470269 100755 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -11,8 +11,8 @@ else (USESYSTEMLIBS) use_prebuilt_binary(jsoncpp) if (WINDOWS) set(JSONCPP_LIBRARIES - debug json_vc100debug_libmt.lib - optimized json_vc100_libmt) + debug json_libmtd.lib + optimized json_libmt) elseif (DARWIN) set(JSONCPP_LIBRARIES libjson_darwin_libmt.a) elseif (LINUX) -- cgit v1.2.3 From 062c13364bd6431974b59d9eadf137decdffdbee Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 15 Dec 2014 12:57:56 -0500 Subject: don't include glext on Mac where it is not used --- indra/cmake/GLEXT.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 415b13033c..2a08c8fbae 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -2,7 +2,9 @@ include(Prebuilt) if (NOT USESYSTEMLIBS) - use_prebuilt_binary(glext) + if (WINDOWS OR LINUX) + use_prebuilt_binary(glext) + endif (WINDOWS OR LINUX) use_prebuilt_binary(glh-linear) set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) endif (NOT USESYSTEMLIBS) -- cgit v1.2.3 From 37cd872f40ffeb90d03ea5b0f9025670e920da43 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 15 Dec 2014 13:00:47 -0500 Subject: include libuuid and fontconfig only on linux --- indra/cmake/ViewerMiscLibs.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index d4be24799f..a805c28598 100755 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -3,8 +3,10 @@ include(Prebuilt) if (NOT USESYSTEMLIBS) use_prebuilt_binary(libhunspell) - use_prebuilt_binary(libuuid) use_prebuilt_binary(slvoice) - use_prebuilt_binary(fontconfig) + if (LINUX) + use_prebuilt_binary(libuuid) + use_prebuilt_binary(fontconfig) + endif (LINUX) endif(NOT USESYSTEMLIBS) -- cgit v1.2.3 From 11ab03331f5028455a56245fc9121b82068565cc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 15 Dec 2014 13:02:12 -0500 Subject: include quicktime package only on windows --- indra/cmake/QuickTimePlugin.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/QuickTimePlugin.cmake b/indra/cmake/QuickTimePlugin.cmake index 012f4e20d8..c08e153ee3 100755 --- a/indra/cmake/QuickTimePlugin.cmake +++ b/indra/cmake/QuickTimePlugin.cmake @@ -2,7 +2,9 @@ if(INSTALL_PROPRIETARY) include(Prebuilt) - use_prebuilt_binary(quicktime) + if (WINDOWS) + use_prebuilt_binary(quicktime) + endif (WINDOWS) endif(INSTALL_PROPRIETARY) if (DARWIN) -- cgit v1.2.3 From 71c70117dda651700b5c564366f6c91d12512f97 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Mon, 15 Dec 2014 10:10:18 -0800 Subject: Add feature (enabled) to turn off media plugins --- indra/cmake/Variables.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 8e220162ce..faca12c347 100755 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -26,6 +26,7 @@ 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)") +set(ENABLE_MEDIA_PLUGINS OFF CACHE BOOL "Turn off building media plugins if they are imported by third-party library mechanism") if(LIBS_CLOSED_DIR) file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR) -- cgit v1.2.3 From 0d71baba74e2009e88471e2c44e78863b34a5817 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 17 Dec 2014 11:10:33 -0500 Subject: Produce error message, not traceback, when test program doesn't build. A traceback from a Python script always makes people think there's a bug in your script. Even when a test program fails to build, CMake often (always?) tries to run it anyway, via our run_build_test.py script. For that case, produce a straightforward error message -- rather than an OSError traceback that doesn't even mention the program name! --- indra/cmake/run_build_test.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index a2ef61c8fd..582185e5ab 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -46,6 +46,7 @@ $/LicenseInfo$ import os import sys +import errno import signal import subprocess @@ -112,7 +113,23 @@ def main(command, libpath=[], vars={}): print "Running: %s" % " ".join(command) # Make sure we see all relevant output *before* child-process output. sys.stdout.flush() - return subprocess.call(command) + try: + return subprocess.call(command) + except OSError as err: + # If the caller is trying to execute a test program that doesn't + # exist, we want to produce a reasonable error message rather than a + # traceback. This happens when the build is halted by errors, but + # CMake tries to proceed with testing anyway . However, do + # NOT attempt to handle any error but "doesn't exist." + if err.errno != errno.ENOENT: + raise + # In practice, the pathnames into CMake's build tree are so long as to + # obscure the name of the test program. Just print its basename. + print "No such program %s; check for preceding build errors" % \ + os.path.basename(command[0]) + # What rc should we simulate for missing executable? Windows produces + # 9009. + return 9009 # swiped from vita, sigh, seems like a Bad Idea to introduce dependency def translate_rc(rc): -- cgit v1.2.3