- generate gitinfo.h in the build directory, not source directory. made ldforge depend on revision_check properly

Tue, 08 Apr 2014 11:03:44 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 08 Apr 2014 11:03:44 +0300
changeset 657
5cfbf4dffebf
parent 656
2a1c204df14d
child 658
2ca8316e0109
child 710
86a19bfc34de

- generate gitinfo.h in the build directory, not source directory. made ldforge depend on revision_check properly

CMakeLists.txt file | annotate | diff | comparison | revisions
--- a/CMakeLists.txt	Sun Apr 06 01:26:04 2014 +0300
+++ b/CMakeLists.txt	Tue Apr 08 11:03:44 2014 +0300
@@ -12,8 +12,8 @@
 get_target_property (UPDATEREVISION_EXE updaterevision LOCATION)
 
 add_custom_target (revision_check ALL
-    COMMAND ${UPDATEREVISION_EXE} src/gitinfo.h
-    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+    COMMAND ${UPDATEREVISION_EXE} gitinfo.h
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
     DEPENDS updaterevision)
 
 include_directories (${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
@@ -131,4 +131,5 @@
 	${OPENGL_LIBRARIES}
 )
 
+add_dependencies (ldforge revision_check)
 install (TARGETS ldforge RUNTIME DESTINATION bin)

mercurial