2016-01-12 14:21:57 +01:00
# Earlier cmake versions generate .deb packages for which the package manager says they're bad quality
# and asks the user whether they really want to install it. Cmake 3.3 fixes this.
2016-02-11 16:39:42 +01:00
cmake_minimum_required ( VERSION 3.3 )
2016-01-12 14:21:57 +01:00
2016-02-11 12:04:49 +01:00
include ( utils.cmake )
2015-02-17 01:02:15 +01:00
2016-02-11 12:53:42 +01:00
require_gcc_version ( 4.8 )
2015-03-16 02:15:51 +01:00
2016-02-10 00:58:03 +01:00
add_subdirectory ( vendor )
2016-02-11 16:39:42 +01:00
add_subdirectory ( gitversion )
2016-02-10 00:58:03 +01:00
add_subdirectory ( src )
add_subdirectory ( test )
2015-10-26 20:44:00 +01:00
2016-01-12 14:21:57 +01:00
# Fix debfiles permissions. Unfortunately, git doesn't store file permissions.
# When installing the .deb package and these files have the wrong permissions, the package manager complains.
EXECUTE_PROCESS ( COMMAND /bin/bash -c "chmod 0755 ${CMAKE_CURRENT_SOURCE_DIR}/debfiles/*" )
2015-10-26 20:44:00 +01:00
INSTALL ( TARGETS ${ BII_src_main_TARGET }
D E S T I N A T I O N b i n
C O N F I G U R A T I O N S R e l e a s e )
2015-10-26 20:14:41 +01:00
2015-11-22 04:06:27 +01:00
SET ( CPACK_GENERATOR TGZ DEB RPM )
2015-10-26 22:54:17 +01:00
SET ( CPACK_PACKAGE_NAME "cryfs" )
SET ( CPACK_PACKAGE_VERSION "${GITVERSION_VERSION_STRING}" )
2016-01-12 14:21:57 +01:00
SET ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Encrypt your files and store them in the cloud." )
SET ( CPACK_PACKAGE_DESCRIPTION "CryFS encrypts your files, so you can safely store them anywhere. It works well together with cloud services like Dropbox, iCloud, OneDrive and others." )
SET ( CPACK_PACKAGE_CONTACT "Sebastian Messmer <messmer@cryfs.org>" )
2015-10-26 22:54:17 +01:00
SET ( CPACK_PACKAGE_VENDOR "Sebastian Messmer" )
SET ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
SET ( CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}" )
IF ( WIN32 AND NOT UNIX )
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
#SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
#SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\cryfs.exe")
#SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} CryFS")
#SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.cryfs.org")
#SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.cryfs.org")
#SET(CPACK_NSIS_CONTACT "messmer@cryfs.org")
#SET(CPACK_NSIS_MODIFY_PATH ON)
ELSE ( WIN32 AND NOT UNIX )
SET ( CPACK_STRIP_FILES "bin/cryfs" )
SET ( CPACK_SOURCE_STRIP_FILES "" )
ENDIF ( WIN32 AND NOT UNIX )
SET ( CPACK_PACKAGE_EXECUTABLES "cryfs" "CryFS" )
SET ( CPACK_DEBIAN_PACKAGE_SECTION "utils" )
2015-11-24 21:50:40 +01:00
SET ( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
2015-11-28 09:47:04 +01:00
SET ( CPACK_DEBIAN_PACKAGE_RECOMMENDS "fuse" )
2015-11-24 10:13:46 +01:00
2016-01-12 14:21:57 +01:00
SET ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.cryfs.org" )
2015-10-26 22:54:17 +01:00
SET ( CPACK_RPM_PACKAGE_LICENSE "LGPLv3" )
2015-12-17 19:48:56 +01:00
SET ( CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postrm" )
2015-11-23 17:42:51 +01:00
2015-10-26 22:54:17 +01:00
INCLUDE ( CPack )