diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c53b3b..4cbe091 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,10 @@ cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR) set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") +if (NOT SYSCONF_INSTALL_DIR) + set(SYSCONF_INSTALL_DIR "/etc") +endif() + file (STRINGS "VERSION" VERSION) add_subdirectory(src) @@ -14,3 +18,9 @@ install( FILES distromatic.conf DESTINATION ${SYSCONF_INSTALL_DIR} ) + +set(CPACK_SOURCE_GENERATOR "TBZ2") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${VERSION}") +set(CPACK_SOURCE_IGNORE_FILES "/build/;/.git/") +include(CPack) +add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 41feb4b..5133577 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,7 @@ find_package(Threads REQUIRED) pkg_check_modules(RPM REQUIRED rpm) pkg_check_modules(SQLITE3 REQUIRED sqlite3) pkg_check_modules(LIBUNWIND REQUIRED libunwind) +pkg_check_modules(LIBREPO REQUIRED librepo) pkg_check_modules(LIBDW REQUIRED libdw) pkg_check_modules(LIBXML2 REQUIRED libxml-2.0) find_library(LIBIBERTY NAMES iberty)