aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/CMakeLists.txt')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/CMakeLists.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
index 860a37d9d..e100ef493 100644
--- a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
@@ -4,13 +4,18 @@ find_package(Qt5Test)
find_package(Qt5Xml)
find_package(Qt5XmlPatterns)
+set(CMAKE_AUTORCC ON)
+
macro(declare_test testname)
# gone: qt4_automoc("${testname}.cpp")
- if (EXISTS "${testname}.h")
- add_executable(${testname} "${testname}.h ${testname}.cpp")
- else ()
- add_executable(${testname} "${testname}.cpp")
+ set(SOURCES "${testname}.cpp")
+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${testname}.h")
+ list(APPEND SOURCES "${testname}.h")
+ endif ()
+ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${testname}.qrc")
+ list(APPEND SOURCES "${testname}.qrc")
endif ()
+ add_executable(${testname} ${SOURCES})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${apiextractor_SOURCE_DIR}
@@ -35,8 +40,6 @@ declare_test(testabstractmetatype)
declare_test(testaddfunction)
declare_test(testarrayargument)
declare_test(testcodeinjection)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/utf8code.txt"
- "${CMAKE_CURRENT_BINARY_DIR}/utf8code.txt" COPYONLY)
declare_test(testcontainer)
declare_test(testconversionoperator)
declare_test(testconversionruletag)
@@ -68,7 +71,5 @@ declare_test(testvoidarg)
declare_test(testtyperevision)
if (NOT DISABLE_DOCSTRINGS)
declare_test(testmodifydocumentation)
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/a.xml"
- "${CMAKE_CURRENT_BINARY_DIR}/a.xml" COPYONLY)
endif()