From c2d844c972419e3bd90076f4e5ee6296007b0e6e Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Mon, 16 Aug 2010 22:10:18 -0400 Subject: SNOW-746: Finished Google BreakPad cmake for standalone (transplanted from 5a7ee78d029e973084e28d0d23a7233e0d976dca) --- indra/cmake/FindGoogleBreakpad.cmake | 40 ++++++++++++++++++++++++++++++++++++ indra/cmake/GoogleBreakpad.cmake | 4 ++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 indra/cmake/FindGoogleBreakpad.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/FindGoogleBreakpad.cmake b/indra/cmake/FindGoogleBreakpad.cmake new file mode 100644 index 0000000000..1a0493be5e --- /dev/null +++ b/indra/cmake/FindGoogleBreakpad.cmake @@ -0,0 +1,40 @@ +# -*- cmake -*- + +# - Find Google BreakPad +# Find the Google BreakPad includes and library +# This module defines +# BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR, where to find exception_handler.h, etc. +# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad. +# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad. +# also defined, but not for general use are +# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library. + +FIND_PATH(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR google_breakpad/exception_handler.h) + +SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client) +FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY + NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} + ) + +IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY}) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES") +ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO") +ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + + +IF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) + MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}") + ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) +ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Google BreakPad library") + ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) +ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + +MARK_AS_ADVANCED( + BREAKPAD_EXCEPTION_HANDLER_LIBRARY + BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR + ) diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index e45518ef56..c6daa05fbd 100644 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -2,8 +2,8 @@ include(Prebuilt) if (STANDALONE) - MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented") - # *TODO - implement this include(FindGoogleBreakpad) + set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON) + include(FindGoogleBreakpad) else (STANDALONE) use_prebuilt_binary(google_breakpad) set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler) -- cgit v1.2.3 From 1b27c4f9c762d68fae5b47dc08a31a2699ca9fe5 Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Sun, 22 Aug 2010 19:20:29 -0400 Subject: SNOW-599/SNOW-747: Pulseaudio should be optional on Linux. --- indra/cmake/PulseAudio.cmake | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index f8087a8083..e918de0198 100644 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -1,28 +1,28 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) - include(FindPkgConfig) +set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.") - pkg_check_modules(PULSEAUDIO REQUIRED libpulse-mainloop-glib) +if (PULSEAUDIO) + if (STANDALONE) + include(FindPkgConfig) + + pkg_check_modules(PULSEAUDIO libpulse) -elseif (LINUX) - use_prebuilt_binary(pulseaudio) - set(PULSEAUDIO_FOUND ON FORCE BOOL) - set(PULSEAUDIO_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include + elseif (LINUX) + use_prebuilt_binary(pulseaudio) + set(PULSEAUDIO_FOUND ON FORCE BOOL) + set(PULSEAUDIO_INCLUDE_DIRS + ${LIBS_PREBUILT_DIR}/include + ) + # We don't need to explicitly link against pulseaudio itself, because + # the viewer probes for the system's copy at runtime. + set(PULSEAUDIO_LIBRARIES + # none needed! ) - # We don't need to explicitly link against pulseaudio itself, because - # the viewer probes for the system's copy at runtime. - set(PULSEAUDIO_LIBRARIES - # none needed! - ) -endif (STANDALONE) + endif (STANDALONE) +endif (PULSEAUDIO) if (PULSEAUDIO_FOUND) - set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.") -endif (PULSEAUDIO_FOUND) - -if (PULSEAUDIO) add_definitions(-DLL_PULSEAUDIO_ENABLED=1) -endif (PULSEAUDIO) +endif (PULSEAUDIO_FOUND) -- cgit v1.2.3 From e7dc84df0d71cd544bc8b8cb8d49133bef19ade8 Mon Sep 17 00:00:00 2001 From: "Christian Goetze (CG)" Date: Mon, 13 Sep 2010 13:18:49 -0700 Subject: Add debug output to "indra/cmake/run_build_test.py". --- indra/cmake/run_build_test.py | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 104585c195..dca206f51f 100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -86,6 +86,7 @@ def main(command, libpath=[], vars={}): # Now rebuild the path string. This way we use a minimum of separators # -- and we avoid adding a pointless separator when libpath is empty. os.environ[var] = os.pathsep.join(dirs) + print "%s = %r" % (var, os.environ[var]) # Now handle arbitrary environment variables. The tricky part is ensuring # that all the keys and values we try to pass are actually strings. if vars: -- cgit v1.2.3 From e0da08da6942139424aab07f8ed05845b2238be6 Mon Sep 17 00:00:00 2001 From: "Christian Goetze (CG)" Date: Mon, 13 Sep 2010 13:44:17 -0700 Subject: Clean up the LD_LIBRARY_PATH list prior to re-assembling it into a string. --- indra/cmake/run_build_test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index dca206f51f..1236604b21 100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -83,6 +83,11 @@ def main(command, libpath=[], vars={}): # Append the sequence in libpath print "%s += %r" % (var, libpath) dirs.extend(libpath) + # Filter out some useless pieces + clean_dirs = [] + for dir in dirs: + if dir and dir not in ('', '.'): + clean_dirs.append(dir) # Now rebuild the path string. This way we use a minimum of separators # -- and we avoid adding a pointless separator when libpath is empty. os.environ[var] = os.pathsep.join(dirs) -- cgit v1.2.3 From 3a8a3301f94032af315f11e55148c6f82f6d7d73 Mon Sep 17 00:00:00 2001 From: "Christian Goetze (CG)" Date: Mon, 13 Sep 2010 14:05:53 -0700 Subject: Prepend passed in path arguments, except when they are system paths. --- indra/cmake/run_build_test.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 1236604b21..e377aeef48 100644 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -82,15 +82,23 @@ def main(command, libpath=[], vars={}): dirs = os.environ.get(var, "").split(os.pathsep) # Append the sequence in libpath print "%s += %r" % (var, libpath) - dirs.extend(libpath) + for dir in libpath: + # append system paths at the end + if dir in ('/lib', '/usr/lib'): + dirs.append(dir) + # prepend non-system paths + else: + dirs.insert(0, dir) + # Filter out some useless pieces clean_dirs = [] for dir in dirs: if dir and dir not in ('', '.'): clean_dirs.append(dir) + # Now rebuild the path string. This way we use a minimum of separators # -- and we avoid adding a pointless separator when libpath is empty. - os.environ[var] = os.pathsep.join(dirs) + os.environ[var] = os.pathsep.join(clean_dirs) print "%s = %r" % (var, os.environ[var]) # Now handle arbitrary environment variables. The tricky part is ensuring # that all the keys and values we try to pass are actually strings. -- cgit v1.2.3 From c4d86b9e4eadca778349ea50f1f0be8a4335eca0 Mon Sep 17 00:00:00 2001 From: "Christian Goetze (CG)" Date: Mon, 13 Sep 2010 14:51:31 -0700 Subject: Include libexpat.so.1 in the list of libs to copy. --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 2dd296bf12..95ed5d6bc8 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -221,6 +221,7 @@ elseif(LINUX) libcrypto.so.0.9.7 libdb-4.2.so libexpat.so + libexpat.so.1 libgmock_main.so libgmock.so.0 libgmodule-2.0.so -- cgit v1.2.3 From 136858bd20acab9684c2bd1673663fc925f0cc77 Mon Sep 17 00:00:00 2001 From: "Boroondas Gupte (patch by Robin Cornelius)" Date: Tue, 31 Aug 2010 12:16:03 +0200 Subject: VWR-20911 FIXED CMake build arch detection is inaccurate and incomplete Robin Cornelius' patch from http://jira.secondlife.com/secure/attachment/42801/SNOW-776+Don%27t+use+uname+for+build+arch+detection%2C+use+compiler.patch applied without fuzz: patching file indra/cmake/Variables.cmake Hunk #1 succeeded at 52 (offset -2 lines). Added entry in doc/contributions.txt. No further changes other than that. (transplanted from a9132a63e4739965d65ddd58a7be9eabe4321c2a) --- indra/cmake/Variables.cmake | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index bfaf3f4f26..8a08154295 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -54,19 +54,20 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) # If someone has specified a word size, use that to determine the - # architecture. Otherwise, let the architecture specify the word size. + # architecture. Otherwise, let the compiler specify the word size. + # Using uname will break under chroots and other cross arch compiles. RC if (WORD_SIZE EQUAL 32) set(ARCH i686) elseif (WORD_SIZE EQUAL 64) set(ARCH x86_64) else (WORD_SIZE EQUAL 32) - execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ - OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) - if (ARCH STREQUAL x86_64) - set(WORD_SIZE 64) - else (ARCH STREQUAL x86_64) - set(WORD_SIZE 32) - endif (ARCH STREQUAL x86_64) + if(CMAKE_SIZEOF_VOID_P MATCHES 4) + set(ARCH i686) + set(WORD_SIZE 32) + else(CMAKE_SIZEOF_VOID_P MATCHES 4) + set(ARCH x86_64) + set(WORD_SIZE 64) + endif(CMAKE_SIZEOF_VOID_P MATCHES 4) endif (WORD_SIZE EQUAL 32) set(LL_ARCH ${ARCH}_linux) -- cgit v1.2.3 From bd3d9e1ba99586d31b6deba2f9dc54d481f9740b Mon Sep 17 00:00:00 2001 From: Boroondas Gupte Date: Tue, 31 Aug 2010 14:41:46 +0200 Subject: VWR-20911 FOLLOWUP fixed indentation (cmake files use spaces only) (transplanted from d02b22278d5b0a0386b3a7c25221b2069bc02963) --- indra/cmake/Variables.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 8a08154295..230e228c62 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -62,12 +62,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(ARCH x86_64) else (WORD_SIZE EQUAL 32) if(CMAKE_SIZEOF_VOID_P MATCHES 4) - set(ARCH i686) - set(WORD_SIZE 32) - else(CMAKE_SIZEOF_VOID_P MATCHES 4) - set(ARCH x86_64) - set(WORD_SIZE 64) - endif(CMAKE_SIZEOF_VOID_P MATCHES 4) + set(ARCH i686) + set(WORD_SIZE 32) + else(CMAKE_SIZEOF_VOID_P MATCHES 4) + set(ARCH x86_64) + set(WORD_SIZE 64) + endif(CMAKE_SIZEOF_VOID_P MATCHES 4) endif (WORD_SIZE EQUAL 32) set(LL_ARCH ${ARCH}_linux) -- cgit v1.2.3