1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
cmake_minimum_required(VERSION 3.8...3.12 FATAL_ERROR)
project(QtVTKTouchscreenRenderWindows)
find_package(VTK
COMPONENTS
CommonCore
GUISupportQt
IOImage
ImagingColor
ImagingGeneral
InteractionImage
InteractionStyle
InteractionWidgets)
if (NOT VTK_FOUND)
message("Skipping example: ${VTK_NOT_FOUND_MESSAGE}")
return ()
endif ()
find_package(Qt5 COMPONENTS Widgets)
if (NOT TARGET Qt5::Widgets)
message("Skipping example: ${Qt5_NOT_FOUND_MESSAGE}")
return ()
endif ()
# Set your files and resources here
set(Srcs
QtVTKTouchscreenRenderWindowsApp.cxx
QtVTKTouchscreenRenderWindows.cxx)
set(Hdrs
QtVTKTouchscreenRenderWindows.h)
set(UIs
QtVTKTouchscreenRenderWindows.ui)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
# CMAKE_AUTOMOC in ON so the MocHdrs will be automatically wrapped.
qt5_wrap_ui(UI_Srcs ${UIs})
add_executable(QtVTKTouchscreenRenderWindows
${Srcs} ${Hdrs} ${UI_Srcs})
target_link_libraries(QtVTKTouchscreenRenderWindows
PRIVATE
${VTK_LIBRARIES}
Qt5::Widgets)
vtk_module_autoinit(
TARGETS QtVTKTouchscreenRenderWindows
MODULES ${VTK_LIBRARIES})
|