diff options
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/utils/config.h (renamed from src/utils/config.h.in) | 19 | ||||
-rw-r--r-- | src/utils/lib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/utils/libsmartcols/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/utils/sys-utils/CMakeLists.txt | 3 |
5 files changed, 15 insertions, 20 deletions
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index cfc5548..f3ea912 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -4,15 +4,11 @@ cmake_minimum_required(VERSION 3.10) project(xloop-utils) # include global headers -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) - -# prepare date for configuring config.h -string(TIMESTAMP DATE "%d-%b-%Y") +include_directories(${PROJECT_INCLUDE_GEN_DIR}) # configure configuration config.h and add it to each source file -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) -add_compile_options(-include ${CMAKE_CURRENT_BINARY_DIR}/config.h) +add_compile_options(-include ${CMAKE_CURRENT_SOURCE_DIR}/config.h) # add xloop specific compile options add_definitions(-DCONFIG_BLK_DEV_XLOOP_MIN_COUNT=${BLK_DEV_XLOOP_MIN_COUNT} -DXLOOP_MAJOR=${XLOOP_MAJOR}) diff --git a/src/utils/config.h.in b/src/utils/config.h index 40b8d34..781ddc7 100644 --- a/src/utils/config.h.in +++ b/src/utils/config.h @@ -1,6 +1,8 @@ /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ +#include <xloop/version.h> + /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ @@ -693,20 +695,17 @@ /* Define to 1 if you have the `__secure_getenv' function. */ /* #undef HAVE___SECURE_GETENV */ -/* libblkid date string */ -#define LIBBLKID_DATE "@DATE@" - /* libblkid version string */ -#define LIBBLKID_VERSION "@VERSION@" +#define LIBBLKID_VERSION XLOOP_VERSION /* libfdisk version string */ -#define LIBFDISK_VERSION "@VERSION@" +#define LIBFDISK_VERSION XLOOP_VERSION /* libmount version string */ -#define LIBMOUNT_VERSION "@VERSION@" +#define LIBMOUNT_VERSION XLOOP_VERSION /* libsmartcols version string */ -#define LIBSMARTCOLS_VERSION "@VERSION@" +#define LIBSMARTCOLS_VERSION XLOOP_VERSION /* Should login chown /dev/vcsN? */ /* #undef LOGIN_CHOWN_VCS */ @@ -736,7 +735,7 @@ #define PACKAGE_NAME "util-linux" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "util-linux @VERSION@" +#define PACKAGE_STRING ("util-linux " XLOOP_VERSION) /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "util-linux" @@ -745,7 +744,7 @@ #define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "@VERSION@" +#define PACKAGE_VERSION XLOOP_VERSION /* Should pg ring the bell on invalid keys? */ #define PG_BELL 1 @@ -848,7 +847,7 @@ /* #undef USE_VENDORDIR */ /* Version number of package */ -#define VERSION "@VERSION@" +#define VERSION XLOOP_VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ diff --git a/src/utils/lib/CMakeLists.txt b/src/utils/lib/CMakeLists.txt index e5fa459..22eafb3 100644 --- a/src/utils/lib/CMakeLists.txt +++ b/src/utils/lib/CMakeLists.txt @@ -42,3 +42,4 @@ add_library(libcommon STATIC ${CMAKE_CURRENT_SOURCE_DIR}/blkdev.c ${CMAKE_CURRENT_SOURCE_DIR}/timer.c ${CMAKE_CURRENT_SOURCE_DIR}/timeutils.c ${CMAKE_CURRENT_SOURCE_DIR}/ttyutils.c) +target_link_libraries(libcommon xloop-version) diff --git a/src/utils/libsmartcols/CMakeLists.txt b/src/utils/libsmartcols/CMakeLists.txt index c8deb72..dccb5e2 100644 --- a/src/utils/libsmartcols/CMakeLists.txt +++ b/src/utils/libsmartcols/CMakeLists.txt @@ -18,5 +18,5 @@ add_library(libsmartcols STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/buffer.c ${CMAKE_CURRENT_SOURCE_DIR}/src/table.c ${CMAKE_CURRENT_SOURCE_DIR}/src/version.c ${CMAKE_CURRENT_SOURCE_DIR}/src/walk.c) -target_include_directories(libsmartcols PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/../lib) -target_link_libraries(libsmartcols LINK_PUBLIC libcommon) +target_include_directories(libsmartcols PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) +target_link_libraries(libsmartcols LINK_PUBLIC libcommon xloop-version) diff --git a/src/utils/sys-utils/CMakeLists.txt b/src/utils/sys-utils/CMakeLists.txt index 01295d9..e05b5cf 100644 --- a/src/utils/sys-utils/CMakeLists.txt +++ b/src/utils/sys-utils/CMakeLists.txt @@ -5,8 +5,7 @@ project(xloop-utils-sys-utils) # add xlosetup executable add_executable(xlosetup ${CMAKE_CURRENT_SOURCE_DIR}/xlosetup.c) -target_link_libraries(xlosetup LINK_PUBLIC libcommon libsmartcols) -target_include_directories(xlosetup PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../lib ${CMAKE_CURRENT_SOURCE_DIR}/../libsmartcols) +target_link_libraries(xlosetup libcommon libsmartcols xloop-version) install(TARGETS xlosetup DESTINATION bin COMPONENT main) |