summaryrefslogtreecommitdiffstats
path: root/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt')
-rw-r--r--cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
index 368567c708..4fd442e82c 100644
--- a/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
+++ b/cmake/QtBuildInternals/QtStandaloneTestTemplateProject/CMakeLists.txt
@@ -15,5 +15,14 @@ else()
set(absolute_project_path "${QT_STANDALONE_TEST_PATH}")
endif()
+if(NOT IS_DIRECTORY "${absolute_project_path}")
+ get_filename_component(filename "${absolute_project_path}" NAME)
+ get_filename_component(directory "${absolute_project_path}" DIRECTORY)
+
+ if(filename STREQUAL "CMakeLists.txt")
+ set(absolute_project_path "${directory}")
+ endif()
+endif()
+
# Add the test project path as a subdirectory project.
add_subdirectory("${absolute_project_path}" "build_dir")