Commit 74973152 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

cmake: integrate with VTK's module system

parent 491c583d
......@@ -4,7 +4,9 @@ endif ()
PROJECT(QtTesting)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
vtk_module_find_package(
PACKAGE Qt5
COMPONENTS Core Widgets)
IF(NOT DEFINED QT_TESTING_WITH_PYTHON)
OPTION(QT_TESTING_WITH_PYTHON "Enable Qt Testing with Python" OFF)
......@@ -195,18 +197,22 @@ SET(QtTesting_DEVEL_HEADERS
${QtTesting_BINARY_DIR}/QtTestingConfigure.h
)
ADD_LIBRARY(QtTesting
${QtTesting_SOURCES}
${UI_SRCS}
${RC_SRCS}
${PYTHON_SRCS}
vtk_module_add_module(vtkqttesting
SOURCES ${QtTesting_SOURCES}
${UI_SRCS}
${RC_SRCS}
${PYTHON_SRCS}
HEADERS ${QtTesting_DEVEL_HEADERS}
HEADERS_SUBDIR "vtkqttesting"
)
if (FALSE) # XXX(kitware): ParaView does this already.
# Set library name to include custom prefixes/suffixes.
set_property(TARGET QtTesting
PROPERTY OUTPUT_NAME ${QT_TESTING_CUSTOM_LIBRARY_PREFIX}QtTesting${QT_TESTING_CUSTOM_LIBRARY_SUFFIX})
endif ()
TARGET_LINK_LIBRARIES(QtTesting
TARGET_LINK_LIBRARIES(vtkqttesting
PUBLIC Qt5::Core Qt5::Widgets
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment