From c3606a6f29018562a6a77077cd0824deba5f3b16 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 28 Jul 2015 13:32:42 +0200 Subject: [PATCH] Copy plain data files to the binary directory --- CMakeLists.txt | 10 ++++++++++ include/version.h | 1 + 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 917a5247..8d744cc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() + diff --git a/include/version.h b/include/version.h index 47134512..fd4e5de0 100644 --- a/include/version.h +++ b/include/version.h @@ -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 -- 2.39.2