1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 09:29:52 +03:00

CMake: Build hamcore.se2 only when related files change

Previously, the file was rebuilt even if no changes were made to the source files.
This commit is contained in:
Davide Beatrici 2021-02-27 20:52:44 +01:00
parent 621fb087f8
commit 0a924aea4d

View File

@ -144,9 +144,15 @@ add_subdirectory(vpntest)
# hamcore.se2 archive file
add_custom_target(hamcore-archive-build
ALL
COMMAND hamcorebuilder "${BUILD_DIRECTORY}/hamcore.se2" "${TOP_DIRECTORY}/src/bin/hamcore"
DEPENDS hamcorebuilder
DEPENDS "${BUILD_DIRECTORY}/hamcore.se2"
)
add_custom_command(
COMMENT "Building hamcore.se2 archive file..."
COMMAND hamcorebuilder "hamcore.se2" "${TOP_DIRECTORY}/src/bin/hamcore"
DEPENDS hamcorebuilder "${TOP_DIRECTORY}/src/bin/hamcore/"
OUTPUT "${BUILD_DIRECTORY}/hamcore.se2"
WORKING_DIRECTORY "${BUILD_DIRECTORY}"
VERBATIM
)