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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user