r19176 by craig - Better version checking/building
scribus-commit
scribus-commit at lists.scribus.net
Mon Jun 2 22:27:21 UTC 2014
Author: craig
Date: Mon Jun 2 22:27:21 2014
New Revision: 19176
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19176
Log:
Better version checking/building
Modified:
trunk/Scribus/scribus/CMakeLists.txt
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19176&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Mon Jun 2 22:27:21 2014
@@ -1,11 +1,24 @@
-add_custom_target(svnheader ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h)
-add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h
+#add_custom_target(svnheader ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h)
+#add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h
+# COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
+# -P ${CMAKE_MODULE_PATH}/getsvn.cmake)
+#set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
+# PROPERTIES GENERATED TRUE
+# HEADER_FILE_ONLY TRUE)
+
+
+# a custom target that is always built
+add_custom_target(svnheader ALL
+ DEPENDS svn_header ) # svn_header is nothing more than a unique string
+
+# creates svnheader.h using cmake script
+add_custom_command(OUTPUT svn_header ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-P ${CMAKE_MODULE_PATH}/getsvn.cmake)
+
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)
-
IF(WIN32)
ADD_DEFINITIONS(-DQT_DLL)
More information about the scribus-commit
mailing list