Skip to content

Commit

Permalink
Fixed CMake warnings
Browse files Browse the repository at this point in the history
 * `make dist`: improved libnDPI git version naming

Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Nov 20, 2024
1 parent 7b91ad8 commit 34f01b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/make-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand Down

0 comments on commit 34f01b9

Please sign in to comment.