[vpn-devel] [PATCH] Allow building out of tree
Christian Hofstaedtler
zeha at debian.org
Mon Oct 21 18:56:18 CDT 2013
Building out of tree does not seem to work; bison, flex and gcc
abort because they can't find some source files.
Test: in a clean source tree:
mkdir obj
cd obj
cmake ..
make
diff --git a/source/iked/CMakeLists.txt b/source/iked/CMakeLists.txt
index 2e41586..0834257 100644
--- a/source/iked/CMakeLists.txt
+++ b/source/iked/CMakeLists.txt
@@ -111,7 +111,7 @@ add_custom_target( ConfParser echo "Creating Conf Parser" )
add_custom_command(
SOURCE conf.token.ll
COMMAND ${PATH_BIN_FLEX}
- ARGS -d -oconf.token.cpp conf.token.ll
+ ARGS -d -oconf.token.cpp ${CMAKE_CURRENT_SOURCE_DIR}/conf.token.ll
TARGET ConfParser
OUTPUTS conf.token.cpp )
@@ -120,7 +120,7 @@ add_custom_command(
add_custom_command(
SOURCE conf.parse.yy
COMMAND ${PATH_BIN_BISON}
- ARGS -oconf.parse.cpp conf.parse.yy
+ ARGS -oconf.parse.cpp ${CMAKE_CURRENT_SOURCE_DIR}/conf.parse.yy
TARGET ConfParser
OUTPUTS conf.parse.cpp conf.parse.hpp location.hh position.hh stack.hh )
diff --git a/source/qikea/CMakeLists.txt b/source/qikea/CMakeLists.txt
index 98682e2..efa4ee3 100644
--- a/source/qikea/CMakeLists.txt
+++ b/source/qikea/CMakeLists.txt
@@ -14,6 +14,7 @@ include_directories(
${IKE_SOURCE_DIR}/source/libidb
${IKE_SOURCE_DIR}/source/libith
${IKE_SOURCE_DIR}/source/liblog
+ ${CMAKE_CURRENT_BINARY_DIR}
${QT_INCLUDES} )
link_directories(
diff --git a/source/qikec/CMakeLists.txt b/source/qikec/CMakeLists.txt
index 4a6f1b4..cdf5f1f 100644
--- a/source/qikec/CMakeLists.txt
+++ b/source/qikec/CMakeLists.txt
@@ -16,6 +16,7 @@ include_directories(
${IKE_SOURCE_DIR}/source/libith
${IKE_SOURCE_DIR}/source/liblog
${IKE_SOURCE_DIR}/source/libip
+ ${CMAKE_CURRENT_BINARY_DIR}
${QT_INCLUDES} )
link_directories(
--
,''`. Christian Hofstaedtler <zeha at debian.org>
: :' : Debian Developer
`. `' 7D1A CFFA D9E0 806C 9C4C D392 5C13 D6DB 9305 2E03
`-
More information about the vpn-devel
mailing list