CMake: add dist target, sysconfdir default, requirement for librepo
This commit is contained in:
parent
82e1d7238e
commit
88492caec4
@ -4,6 +4,10 @@ cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
|
|||||||
|
|
||||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||||
|
|
||||||
|
if (NOT SYSCONF_INSTALL_DIR)
|
||||||
|
set(SYSCONF_INSTALL_DIR "/etc")
|
||||||
|
endif()
|
||||||
|
|
||||||
file (STRINGS "VERSION" VERSION)
|
file (STRINGS "VERSION" VERSION)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
@ -14,3 +18,9 @@ install(
|
|||||||
FILES distromatic.conf
|
FILES distromatic.conf
|
||||||
DESTINATION ${SYSCONF_INSTALL_DIR}
|
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)
|
||||||
|
@ -5,6 +5,7 @@ find_package(Threads REQUIRED)
|
|||||||
pkg_check_modules(RPM REQUIRED rpm)
|
pkg_check_modules(RPM REQUIRED rpm)
|
||||||
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
|
pkg_check_modules(SQLITE3 REQUIRED sqlite3)
|
||||||
pkg_check_modules(LIBUNWIND REQUIRED libunwind)
|
pkg_check_modules(LIBUNWIND REQUIRED libunwind)
|
||||||
|
pkg_check_modules(LIBREPO REQUIRED librepo)
|
||||||
pkg_check_modules(LIBDW REQUIRED libdw)
|
pkg_check_modules(LIBDW REQUIRED libdw)
|
||||||
pkg_check_modules(LIBXML2 REQUIRED libxml-2.0)
|
pkg_check_modules(LIBXML2 REQUIRED libxml-2.0)
|
||||||
find_library(LIBIBERTY NAMES iberty)
|
find_library(LIBIBERTY NAMES iberty)
|
||||||
|
Loading…
Reference in New Issue
Block a user