1
0
mirror of https://git.familie-radermacher.ch/linux/ptouch-print.git synced 2025-12-05 19:05:26 +00:00

trying to add support for generating version info from git (does not work yet)

This commit is contained in:
Dominic Radermacher
2020-01-13 22:00:27 +01:00
parent 8655736e75
commit cd4e99b9e5
2 changed files with 52 additions and 1 deletions

View File

@@ -44,7 +44,6 @@ target_compile_definitions(ptouch-print
USING_CMAKE=1
VERSION="${VERSION}"
PACKAGE="ptouch"
)
target_include_directories(ptouch-print
@@ -59,3 +58,12 @@ target_link_libraries(ptouch-print
${GD_LIBRARIES}
${LIBUSB_LIBRARIES}
)
# Add a custom command that produces version.cpp, plus
# a dummy output that's not actually produced, in order
# to force version.cmake to always be re-run before the build
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.cpp
${CMAKE_CURRENT_BINARY_DIR}/_version.cpp
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_SOURCE_DIR}/version.cmake)