aboutsummaryrefslogtreecommitdiff
path: root/test cases/cmake
diff options
context:
space:
mode:
authorSebastian Würl <s.wuerl@mailbox.org>2020-08-30 18:22:45 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-08-30 23:53:00 +0200
commit8e004afc90ee82c7e51817d8a7046a894eb90485 (patch)
tree43897649fdc7c92d610299f5367f21965d9a63b5 /test cases/cmake
parentac8cc2106f319fc93a5e38ffb88a70be09e9ee3e (diff)
downloadmeson-8e004afc90ee82c7e51817d8a7046a894eb90485.zip
meson-8e004afc90ee82c7e51817d8a7046a894eb90485.tar.gz
meson-8e004afc90ee82c7e51817d8a7046a894eb90485.tar.bz2
CMake module: Allow paths of generated CMake sources for include directories
Diffstat (limited to 'test cases/cmake')
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt9
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp3
-rw-r--r--test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest5.hpp3
3 files changed, 13 insertions, 2 deletions
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt
index 199c2e9..e27a469 100644
--- a/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/CMakeLists.txt
@@ -120,7 +120,14 @@ add_custom_command(
add_subdirectory(cpyTest ccppyyTTeesstt)
-add_library(cmModLib SHARED cmMod.cpp genTest.cpp cpyBase.cpp cpyBase.hpp cpyNext.cpp cpyNext.hpp cpyTest.cpp cpyTest.hpp cpyTest2.hpp cpyTest3.hpp)
+add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cpyTest/some/directory/cpyTest5.hpp"
+ COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/cpyTest/cpyTest5.hpp" "${CMAKE_CURRENT_BINARY_DIR}/cpyTest/some/directory/cpyTest5.hpp"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/cpyTest/cpyTest5.hpp"
+)
+include_directories("${CMAKE_CURRENT_BINARY_DIR}/cpyTest/some")
+
+add_library(cmModLib SHARED cmMod.cpp genTest.cpp cpyBase.cpp cpyBase.hpp cpyNext.cpp cpyNext.hpp cpyTest.cpp cpyTest.hpp cpyTest2.hpp cpyTest3.hpp cpyTest/some/directory/cpyTest5.hpp)
include(GenerateExportHeader)
generate_export_header(cmModLib)
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
index f762251..627b8f9 100644
--- a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest.cpp
@@ -2,7 +2,8 @@
#include "cpyTest2.hpp"
#include "cpyTest3.hpp"
#include "ccppyyTTeesstt/cpyTest4.hpp"
+#include "directory/cpyTest5.hpp"
std::string getStrCpyTest() {
- return CPY_TEST_STR_2 CPY_TEST_STR_3 CPY_TEST_STR_4;
+ return CPY_TEST_STR_2 CPY_TEST_STR_3 CPY_TEST_STR_4 CPY_TEST_STR_5;
}
diff --git a/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest5.hpp b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest5.hpp
new file mode 100644
index 0000000..3669f00
--- /dev/null
+++ b/test cases/cmake/8 custom command/subprojects/cmMod/cpyTest/cpyTest5.hpp
@@ -0,0 +1,3 @@
+#pragma once
+
+#define CPY_TEST_STR_5 " test"