source: trunk/tmdmcreator/build/cmake/create_installer.cmake @ 40

Revision 40, 1.7 KB checked in by lucsch, 11 years ago (diff)

Adding CPACK installer to TmDMCreator

Line 
1
2FIND_PACKAGE(Subversion)
3IF(Subversion_FOUND)
4  Subversion_WC_INFO(${PROJECT_SOURCE_DIR} MY)
5  MESSAGE("Current revision is ${MY_WC_REVISION}")
6ENDIF(Subversion_FOUND)
7
8install(
9  TARGETS ${CMAKE_PROJECT_NAME}
10  BUNDLE DESTINATION .
11  RUNTIME DESTINATION bin
12)
13
14SET (SOFT_NUMBER ${MY_WC_REVISION})
15MESSAGE ("${SOFT_NUMBER} number")
16
17SET(CPACK_PACKAGE_VENDOR "crealp")
18SET(CPACK_PACKAGE_VERSION_MAJOR "1")
19SET(CPACK_PACKAGE_VERSION_MINOR "0")
20SET(CPACK_PACKAGE_VERSION_PATCH "${SOFT_NUMBER}")
21SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "TmDmCreator. Create ToolMap datamodels from the command line.")
22
23# APPLE ONLY CODE
24#IF (APPLE)
25#  INSTALL(FILES "../install/osx/osx_readme.pdf" DESTINATION .)
26#  SET(CPACK_PACKAGE_VERSION "1")
27#  SET(CPACK_GENERATOR "DragNDrop")
28#  SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_r${CPACK_PACKAGE_VERSION_PATCH}")
29#  SET(CPACK_DMG_VOLUME_NAME "${CMAKE_PROJECT_NAME}")
30#  SET(CPACK_DMG_FORMAT "UDBZ")
31#ENDIF (APPLE)
32
33# WINDOWS CODE ONLY (NSIS)
34IF (WIN32)
35  #SET(CPACK_RESOURCE_FILE_LICENSE 0)
36  SET (CPACK_GENERATOR "NSIS")
37  SET (CPACK_NSIS_COMPRESSOR "lzma")
38  SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-setup_r${CPACK_PACKAGE_VERSION_PATCH}")
39  SET (CPACK_PACKAGE_INSTALL_DIRECTORY ${CMAKE_PROJECT_NAME})
40  SET (CPACK_NSIS_CONTACT "Lucien Schreiber lucien.schreiber@crealp.vs.ch")
41  SET (CPACK_NSIS_HELP_LINK "www.crealp.ch")
42  SET (CPACK_NSIS_MODIFY_PATH ON)
43  #SET (CPACK_NSIS_MUI_FINISHPAGE_RUN ${CMAKE_PROJECT_NAME})
44  SET (CPACK_NSIS_URL_INFO_ABOUT "www.crealp.ch")
45  #SET (CPACK_NSIS_MENU_LINKS
46  # "bin/${SHPCROP}" "${SHPCROP}"
47  # "http://www.crealp.ch" "www.crealp.ch")
48ENDIF(WIN32)
49
50# including cpack isn't working with Linux
51IF(APPLE OR WIN32)
52  INCLUDE(CPACK)
53ENDIF()
54
Note: See TracBrowser for help on using the repository browser.