-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,46 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
project(digikamflowplugin | ||
VERSION 0.0.9 | ||
DESCRIPTION "a plugin add a Flow View to digikam" | ||
HOMEPAGE_URL https://github.com/cathaysia/digikamflowplugin) | ||
project( | ||
digikamflowplugin | ||
VERSION 0.1.0 | ||
DESCRIPTION "a plugin add a Flow View to digikam" | ||
HOMEPAGE_URL https://github.com/cathaysia/digikamflowplugin | ||
) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
# CMAKE_PREFIX_PATH 不应当被改变,但是这里不做强制要求 | ||
option(CMAKE_INSTALL_PREFIX "/usr/") | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | ||
include(FeatureSummary) | ||
include(CMakePrintHelpers) | ||
|
||
|
||
add_subdirectory(extern/QtFlowLayout) | ||
include_directories(extern/QtFlowLayout) | ||
add_subdirectory(src) | ||
|
||
include(InstallRequiredSystemLibraries) | ||
# set(CPACK_PACKAGE_VENDOR Z) | ||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) | ||
set(CPACK_GENERATOR "TGZ;TXZ;STGZ;RPM") | ||
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR}" "${CMAKE_PROJECT_NAME}" ALL .) | ||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/pack") | ||
|
||
set(CPACK_PACKAGE_VENDOR "cathaysia") | ||
set(CPCK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_DESCRIPTION}") | ||
set(CPACK_PROJECT_URL "${CMAKE_PROJECT_HOMEPAGE_URL}") | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
set(CPACK_PACKAGE_DIRECTORY ${CMAKE_BINARY_DIR}/pack) | ||
|
||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CMAKE_PACKAGE_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) | ||
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
set(CPACK_STRIP_FILES ON) | ||
# RPM | ||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3") | ||
set(CPACK_RPM_PACKAGE_URL ${CPACK_PROJECT_URL}) | ||
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CMAKE_PROJECT_DESCRIPTION}) | ||
# set(CPACK_RPM_PACKAGE_REQUIRES "digikam,spdlog,qt5-qtbase") | ||
|
||
include(CPack) | ||
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}) | ||
cmake_print_variables(CPACK_PACKAGE_FILE_NAME) | ||
|
||
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters