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.txt22
1 files changed, 6 insertions, 16 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
index 1429a63b1..a36cc17de 100644
--- a/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
+++ b/sources/shiboken2/ApiExtractor/tests/CMakeLists.txt
@@ -1,7 +1,3 @@
-find_package(Qt5Core)
-find_package(Qt5Gui)
-find_package(Qt5Test)
-
set(CMAKE_AUTORCC ON)
macro(declare_test testname)
@@ -13,19 +9,13 @@ macro(declare_test testname)
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}
- ${Qt5Test_INCLUDE_DIRS}
- )
- link_directories(${APIEXTRACTOR_EXTRA_LINK_DIRECTORIES})
- target_link_libraries(${testname}
- ${Qt5XmlPatterns_LIBRARIES}
- ${Qt5Test_LIBRARIES}
- ${Qt5Core_LIBRARIES}
- ${Qt5Gui_LIBRARIES}
- apiextractor)
+ target_include_directories(${testname} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${apiextractor_SOURCE_DIR}
+ )
+ target_link_libraries(${testname} PRIVATE apiextractor Qt5::Test)
add_test(${testname} ${testname})
if (INSTALL_TESTS)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${testname}