Changeset 19208


Ignore:
Timestamp:
09/03/18 15:28:04 (6 years ago)
Author:
tbretz
Message:
Added a simple way to produce a binary package containing the mars environment.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/CMakeLists.txt

    r19085 r19208  
    176176        ROOT_GENERATE_DICTIONARY(dictionary/${_CINT} ${_HEADERS} ${_CINT}Incl.h LINKDEF ${_CINT}LinkDef.h OPTIONS -p)
    177177        TARGET_SOURCES(mars PRIVATE dictionary/${_CINT}.cxx ${_SRCLIST})
     178
     179        INSTALL(DIRECTORY ${subdir}/ DESTINATION "include" FILES_MATCHING PATTERN "*.h")
    178180
    179181ENDMACRO()
     
    265267#ADD_EXECUTABLE(Main MainEvent.cxx)
    266268#TARGET_LINK_LIBRARIES(Main Event)
     269
     270
     271# *********************************
     272# ************ Packaging **********
     273# *********************************
     274
     275#SET(PKG_SHARE    "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}")
     276#SET(PKG_APPS     "${CMAKE_INSTALL_DATAROOTDIR}/applications")
     277#SET(PKG_PIXMAPS  "${CMAKE_INSTALL_DATAROOTDIR}/pixmaps")
     278
     279# ====== Installation targets =====
     280
     281#INSTALL(TARGETS  mars           DESTINATION "${CMAKE_INSTALL_BINDIR}")
     282INSTALL(TARGETS   mars         DESTINATION ".")
     283INSTALL(FILES     .rootrc      DESTINATION ".")
     284INSTALL(FILES     marslogo.xpm DESTINATION ".")
     285INSTALL(DIRECTORY macros       DESTINATION "." FILES_MATCHING PATTERN "*.C")
     286INSTALL(DIRECTORY fact         DESTINATION "." FILES_MATCHING PATTERN "*.C")
     287INSTALL(DIRECTORY datacenter   DESTINATION ".")
     288INSTALL(DIRECTORY scripts      DESTINATION ".")
     289INSTALL(DIRECTORY resources    DESTINATION "." FILES_MATCHING PATTERN "*.rc" PATTERN "*.txt")
     290INSTALL(DIRECTORY resmc        DESTINATION "." FILES_MATCHING PATTERN "*" )
     291INSTALL(DIRECTORY mcore/       DESTINATION "include" FILES_MATCHING PATTERN "*.h")
     292
     293
     294# ======== General packaging ======
     295# https://cmake.org/cmake/help/latest/module/CPack.html
     296
     297INCLUDE(InstallRequiredSystemLibraries)
     298
     299# SET(CPACK_STRIP_FILES ON) # Strip debug sysmbold from files
     300
     301SET(CPACK_PACKAGE_VERSION       "${mars_VERSION}")
     302SET(CPACK_PACKAGE_CONTACT       "${PACKAGE_BUGREPORT}")
     303SET(CPACK_PACKAGE_MAINTAINER    "${PACKAGE_MAINTAINER}")
     304#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
     305#SET(CPACK_PACKAGE_VENDOR "Me, myself, and I")
     306
     307
     308SET(CPACK_SOURCE_IGNORE_FILES "/old/;/build/;/[.].*/;/autom4te[.]cache/;.*~;.log$")
     309
     310# Maybe the text displayed in synaptic?
     311#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
     312SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MARS - Environment")
     313#CPACK_RESOURCE_FILE_README     ReadMe file to be embedded in the installer.
     314
     315SET(CPACK_GENERATOR        TBZ2) # TGZ DEB
     316#SET(CPACK_SOURCE_GENERATOR TBZ2) # TGZ
     317#SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/cmake/Package.txt)
     318#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
     319
     320
     321# ======== Debian packaging =======
     322# https://cmake.org/cmake/help/latest/module/CPackDeb.html
     323# https://www.debian.org/doc/debian-policy
     324
     325#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libao4 (>=1.0), libsfm-system2.3v5 (>=2.3), libsfml-graphicsv2.3v5 (>=2.3), libsfml-audio2.3v5 (>=2.3), libsfm-window2.3v5 (>2.3)")
     326SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS 1) # generate better (atomatic?) dependecies
     327SET(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")
     328SET(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION TRUE)
     329SET(CPACK_DEBIAN_PACKAGE_SECTION utils)
     330SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${PACKAGE_URL}")
     331SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION
     332"${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
     333 This package contains the MARS Analysis Environment.")
     334#indent the long description with spaces
     335
     336#CPACK_INSTALL_CMAKE_PROJECTS
     337#List of four values that specify what project to install. Build directory, Project Name, Project Component, Directory.
     338
     339INCLUDE(CPack)
Note: See TracChangeset for help on using the changeset viewer.