diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-07-12 23:39:38 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-07-12 23:39:38 +0200 |
commit | 41ae09fe6725f8ddd6800e6cb629edc95f771840 (patch) | |
tree | b607693eff527503d68f212cee9ad2dbdd90bf06 /CMakeLists.txt | |
parent | cc8f325af1004f375c66a23c22634cfb69aee3fb (diff) | |
download | uca-ufo-41ae09fe6725f8ddd6800e6cb629edc95f771840.tar.gz uca-ufo-41ae09fe6725f8ddd6800e6cb629edc95f771840.tar.bz2 uca-ufo-41ae09fe6725f8ddd6800e6cb629edc95f771840.tar.xz uca-ufo-41ae09fe6725f8ddd6800e6cb629edc95f771840.zip |
Packaging
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ee5d82..0671aaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 2.6) -project(ucapco C) +project(ucaufo C) + +set(UCAUFO_VERSION "0.0.1") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") @@ -15,6 +18,17 @@ pkg_check_modules(PCITOOL pcitool>=0.2.0 REQUIRED) pkg_check_variable(libuca plugindir) +set(CPACK_SOURCE_GENERATOR "TBZ2") +set(CPACK_PACKAGE_CONTACT "Suren A. Chilingaryan <csa@suren.me>") +set(CPACK_PACKAGE_VERSION "${UCAUFO_VERSION}") +set(CPACK_SOURCE_IGNORE_FILES "/.git/;/.bzr/;CMakeFiles;_CPack_Packages;cmake_install.cmake;CPack.*.cmake;CMakeCache.txt;install_manifest.txt;config.h$;.pc$;Makefile;.tar.bz2$;~$;${CPACK_SOURCE_IGNORE_FILES}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}") +include(CPack) + +add_custom_target(dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_DIR}) +add_custom_target(dist DEPENDS dist_clean COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + + if (NOT DEFINED CMOSIS_SENSOR_WIDTH) set(CMOSIS_SENSOR_WIDTH "2048") endif () @@ -29,6 +43,9 @@ set(CMOSIS_SENSOR_HEIGHT ${CMOSIS_SENSOR_HEIGHT} CACHE STRING "Height of the sen configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ucaufo.spec.in + ${CMAKE_CURRENT_BINARY_DIR}/ucaufo.spec) + include_directories( ${UCA_INCLUDE_DIRS} ${PCITOOL_INCLUDE_DIRS} |