Skip to content

Commit

Permalink
Add version tbd for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aboseley committed May 24, 2018
1 parent 97f72c9 commit 4b56cdc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ install(TARGETS ${PROJECT_NAME}
install(FILES ${CMAKE_SOURCE_DIR}/cmake/Modules/scxmlcc_generator.cmake
DESTINATION share/cmake/Modules )

# create version header - in build folder
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/version_auto.h
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && autorevision -tsh > ${CMAKE_BINARY_DIR}/autorevision.mk
COMMAND cd ${CMAKE_BINARY_DIR} && sh ${CMAKE_CURRENT_SOURCE_DIR}/makerevision.sh || truncate -s0 version_auto.h
)


if(UNIX)
# create version header - in build folder
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/version_auto.h
COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR} && autorevision -tsh > ${CMAKE_BINARY_DIR}/autorevision.mk
COMMAND cd ${CMAKE_BINARY_DIR} && sh ${CMAKE_CURRENT_SOURCE_DIR}/makerevision.sh || truncate -s0 version_auto.h
)
else()
# do something useful on windows
FILE(WRITE ${CMAKE_BINARY_DIR}/version_auto.h "")
endif()

0 comments on commit 4b56cdc

Please sign in to comment.