You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

104 lines
3.6 KiB

CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
PROJECT(Bibellese)
# Versionsnummer (wird in config.h.in eingebunden)
SET (VERSION_MAJOR 1)
SET (VERSION_MINOR 9)
SET (VERSION_PATCH 1)
CMAKE_POLICY(SET CMP0020 NEW)
# requirements
FIND_PACKAGE(Qt5Core REQUIRED)
FIND_PACKAGE(Qt5Widgets REQUIRED)
#IF(UNIX)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(LIBICAL libical)
#ENDIF(UNIX)
SET(Boost_USE_STATIC_LIBS ON)
FIND_PACKAGE(Boost 1.48.0 COMPONENTS date_time filesystem system REQUIRED)
ADD_DEFINITIONS(-std=c++14)
SET(bibellese_SHARE bibellese.desktop)
ADD_SUBDIRECTORY(src)
FILE(COPY ${PROJECT_SOURCE_DIR}/data DESTINATION ${CMAKE_BINARY_DIR})
IF (UNIX)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION share/bibellese)
INSTALL(FILES ${bibellese_SHARE} DESTINATION share/applications)
ENDIF (UNIX)
IF (WIN32)
INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/data DESTINATION .)
SET(MY_MINGW_DIR "/usr/x86_64-w64-mingw32")
IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
SET(MY_MINGW_DIR "/usr/i686-w64-mingw32")
INSTALL(FILES ${MY_MINGW_DIR}/bin/libgcc_s_sjlj-1.dll DESTINATION .)
ELSE()
INSTALL(FILES ${MY_MINGW_DIR}/bin/libgcc_s_seh-1.dll DESTINATION .)
ENDIF()
INSTALL(FILES ${MY_MINGW_DIR}/bin/Qt5Core.dll
${MY_MINGW_DIR}/bin/Qt5Gui.dll
${MY_MINGW_DIR}/bin/Qt5Widgets.dll
${MY_MINGW_DIR}/bin/libstdc++-6.dll
${MY_MINGW_DIR}/bin/libwinpthread-1.dll
${MY_MINGW_DIR}/bin/libicuin56.dll
${MY_MINGW_DIR}/bin/libical.dll
${MY_MINGW_DIR}/bin/libpcre16-0.dll
${MY_MINGW_DIR}/bin/zlib1.dll
${MY_MINGW_DIR}/bin/libicuuc56.dll
${MY_MINGW_DIR}/bin/libGLESv2.dll
${MY_MINGW_DIR}/bin/libharfbuzz-0.dll
${MY_MINGW_DIR}/bin/libpng16-16.dll
${MY_MINGW_DIR}/bin/libicudt56.dll
${MY_MINGW_DIR}/bin/libfreetype-6.dll
${MY_MINGW_DIR}/bin/libglib-2.0-0.dll
${MY_MINGW_DIR}/bin/libbz2-1.dll
${MY_MINGW_DIR}/bin/libintl-8.dll
${MY_MINGW_DIR}/bin/libpcre-1.dll
${MY_MINGW_DIR}/bin/libiconv-2.dll
DESTINATION bin)
INSTALL(FILES ${MY_MINGW_DIR}/lib/qt/plugins/platforms/qwindows.dll
DESTINATION bin/platforms)
# INSTALL(FILES ${MY_MINGW_DIR}/translations/qt_de.qm
# ${MY_MINGW_DIR}/translations/qtbase_de.qm
# ${MY_QTLIB_DIR}/translations/qtdeclarative_de.qm
# ${MY_QTLIB_DIR}/translations/qtmultimedia_de.qm
# ${MY_QTLIB_DIR}/translations/qtquick1_de.qm
# ${MY_QTLIB_DIR}/translations/qtscript_de.qm
# ${MY_QTLIB_DIR}/translations/qtxmlpatterns_de.qm
# DESTINATION bin/translations)
ENDIF (WIN32)
# CPack
IF (UNIX)
SET(CPACK_SOURCE_GENERATOR "TBZ2")
SET(CPACK_GENERATOR "RPM;DEB")
#SET(CPACK_RPM_PACKAGE_LICENSE "GPL")
#SET(CPACK_DEBIAN_PACKAGE_LICENSE "GPL")
ENDIF (UNIX)
IF (WIN32)
SET(CPACK_SOURCE_GENERATOR "ZIP")
SET(CPACK_GENERATOR "NSIS;ZIP")
ENDIF (WIN32)
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Bibellese")
SET(CPACK_STRIP_FILES TRUE)
SET(CPACK_SOURCE_STRIP_FILES TRUE)
SET(CPACK_PACKAGE_EXECUTABLES "bibellese" "Bibellese")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Erstellt Bibel-Lesepläne nach dem ÖAB und nach der Jahresbibel")
SET(CPACK_PACKAGE_VENDOR "Martin Brodbeck")
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_SOURCE_IGNORE_FILES "/.git/")
SET(CPACK_PACKAGE_CONTACT "Martin Brodbeck <martin@brodbeck-online.de>")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/applications")
INCLUDE(CPack)
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST TRUE)