summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutogen/MocInclude/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/MocIncludeSymlink/CMakeLists.txt4
2 files changed, 7 insertions, 3 deletions
diff --git a/Tests/QtAutogen/MocInclude/CMakeLists.txt b/Tests/QtAutogen/MocInclude/CMakeLists.txt
index 4224d2f..c62128b 100644
--- a/Tests/QtAutogen/MocInclude/CMakeLists.txt
+++ b/Tests/QtAutogen/MocInclude/CMakeLists.txt
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.16)
project(MocInclude)
-get_filename_component(CS_REAL ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
-include("${CS_REAL}/../AutogenCoreTest.cmake")
+if (NOT DEFINED AUTOGEN_CORE_TEST_CMAKE)
+ get_filename_component(AUTOGEN_CORE_TEST_CMAKE "../AutogenCoreTest.cmake" ABSOLUTE)
+endif()
+include("${AUTOGEN_CORE_TEST_CMAKE}")
# Test moc include patterns
diff --git a/Tests/QtAutogen/MocIncludeSymlink/CMakeLists.txt b/Tests/QtAutogen/MocIncludeSymlink/CMakeLists.txt
index c28616b..cf60555 100644
--- a/Tests/QtAutogen/MocIncludeSymlink/CMakeLists.txt
+++ b/Tests/QtAutogen/MocIncludeSymlink/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.16)
project(MocIncludeSymlink)
-include("../AutogenCoreTest.cmake")
+get_filename_component(AUTOGEN_CORE_TEST_CMAKE "../AutogenCoreTest.cmake" ABSOLUTE)
+include("${AUTOGEN_CORE_TEST_CMAKE}")
#
# Tests if MocInclude can be build when
@@ -65,6 +66,7 @@ macro(buildMocInclude sourceDir binaryDir)
"-DCMAKE_AUTOGEN_VERBOSE=${CMAKE_AUTOGEN_VERBOSE}"
"-DCMAKE_PREFIX_PATH:STRING=${CMAKE_PREFIX_PATH}"
"-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}"
+ "-DAUTOGEN_CORE_TEST_CMAKE:STRING=${AUTOGEN_CORE_TEST_CMAKE}"
OUTPUT_VARIABLE output
)
if (result)