]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Copy plain data files to the binary directory
authorMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 11:32:42 +0000 (13:32 +0200)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Tue, 28 Jul 2015 11:32:42 +0000 (13:32 +0200)
CMakeLists.txt
include/version.h

index 917a5247f7142f46d19d0cb6c3a6dced1f2c8bb4..8d744cc30de1a5c2561f667184eddc17af13698b 100644 (file)
@@ -373,3 +373,13 @@ target_link_libraries(radiant
     string
     xmllib
 )
+
+if(NOT (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR))
+    # Copy data files from sources to the build directory
+    message(STATUS "Copying data files")
+    file(GLOB DATA_FILES "${CMAKE_SOURCE_DIR}/setup/data/tools/*")
+    file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}")
+    file(GLOB DATA_FILES "${CMAKE_SOURCE_DIR}/docs/*")
+    file(COPY ${DATA_FILES} DESTINATION "${CMAKE_BINARY_DIR}/docs")
+endif()
+
index 47134512ca426de70d7955ac5c7745a2a02afe5a..fd4e5de0cc0f8f0f08f4d0207af37aba524c5a61 100644 (file)
@@ -1,4 +1,5 @@
 // Makefile appends preprocessor flags instead now
+/// \todo Generate this file from cmake
 #ifndef RADIANT_VERSION
 #error no RADIANT_VERSION defined
 #endif