libcryfs/CMakeLists.txt

56 lines
2.5 KiB
CMake
Raw Normal View History

# 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)
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
add_subdirectory(vendor)
2016-02-11 16:39:42 +01:00
add_subdirectory(gitversion)
add_subdirectory(src)
add_subdirectory(test)
2015-10-26 20:44:00 +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}
DESTINATION bin
CONFIGURATIONS Release)
2015-10-26 20:14:41 +01:00
2015-11-22 04:06:27 +01:00
SET(CPACK_GENERATOR TGZ DEB RPM)
SET(CPACK_PACKAGE_NAME "cryfs")
SET(CPACK_PACKAGE_VERSION "${GITVERSION_VERSION_STRING}")
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>")
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")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "fuse")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.cryfs.org")
SET(CPACK_RPM_PACKAGE_LICENSE "LGPLv3")
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
INCLUDE(CPack)