From dd38aba1dfbc18c8e094fce2f8b167d0e12e93fb Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 17 Jan 2019 10:45:42 +0100 Subject: [PATCH] Qt5OpenGL is only required in optional compoundviewer Add missing search for Qt5Xml Add missing Qt5Widgets to compoundviewer target_link_libraries Remove Qt5OpenGL from libscience target_link_libraries, not used --- CMakeLists.txt | 7 ++++--- compoundviewer/CMakeLists.txt | 3 ++- libscience/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a48c9046..9c55aafe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,12 +42,12 @@ configure_file( include_directories(${AvogadroLibs_INCLUDE_DIRS}) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS - Widgets - Script Core Gui - OpenGL + Script Svg + Widgets + Xml ) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS @@ -92,6 +92,7 @@ add_definitions(-DUSING_DYNAMIC_LIBS) endif(MSVC) if (OPENBABEL2_FOUND AND AvogadroLibs_FOUND AND EIGEN3_FOUND) + find_package(Qt5OpenGL ${QT_MIN_VERSION} REQUIRED) find_package(KF5NewStuff REQUIRED) # avoid compilerwarnings about redefinitions # todo: use check_function_exits() ? diff --git a/compoundviewer/CMakeLists.txt b/compoundviewer/CMakeLists.txt index d6f6f4ab..54734a02 100644 --- a/compoundviewer/CMakeLists.txt +++ b/compoundviewer/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${EIGEN3_INCLUDE_DIR} - ${OPENBABEL2_INCLUDE_DIR} ${OPENGL_INCLUDE_DIRS} + ${OPENBABEL2_INCLUDE_DIR} ${AvogadroLibs_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/compoundviewer ) @@ -21,6 +21,7 @@ target_link_libraries(compoundviewer KF5::CoreAddons Qt5::OpenGL Qt5::Gui + Qt5::Widgets ${OPENBABEL2_LIBRARIES} AvogadroQtGui AvogadroQtOpenGL diff --git a/libscience/CMakeLists.txt b/libscience/CMakeLists.txt index f25e4090..4d4d6979 100644 --- a/libscience/CMakeLists.txt +++ b/libscience/CMakeLists.txt @@ -16,7 +16,7 @@ set(science_LIB_SRCS add_library(science SHARED ${science_LIB_SRCS}) -target_link_libraries(science Qt5::OpenGL Qt5::Xml KF5::UnitConversion KF5::WidgetsAddons KF5::KDELibs4Support) +target_link_libraries(science Qt5::Xml KF5::UnitConversion KF5::WidgetsAddons KF5::KDELibs4Support) set_target_properties(science PROPERTIES VERSION ${KALZIUMLIB_VERSION} SOVERSION ${KALZIUMLIB_SOVERSION} ) install(TARGETS science ${INSTALL_TARGETS_DEFAULT_ARGS}) -- 2.20.1