From 3fa7688830e65411c0da3173501f82a614b1b10e Mon Sep 17 00:00:00 2001 From: David Borland Date: Thu, 23 Jan 2020 20:44:07 -0500 Subject: [PATCH] Include qt svg library --- CMakeLists.txt | 11 ++++++++--- Segmentor.cxx | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6deaf9b..0aeaa4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,16 +50,21 @@ file(GLOB CXX_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vtk/*.cxx ) +set(UI_RESOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/Segmentor.qrc + ${CMAKE_CURRENT_SOURCE_DIR}/Segmentor.rc +) + if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4") qt5_wrap_ui(UISrcs ${UI_FILES} ) # CMAKE_AUTOMOC in ON so the MOC headers will be automatically wrapped. - add_executable(Segmentor MACOSX_BUNDLE ${CXX_FILES} ${UISrcs} ${QT_WRAP} Segmentor.qrc Segmentor.rc) - qt5_use_modules(Segmentor Core Gui) + add_executable(Segmentor MACOSX_BUNDLE ${CXX_FILES} ${UISrcs} ${QT_WRAP} ${UI_RESOURCES}) + qt5_use_modules(Segmentor Core Gui Svg) target_link_libraries(Segmentor ${VTK_LIBRARIES}) else() QT4_WRAP_UI(UISrcs ${UI_FILES}) QT4_WRAP_CPP(MOCSrcs ${QT_WRAP}) - add_executable(Segmentor MACOSX_BUNDLE ${CXX_FILES} ${UISrcs} ${MOCSrcs} Segmentor.qrc Segmentor.rc) + add_executable(Segmentor MACOSX_BUNDLE ${CXX_FILES} ${UISrcs} ${MOCSrcs} ${UI_RESOURCES}) target_link_libraries(Segmentor ${VTK_LIBRARIES}) endif() diff --git a/Segmentor.cxx b/Segmentor.cxx index 78f4b92..8e979e2 100644 --- a/Segmentor.cxx +++ b/Segmentor.cxx @@ -1,10 +1,9 @@ #include #include -#include "MainWindow.h" +#include "MainWindow.h" -int main(int argc, char** argv) -{ +int main(int argc, char** argv) { // Needed to ensure appropriate OpenGL context is created for VTK rendering. QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());