summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/JsonCpp.cmake2
-rw-r--r--indra/cmake/LLTestCommand.cmake3
-rw-r--r--indra/cmake/Linking.cmake11
-rw-r--r--indra/cmake/VisualLeakDetector.cmake15
-rw-r--r--indra/cmake/WebKitLibPlugin.cmake7
-rw-r--r--indra/cmake/run_build_test.py30
6 files changed, 61 insertions, 7 deletions
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index 499b00fb44..7ad73e5683 100644
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -18,5 +18,5 @@ else (STANDALONE)
elseif (LINUX)
set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a)
endif (WINDOWS)
- set(JSONCPP_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
+ set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json")
endif (STANDALONE)
diff --git a/indra/cmake/LLTestCommand.cmake b/indra/cmake/LLTestCommand.cmake
index b5a0580a90..f75c23a5de 100644
--- a/indra/cmake/LLTestCommand.cmake
+++ b/indra/cmake/LLTestCommand.cmake
@@ -9,6 +9,9 @@ MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH)
FOREACH(dir ${LD_LIBRARY_PATH})
LIST(APPEND value "-l${dir}")
ENDFOREACH(dir)
+ # Enough different tests want to be able to find CMake's PYTHON_EXECUTABLE
+ # that we should just pop it into the environment for everybody.
+ LIST(APPEND value "-DPYTHON=${PYTHON_EXECUTABLE}")
LIST(APPEND value ${ARGN})
SET(${OUTVAR} ${value})
##IF(LL_TEST_VERBOSE)
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index c5f9e2c579..47f944f9a5 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -13,7 +13,7 @@ elseif (LINUX)
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/\$(CONFIGURATION)")
+ set(EXE_STAGING_DIR "${CMAKE_BINARY_DIR}/sharedlibs")
endif (WINDOWS)
# Autobuild packages must provide 'release' versions of libraries, but may provide versions for
@@ -33,7 +33,14 @@ else(WINDOWS OR DARWIN)
set(AUTOBUILD_LIBS_INSTALL_DIRS ${AUTOBUILD_INSTALL_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER})
endif(WINDOWS OR DARWIN)
-list(APPEND AUTOBUILD_LIBS_INSTALL_DIRS ${ARCH_PREBUILT_DIRS_RELEASE})
+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})
+ message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}, extending AUTOBUILD_LIBS_INSTALL_DIRS")
+endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+message(STATUS "For ${CMAKE_BUILD_TYPE}, AUTOBUILD_LIBS_INSTALL_DIRS: ${AUTOBUILD_LIBS_INSTALL_DIRS}")
link_directories(${AUTOBUILD_LIBS_INSTALL_DIRS})
if (LINUX)
diff --git a/indra/cmake/VisualLeakDetector.cmake b/indra/cmake/VisualLeakDetector.cmake
new file mode 100644
index 0000000000..d3ba554e46
--- /dev/null
+++ b/indra/cmake/VisualLeakDetector.cmake
@@ -0,0 +1,15 @@
+# -*- 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)
+
+ if (WINDOWS)
+ add_definitions(-DINCLUDE_VLD=1)
+ endif (WINDOWS)
+
+ endif (INCLUDE_VLD_CMAKE)
+
+endif (VIEWER)
diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake
index 91b49e75d7..d9df78bfc8 100644
--- a/indra/cmake/WebKitLibPlugin.cmake
+++ b/indra/cmake/WebKitLibPlugin.cmake
@@ -70,9 +70,10 @@ elseif (LINUX)
QtNetwork
QtGui
QtCore
- qgif
- qjpeg
- jpeg
+ jscore
+# qgif
+# qjpeg
+# jpeg
fontconfig
X11
Xrender
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index ce2d1e0386..a2ef61c8fd 100644
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -46,6 +46,7 @@ $/LicenseInfo$
import os
import sys
+import signal
import subprocess
def main(command, libpath=[], vars={}):
@@ -113,6 +114,33 @@ def main(command, libpath=[], vars={}):
sys.stdout.flush()
return subprocess.call(command)
+# swiped from vita, sigh, seems like a Bad Idea to introduce dependency
+def translate_rc(rc):
+ """
+ Accept an rc encoded as for subprocess.Popen.returncode:
+ None means still running
+ int >= 0 means terminated voluntarily with specified rc
+ int < 0 means terminated by signal (-rc)
+
+ Return a string explaining the outcome. In case of a signal, try to
+ name the corresponding symbol from the 'signal' module.
+ """
+ if rc is None:
+ return "still running"
+
+ if rc >= 0:
+ return "terminated with rc %s" % rc
+
+ # Negative rc means the child was terminated by signal -rc.
+ rc = -rc
+ for attr in dir(signal):
+ if attr.startswith('SIG') and getattr(signal, attr) == rc:
+ strc = attr
+ break
+ else:
+ strc = str(rc)
+ return "terminated by signal %s" % strc
+
if __name__ == "__main__":
from optparse import OptionParser
parser = OptionParser(usage="usage: %prog [options] command args...")
@@ -140,5 +168,5 @@ if __name__ == "__main__":
vars=dict([(pair.split('=', 1) + [""])[:2] for pair in opts.vars]))
if rc not in (None, 0):
print >>sys.stderr, "Failure running: %s" % " ".join(args)
- print >>sys.stderr, "Error: %s" % rc
+ print >>sys.stderr, "Error %s: %s" % (rc, translate_rc(rc))
sys.exit((rc < 0) and 255 or rc)