summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-07-10 14:46:48 -0400
committerBrad King <brad.king@kitware.com>2003-07-10 14:46:48 -0400
commitdda94a969339b1ae05c2eb4b2cc20a0b0b617e7e (patch)
tree7fc83d22665c609e30fa198a4b6d836ac1210d7d /Source
parent45ea83a694d148bbf1da6b7e3405078b3a0ab020 (diff)
downloadcmake-dda94a969339b1ae05c2eb4b2cc20a0b0b617e7e.tar.gz
ERR: Generated source files need access to kwsysPrivate.h. Just copy it to the build tree.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 6f0b9fea1f..33861f475a 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -96,6 +96,14 @@ IF(NOT EXECUTABLE_OUTPUT_PATH)
"Output directory for executables.")
ENDIF(NOT EXECUTABLE_OUTPUT_PATH)
+# Generated source files will need this header.
+STRING(COMPARE EQUAL "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}"
+ KWSYS_IN_SOURCE_BUILD)
+IF(NOT KWSYS_IN_SOURCE_BUILD)
+ CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/kwsysPrivate.h
+ ${PROJECT_BINARY_DIR}/kwsysPrivate.h COPY_ONLY IMMEDIATE)
+ENDIF(NOT KWSYS_IN_SOURCE_BUILD)
+
#-----------------------------------------------------------------------------
# We require ANSI support from the C compiler. Add any needed flags.
IF(CMAKE_ANSI_CFLAGS)
@@ -238,9 +246,10 @@ IF(KWSYS_USE_Process)
IF(NOT UNIX)
# Use the Windows implementation. We need the encoded forwarding executable.
SET(KWSYS_SRCS ${KWSYS_SRCS} ProcessWin32.c
- ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c)
- SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
- PROPERTIES GENERATED 1)
+ ${PROJECT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c)
+ SET_SOURCE_FILES_PROPERTIES(
+ ${PROJECT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
+ PROPERTIES GENERATED 1)
ELSE(NOT UNIX)
# Use the UNIX implementation.
SET(KWSYS_SRCS ${KWSYS_SRCS} ProcessUNIX.c)