From 25c341374df1afda91e1f2351de86c119ddde307 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Sun, 18 Mar 2018 00:10:02 +0100 Subject: [PATCH] cleanup CMake files --- CMakeLists.txt | 3 ++- modules/gui/pymod/CMakeLists.txt | 2 +- modules/gui/src/CMakeLists.txt | 4 ++-- modules/info/src/CMakeLists.txt | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e01823287..b5961697d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,6 +199,7 @@ endif() if (ENABLE_INFO) find_package(Qt5Xml REQUIRED) + set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Xml) endif() if (OPTIMIZE) @@ -271,7 +272,7 @@ endif() if (ENABLE_GUI) find_package(Qt5Widgets REQUIRED) find_package(Qt5OpenGL REQUIRED) - find_package(Qt5PrintSupport REQUIRED) + set(QT_LIBRARIES ${QT_LIBRARIES} Qt5::OpenGL Qt5::Gui Qt5::Widgets Qt5::Core) ost_find_python_module(sip) ost_find_python_module(PyQt5) endif() diff --git a/modules/gui/pymod/CMakeLists.txt b/modules/gui/pymod/CMakeLists.txt index 9c4826656..ab7094a86 100644 --- a/modules/gui/pymod/CMakeLists.txt +++ b/modules/gui/pymod/CMakeLists.txt @@ -118,4 +118,4 @@ install(FILES ${INSPECTOR_ICONS} DESTINATION "share/openstructure/scene/icons") set(QT_USE_QTOPENGL 1) set(QT_USE_QTNETWORK 1) -target_link_libraries(_ost_gui ${QT_LIBRARIES} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) +target_link_libraries(_ost_gui ${QT_LIBRARIES}) diff --git a/modules/gui/src/CMakeLists.txt b/modules/gui/src/CMakeLists.txt index 5a6e33049..a23a530d6 100644 --- a/modules/gui/src/CMakeLists.txt +++ b/modules/gui/src/CMakeLists.txt @@ -458,7 +458,7 @@ module(NAME gui SOURCES ${OST_GUI_MOCS} ${OST_GUI_SOURCES} ${OST_GUI_DATA_VIEWER_HEADERS} ${OST_GUI_HEADERS} DEPENDS_ON ost_gfx ost_io ost_mol_alg ost_seq_alg - LINK Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::PrintSupport Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::PrintSupport + LINK ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${BOOST_PYTHON_LIBRARIES} ${SPNAV_LIBRARIES} @@ -476,7 +476,7 @@ qt5_wrap_cpp(OST_GOSTY_MOC "gosty.hh" OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -set(LINK LINK Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::PrintSupport Qt5::Core Qt5::Gui Qt5::Widgets Qt5::OpenGL Qt5::PrintSupport ${BOOST_PROGRAM_OPTIONS_LIBRARIES}) +set(LINK LINK ${QT_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARIES}) executable_libexec(NAME gosty SOURCES gosty.cc ${OST_GOSTY_MOC} ${OST_QT_RESOURCE} DEPENDS_ON ost_gui ${LINK}) diff --git a/modules/info/src/CMakeLists.txt b/modules/info/src/CMakeLists.txt index 6b976ecd7..9242a005d 100644 --- a/modules/info/src/CMakeLists.txt +++ b/modules/info/src/CMakeLists.txt @@ -31,5 +31,5 @@ set(QT_USE_QTXML 1) module(NAME info SOURCES ${OST_INFO_SOURCES} HEADERS ${OST_INFO_HEADERS} - DEPENDS_ON ost_base LINK ${BOOST_REGEX_LIBRARIES} ${QT_LIBRARIES} Qt5::Xml) + DEPENDS_ON ost_base LINK ${BOOST_REGEX_LIBRARIES} ${QT_LIBRARIES}) -- GitLab