Commit e9b7e897 authored by François Grisez's avatar François Grisez

Add CPack targets for source package generation

parent 4d3c8e6a
......@@ -22,12 +22,8 @@
############################################################################
cmake_minimum_required(VERSION 3.0)
project(BELCARD C CXX)
project(BELCARD VERSION 1.0.1 LANGUAGES C CXX)
set(BELCARD_MAJOR_VERSION "1")
set(BELCARD_MINOR_VERSION "0")
set(BELCARD_MICRO_VERSION "1")
set(BELCARD_VERSION "${BELCARD_MAJOR_VERSION}.${BELCARD_MINOR_VERSION}.${BELCARD_MICRO_VERSION}")
set(BELCARD_SO_VERSION "1")
option(ENABLE_SHARED "Build shared library." ON)
......@@ -158,3 +154,16 @@ install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BelcardConfig.cmake"
DESTINATION ${ConfigPackageLocation}
)
# CPack settings
set(CPACK_PACKAGE_NAME "belcard")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
set(CPACK_SOURCE_IGNORE_FILES
"^${CMAKE_BINARY_DIR}"
"/\\\\..+"
)
include(CPack)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment