diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-11-20 12:05:03 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-11-20 12:05:03 +0100 |
commit | 34f01b90e37605b00e21022b300e33f74f3b5db4 (patch) | |
tree | e6af125739694360d1c317a098fc2c4bb355db75 | |
parent | 7b91ad84584b4c61a5315731436675aae7d2fcb2 (diff) |
Fixed CMake warnings
* `make dist`: improved libnDPI git version naming
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rwxr-xr-x | scripts/make-dist.sh | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 97939faa5..5401c6c01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,15 +211,17 @@ add_dependencies(nDPId umask_check) add_custom_target(dist) add_custom_command( TARGET dist + PRE_BUILD COMMAND "${CMAKE_SOURCE_DIR}/scripts/make-dist.sh" ) add_custom_target(daemon) add_custom_command( - TARGET daemon + TARGET daemon + POST_BUILD COMMAND env nDPIsrvd_ARGS='-C 1024' "${CMAKE_SOURCE_DIR}/scripts/daemon.sh" "$<TARGET_FILE:nDPId>" "$<TARGET_FILE:nDPIsrvd>" - DEPENDS nDPId nDPIsrvd ) +add_dependencies(daemon nDPId nDPIsrvd) if(CMAKE_CROSSCOMPILING) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) diff --git a/scripts/make-dist.sh b/scripts/make-dist.sh index 67578e504..921eacb54 100755 --- a/scripts/make-dist.sh +++ b/scripts/make-dist.sh @@ -19,7 +19,7 @@ fi git submodule update --init ./libnDPI NDPID_GIT_VERSION="$(git describe --tags || printf '%s' 'unknown')" cd ./libnDPI && \ - LIBNDPI_GIT_VERSION="$(git describe --tags || printf '%s' 'unknown')" && \ + LIBNDPI_GIT_VERSION="$(git tag --list '[0-9].[0-9]' | tail -n1 || printf '%s' 'unknown')-$(git rev-parse --short HEAD)" && \ printf '%s\n' "Creating $(realpath ./libnDPI-${LIBNDPI_GIT_VERSION}.tar)" && \ git archive --prefix="nDPId-${NDPID_GIT_VERSION}/libnDPI/" -o "../libnDPI-${LIBNDPI_GIT_VERSION}.tar" HEAD && \ cd .. |