[Kst] branches/work/kst/portto4/kst/cmake/src/libkstapp
Peter Kümmel
syntheticpp at gmx.net
Sat Feb 19 16:01:00 CET 2011
SVN commit 1221611 by kuemmel:
don't touch at each cmake run authors.h
M +5 -1 CMakeLists.txt
--- branches/work/kst/portto4/kst/cmake/src/libkstapp/CMakeLists.txt #1221610:1221611
@@ -8,8 +8,12 @@
set_source_files_properties(${AUTHORS} PROPERTIES GENERATED TRUE HEADER_FILE_ONLY TRUE)
file(READ ${AUTHORS} data)
string(REPLACE "\n" ";" kst_authors ${data})
-file(WRITE ${CMAKE_BINARY_DIR}/authors.h "static const char* kst_authors = \"${kst_authors}\";\n")
+file(WRITE ${CMAKE_BINARY_DIR}/authors.h.tmp "static const char* kst_authors = \"${kst_authors}\";\n")
+execute_process(COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ ${CMAKE_BINARY_DIR}/authors.h.tmp ${CMAKE_BINARY_DIR}/authors.h)
+
kst_add_library(STATIC ${CMAKE_BINARY_DIR}/authors.h ${AUTHORS})
kst_link(kstcore kstmath kstwidgets)
More information about the Kst
mailing list