From 295491f965403cec46c8181f263cff86a1b1fdf2 Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Fri, 15 Jan 2016 20:26:08 +0100 Subject: [PATCH] Header files stamp.h and location.h now generated in build directory --- companion/src/firmwares/opentx/simulator/CMakeLists.txt | 2 +- radio/src/tests/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/companion/src/firmwares/opentx/simulator/CMakeLists.txt b/companion/src/firmwares/opentx/simulator/CMakeLists.txt index 3922a0009..58416f866 100644 --- a/companion/src/firmwares/opentx/simulator/CMakeLists.txt +++ b/companion/src/firmwares/opentx/simulator/CMakeLists.txt @@ -2,7 +2,7 @@ today(DATE) now(TIME) git_id(GIT_STR) -configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY) +configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${CMAKE_BINARY_DIR}/radio/src/stamp.h @ONLY) set(OPENTX_SRC_FILES opentxsimulator.cpp diff --git a/radio/src/tests/CMakeLists.txt b/radio/src/tests/CMakeLists.txt index 65bd9fddb..7cd72a844 100644 --- a/radio/src/tests/CMakeLists.txt +++ b/radio/src/tests/CMakeLists.txt @@ -9,7 +9,7 @@ if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc") include(${QT_USE_FILE}) add_definitions(-DSIMU) set(TESTS_PATH ${RADIO_SRC_DIRECTORY}) - configure_file(${RADIO_SRC_DIRECTORY}/tests/location.h.in ${RADIO_SRC_DIRECTORY}/tests/location.h @ONLY) + configure_file(${RADIO_SRC_DIRECTORY}/tests/location.h.in ${CMAKE_CURRENT_SOURCE_DIR}/location.h @ONLY) foreach(FILE ${SRC}) set(RADIO_SRC ${RADIO_SRC} ../${FILE}) @@ -17,7 +17,7 @@ if(EXISTS "${GTEST_SRCDIR}/src/gtest-all.cc") file(GLOB TEST_SRC_FILES ${RADIO_SRC_DIRECTORY}/tests/*.cpp) - add_executable(gtests EXCLUDE_FROM_ALL ${TEST_SRC_FILES} ${RADIO_SRC} ../targets/simu/simpgmspace.cpp) + add_executable(gtests EXCLUDE_FROM_ALL ${TEST_SRC_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/location.h ${RADIO_SRC} ../targets/simu/simpgmspace.cpp) add_dependencies(gtests ${FIRMWARE_DEPENDENCIES} gtests-lib) target_link_libraries(gtests gtests-lib ${QT_LIBRARIES} pthread) message("Added optional gtests target")