Created
January 24, 2020 22:12
-
-
Save 1480c1/ee23077678c3597b935e4f16c2196d72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From facd575cd6344f559a860c5a01aa9c63c78e69f3 Mon Sep 17 00:00:00 2001 | |
From: Christopher Degawa <ccom@randomderp.com> | |
Date: Fri, 24 Jan 2020 22:07:57 +0000 | |
Subject: [PATCH] CMake: Copy source files into binary dir | |
--- | |
Project/CMake/CMakeLists.txt | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt | |
index d0d1729..ea0d422 100644 | |
--- a/Project/CMake/CMakeLists.txt | |
+++ b/Project/CMake/CMakeLists.txt | |
@@ -17,7 +17,8 @@ option(ENABLE_UNICODE "Enable unicode support" ON) | |
option(LARGE_FILES "Enable large files support" ON) | |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/Modules/") | |
-set(ZenLib_SOURCES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../Source) | |
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../Source DESTINATION .) | |
+set(ZenLib_SOURCES_PATH ${CMAKE_CURRENT_BINARY_DIR}/Source) | |
# On Windows debug library should have 'd' postfix. | |
if(WIN32) | |
@@ -105,6 +106,7 @@ set(ZenLib_SRCS | |
${ZenLib_SOURCES_PATH}/ZenLib/Format/Http/Http_Utils.cpp | |
) | |
+set_source_files_properties(${ZenLib_SRCS} ${ZenLib_HDRS} ${ZenLib_format_html_HDRS} ${ZenLib_format_http_HDRS} PROPERTIES GENERATED true) | |
add_library(zen ${ZenLib_SRCS} ${ZenLib_HDRS} ${ZenLib_format_html_HDRS} ${ZenLib_format_http_HDRS}) | |
if(ENABLE_UNICODE) | |
set(ZenLib_Unicode "yes") | |
-- | |
2.20.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment