Add crash reporter to osx package and don't build it with BUILD_LIBRARIES_ONLY enabled

This commit is contained in:
Dominik Schmidt 2014-08-30 14:45:39 +02:00
parent ef70052b0e
commit 7ad557f2f8

View file

@ -23,6 +23,8 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
"../3rdparty/libcrashreporter-qt/src/"
)
if(NOT BUILD_LIBRARIES_ONLY)
add_executable( ${CRASHREPORTER_EXECUTABLE} WIN32
${crashreporter_SOURCES}
${crashreporter_HEADERS_MOC}
@ -30,17 +32,22 @@ add_executable( ${CRASHREPORTER_EXECUTABLE} WIN32
${crashreporter_RC_RCC}
)
qt5_use_modules(${CRASHREPORTER_EXECUTABLE} Widgets Network)
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTOMOC ON)
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES INSTALL_RPATH "${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
target_link_libraries(${CRASHREPORTER_EXECUTABLE}
crashreporter-gui
${QT_LIBRARIES}
)
#TODO: don't use automoc :-(
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES AUTOMOC ON)
set_target_properties(${CRASHREPORTER_EXECUTABLE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
if(NOT WIN32)
install(TARGETS ${CRASHREPORTER_EXECUTABLE} RUNTIME DESTINATION ${LIBEXEC_INSTALL_DIR})
if(BUILD_OWNCLOUD_OSX_BUNDLE)
install(TARGETS ${CRASHREPORTER_EXECUTABLE} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
elseif(NOT BUILD_LIBRARIES_ONLY)
install(TARGETS ${CRASHREPORTER_EXECUTABLE}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
qt5_use_modules(${CRASHREPORTER_EXECUTABLE} Widgets Network)