1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
SET(SRCS
src/main.cpp
src/PerspectiveItemWidget.cpp
src/PluginErrorReport.cpp
src/PluginsCenter.cpp
src/PluginInformationListItem.cpp
src/TulipMainWindow.cpp
src/TulipSplashScreen.cpp
src/TulipWelcomePage.cpp
src/TulipPerspectiveProcessHandler.cpp
src/TulipPerspectiveCrashHandler.cpp
src/FormPost.cpp
src/PerspectiveSelectionDialog.cpp
)
QTX_SET_INCLUDES_AND_DEFINITIONS()
QTX_WRAP_UI(UI_HEADERS
designer/PerspectiveItem.ui
designer/PluginsCenter.ui
designer/TulipMainWindow.ui
designer/TulipWelcomePage.ui
designer/PluginInformationListItem.ui
designer/TulipPerspectiveCrashHandler.ui
designer/PerspectiveSelectionDialog.ui
)
IF(TULIP_BUILD_PYTHON_COMPONENTS)
ADD_DEFINITIONS("-DTULIP_BUILD_PYTHON_COMPONENTS")
ENDIF(TULIP_BUILD_PYTHON_COMPONENTS)
QTX_WRAP_CPP(MOC_SRCS
include/PerspectiveItemWidget.h
include/PluginErrorReport.h
include/PluginsCenter.h
include/TulipMainWindow.h
include/TulipWelcomePage.h
include/PluginInformationListItem.h
include/TulipPerspectiveProcessHandler.h
include/TulipPerspectiveCrashHandler.h
include/FormPost.h
include/PerspectiveSelectionDialog.h
)
QTX_ADD_RESOURCES(RCC_SRCS resources/TulipAgent.qrc)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../crash_handling)
INCLUDE_DIRECTORIES(include ${CMAKE_CURRENT_BINARY_DIR} ${TulipCoreBuildInclude} ${TulipCoreInclude} ${TulipOGLInclude} ${TulipGUIInclude})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
IF(WIN32)
STRING(TIMESTAMP CURRENT_YEAR "%Y")
INCLUDE(generate_product_version)
generate_product_version(
VersionFiles
NAME "Tulip Agent"
ICON ${PROJECT_SOURCE_DIR}/library/tulip-gui/resources/icons/tulip.ico
VERSION_MAJOR ${TulipMajorVersion}
VERSION_MINOR ${TulipMinorVersion}
VERSION_PATCH ${TulipReleaseVersion}
COMPANY_NAME "LaBRI, University of Bordeaux"
COMPANY_COPYRIGHT "(C) Copyright ${CURRENT_YEAR} David Auber and the Tulip development Team"
ORIGINAL_FILENAME "tulip.exe"
)
SET(SRCS ${SRCS} ${VersionFiles})
ENDIF(WIN32)
ADD_EXECUTABLE(tulip ${SRCS} ${UI_HEADERS} ${MOC_SRCS} ${RCC_SRCS})
TARGET_LINK_LIBRARIES(tulip crash_handling ${LibTulipCoreName} ${LibTulipOGLName} ${LibTulipGUIName} ${QT_LIBRARIES})
INSTALL(TARGETS tulip
RUNTIME DESTINATION ${TulipBinInstallDir} COMPONENT tulip_app
LIBRARY DESTINATION ${TulipLibInstallDir} COMPONENT tulip_app
ARCHIVE DESTINATION ${TulipLibInstallDir} COMPONENT tulip_app)
IF(LINUX)
SET(TULIP_LINUX_DESKTOP_REGISTRATION ON CACHE BOOL "Register Tulip application and set file associations on Linux desktops ? [ON|OFF]")
IF(TULIP_LINUX_DESKTOP_REGISTRATION)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/Tulip.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/Tulip-${TulipVersion}.desktop)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpx.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlp.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpgz.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpz.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpb.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpbgz.xml
${CMAKE_CURRENT_SOURCE_DIR}/resources/linux_desktop/application-x-tulip-tlpbz.xml
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/mime/packages)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/Tulip-${TulipVersion}.desktop
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/applications)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/tulip-icon.png
RENAME tulip.png
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/pixmaps)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/tulip-file-icon.png
RENAME application-x-tulip.png
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/pixmaps)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/tulip-icon.png
RENAME tulip.png
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/icons)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/tulip-file-icon.png
RENAME application-x-tulip.png
DESTINATION ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/icons)
INSTALL(CODE
"EXECUTE_PROCESS(COMMAND update-desktop-database ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/applications
COMMAND update-mime-database ${DESKTOP_CONFIG_INSTALL_PREFIX}/share/mime
OUTPUT_QUIET ERROR_QUIET)"
)
ENDIF(TULIP_LINUX_DESKTOP_REGISTRATION)
ENDIF(LINUX)
|