Breakpad3: cmake and prebuilds
This commit is contained in:
@@ -37,6 +37,7 @@ set(cmake_SOURCE_FILES
|
|||||||
FindColladadom.cmake
|
FindColladadom.cmake
|
||||||
FindELFIO.cmake
|
FindELFIO.cmake
|
||||||
FindGLOD.cmake
|
FindGLOD.cmake
|
||||||
|
FindGoogleBreakpad.cmake
|
||||||
FindGooglePerfTools.cmake
|
FindGooglePerfTools.cmake
|
||||||
FindHunSpell.cmake
|
FindHunSpell.cmake
|
||||||
FindJsonCpp.cmake
|
FindJsonCpp.cmake
|
||||||
@@ -50,6 +51,7 @@ set(cmake_SOURCE_FILES
|
|||||||
GStreamer010Plugin.cmake
|
GStreamer010Plugin.cmake
|
||||||
Glui.cmake
|
Glui.cmake
|
||||||
Glut.cmake
|
Glut.cmake
|
||||||
|
GoogleBreakpad.cmake
|
||||||
GooglePerfTools.cmake
|
GooglePerfTools.cmake
|
||||||
Hunspell.cmake
|
Hunspell.cmake
|
||||||
JPEG.cmake
|
JPEG.cmake
|
||||||
@@ -69,6 +71,7 @@ set(cmake_SOURCE_FILES
|
|||||||
LLPlugin.cmake
|
LLPlugin.cmake
|
||||||
LLPrimitive.cmake
|
LLPrimitive.cmake
|
||||||
LLPhysicsExtensions.cmake
|
LLPhysicsExtensions.cmake
|
||||||
|
LLSharedLibs.cmake
|
||||||
LLQtWebkit.cmake
|
LLQtWebkit.cmake
|
||||||
LLRender.cmake
|
LLRender.cmake
|
||||||
LLUI.cmake
|
LLUI.cmake
|
||||||
|
|||||||
40
indra/cmake/FindGoogleBreakpad.cmake
Normal file
40
indra/cmake/FindGoogleBreakpad.cmake
Normal file
@@ -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
|
||||||
|
)
|
||||||
21
indra/cmake/GoogleBreakpad.cmake
Normal file
21
indra/cmake/GoogleBreakpad.cmake
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
include(Prebuilt)
|
||||||
|
|
||||||
|
if (STANDALONE)
|
||||||
|
set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
|
||||||
|
include(FindGoogleBreakpad)
|
||||||
|
else (STANDALONE)
|
||||||
|
use_prebuilt_binary(google_breakpad)
|
||||||
|
if (DARWIN)
|
||||||
|
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler)
|
||||||
|
endif (DARWIN)
|
||||||
|
if (LINUX)
|
||||||
|
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
|
||||||
|
endif (LINUX)
|
||||||
|
if (WINDOWS)
|
||||||
|
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client crash_generation_server common)
|
||||||
|
endif (WINDOWS)
|
||||||
|
# yes, this does look dumb, no, it's not incorrect
|
||||||
|
#
|
||||||
|
set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad/google_breakpad")
|
||||||
|
endif (STANDALONE)
|
||||||
@@ -159,3 +159,23 @@ MACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
|
|||||||
## MESSAGE(STATUS "ADD_VIEWER_COMM_BUILD_TEST ${name} wrapper = ${wrapper}")
|
## MESSAGE(STATUS "ADD_VIEWER_COMM_BUILD_TEST ${name} wrapper = ${wrapper}")
|
||||||
ADD_COMM_BUILD_TEST("${name}" "${parent}" "${wrapper}" llviewerprecompiledheaders.cpp)
|
ADD_COMM_BUILD_TEST("${name}" "${parent}" "${wrapper}" llviewerprecompiledheaders.cpp)
|
||||||
ENDMACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
|
ENDMACRO(ADD_VIEWER_COMM_BUILD_TEST name parent wrapper)
|
||||||
|
MACRO(SET_TEST_PATH LISTVAR)
|
||||||
|
IF(WINDOWS)
|
||||||
|
# We typically build/package only Release variants of third-party
|
||||||
|
# libraries, so append the Release staging dir in case the library being
|
||||||
|
# sought doesn't have a debug variant.
|
||||||
|
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR} ${SHARED_LIB_STAGING_DIR}/Release)
|
||||||
|
ELSEIF(DARWIN)
|
||||||
|
# We typically build/package only Release variants of third-party
|
||||||
|
# libraries, so append the Release staging dir in case the library being
|
||||||
|
# sought doesn't have a debug variant.
|
||||||
|
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
|
||||||
|
ELSE(WINDOWS)
|
||||||
|
# Linux uses a single staging directory anyway.
|
||||||
|
IF (STANDALONE)
|
||||||
|
set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib)
|
||||||
|
ELSE (STANDALONE)
|
||||||
|
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
|
||||||
|
ENDIF (STANDALONE)
|
||||||
|
ENDIF(WINDOWS)
|
||||||
|
ENDMACRO(SET_TEST_PATH)
|
||||||
|
|||||||
73
indra/cmake/LLSharedLibs.cmake
Normal file
73
indra/cmake/LLSharedLibs.cmake
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# ll_deploy_sharedlibs_command
|
||||||
|
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
||||||
|
macro(ll_deploy_sharedlibs_command target_exe)
|
||||||
|
get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
|
||||||
|
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
|
||||||
|
|
||||||
|
if(DARWIN)
|
||||||
|
SET_TEST_PATH(SEARCH_DIRS)
|
||||||
|
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
|
||||||
|
if(IS_BUNDLE)
|
||||||
|
# If its a bundle the exe is not in the target location, this should find it.
|
||||||
|
get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
|
||||||
|
set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
|
||||||
|
set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
|
||||||
|
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
|
||||||
|
endif(IS_BUNDLE)
|
||||||
|
elseif(WINDOWS)
|
||||||
|
SET_TEST_PATH(SEARCH_DIRS)
|
||||||
|
LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32")
|
||||||
|
elseif(LINUX)
|
||||||
|
SET_TEST_PATH(SEARCH_DIRS)
|
||||||
|
set(OUTPUT_PATH ${OUTPUT_PATH}/lib)
|
||||||
|
endif(DARWIN)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${target_exe} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
ARGS
|
||||||
|
"-DBIN_NAME=\"${TARGET_LOCATION}\""
|
||||||
|
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
|
||||||
|
"-DDST_PATH=\"${OUTPUT_PATH}\""
|
||||||
|
"-P"
|
||||||
|
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"
|
||||||
|
)
|
||||||
|
|
||||||
|
endmacro(ll_deploy_sharedlibs_command)
|
||||||
|
|
||||||
|
# ll_stage_sharedlib
|
||||||
|
# Performs config and adds a copy command for a sharedlib target.
|
||||||
|
macro(ll_stage_sharedlib DSO_TARGET)
|
||||||
|
# target gets written to the DLL staging directory.
|
||||||
|
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
||||||
|
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
||||||
|
if(NOT WINDOWS)
|
||||||
|
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
|
||||||
|
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
||||||
|
if(DARWIN)
|
||||||
|
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
||||||
|
else(DARWIN)
|
||||||
|
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR})
|
||||||
|
endif(DARWIN)
|
||||||
|
|
||||||
|
# *TODO - maybe make this a symbolic link? -brad
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${DSO_TARGET} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
ARGS
|
||||||
|
-E
|
||||||
|
copy_if_different
|
||||||
|
${DSO_PATH}
|
||||||
|
${SHARED_LIB_STAGING_DIR_CONFIG}/${DSO_FILE}
|
||||||
|
COMMENT "Copying llcommon to the staging folder."
|
||||||
|
)
|
||||||
|
endif(NOT WINDOWS)
|
||||||
|
|
||||||
|
if (DARWIN)
|
||||||
|
set_target_properties(${DSO_TARGET} PROPERTIES
|
||||||
|
BUILD_WITH_INSTALL_RPATH 1
|
||||||
|
INSTALL_NAME_DIR "@executable_path/../Resources"
|
||||||
|
)
|
||||||
|
endif(DARWIN)
|
||||||
|
|
||||||
|
endmacro(ll_stage_sharedlib)
|
||||||
29
install.xml
29
install.xml
@@ -562,6 +562,35 @@
|
|||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
|
<key>google_breakpad</key>
|
||||||
|
<map>
|
||||||
|
<key>license</key>
|
||||||
|
<string>bsd</string>
|
||||||
|
<key>packages</key>
|
||||||
|
<map>
|
||||||
|
<key>darwin</key>
|
||||||
|
<map>
|
||||||
|
<key>md5sum</key>
|
||||||
|
<string>723cd70d5090e448319b485b88aea379</string>
|
||||||
|
<key>url</key>
|
||||||
|
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/google_breakpad-0.0.0-rev1099-darwin-20130329.tar.bz2</uri>
|
||||||
|
</map>
|
||||||
|
<key>linux</key>
|
||||||
|
<map>
|
||||||
|
<key>md5sum</key>
|
||||||
|
<string>849241f3b638ee90b553a2ef6346107c</string>
|
||||||
|
<key>url</key>
|
||||||
|
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/google_breakpad-0.0.0-rev1099-linux-20130329.tar.bz2</uri>
|
||||||
|
</map>
|
||||||
|
<key>windows</key>
|
||||||
|
<map>
|
||||||
|
<key>md5sum</key>
|
||||||
|
<string>7c33a10f132864f8492fd9ef9b6a4ccc</string>
|
||||||
|
<key>url</key>
|
||||||
|
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/google_breakpad-0.0.0-rev1099-windows-20130813.tar.bz2</uri>
|
||||||
|
</map>
|
||||||
|
</map>
|
||||||
|
</map>
|
||||||
<key>gperftools</key>
|
<key>gperftools</key>
|
||||||
<map>
|
<map>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user