Skip to content

Commit

Permalink
Put Qt6 dependencies in if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
matterhorn103 committed Nov 16, 2023
1 parent 153c0f7 commit 7af8da9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
16 changes: 13 additions & 3 deletions avogadro/qtplugins/playertool/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
find_package(Qt6 REQUIRED COMPONENTS OpenGL OpenGLWidgets)
if(QT_VERSION EQUAL 6)
find_package(Qt6
REQUIRED COMPONENTS
OpenGL
OpenGLWidgets)
endif()

avogadro_plugin(PlayerTool
"Player tool"
Expand All @@ -14,11 +19,16 @@ target_link_libraries(PlayerTool
PRIVATE
gwavi
gif-h
Qt6::OpenGL
Qt6::OpenGLWidgets
Avogadro::Rendering
Avogadro::QtOpenGL)

if(QT_VERSION EQUAL 6)
target_link_libraries(PlayerTool
PRIVATE
Qt6::OpenGL
Qt6::OpenGLWidgets)
endif()

target_include_directories(PlayerTool
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/../../rendering
Expand Down
12 changes: 10 additions & 2 deletions avogadro/qtplugins/resetview/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
find_package(Qt6 REQUIRED COMPONENTS OpenGLWidgets)
if(QT_VERSION EQUAL 6)
find_package(Qt6 REQUIRED COMPONENTS OpenGLWidgets)
endif()

avogadro_plugin(ResetView
"Manipulate the view camera."
Expand All @@ -9,7 +11,13 @@ avogadro_plugin(ResetView
""
)

target_link_libraries(ResetView PRIVATE Qt6::OpenGLWidgets Avogadro::Rendering Avogadro::QtOpenGL)
target_link_libraries(ResetView PRIVATE Avogadro::Rendering Avogadro::QtOpenGL)

if(QT_VERSION EQUAL 6)
target_link_libraries(ResetView
PRIVATE
Qt6::OpenGLWidgets)
endif()

target_include_directories(ResetView
PRIVATE
Expand Down
11 changes: 9 additions & 2 deletions avogadro/qtplugins/surfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
find_package(Qt6 REQUIRED COMPONENTS OpenGL)
if(QT_VERSION EQUAL 6)
find_package(Qt6 REQUIRED COMPONENTS OpenGL)
endif()

set(surfaces_srcs
gaussiansetconcurrent.cpp
Expand All @@ -18,7 +20,6 @@ avogadro_plugin(Surfaces

target_link_libraries(Surfaces
PRIVATE
Qt6::OpenGL
Avogadro::Calc
Avogadro::QuantumIO
Avogadro::QtOpenGL
Expand All @@ -28,6 +29,12 @@ target_link_libraries(Surfaces
gwavi
tinycolormap)

if(QT_VERSION EQUAL 6)
target_link_libraries(Surfaces
PRIVATE
Qt6::OpenGL)
endif()

target_include_directories(Surfaces
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/../../rendering
Expand Down

0 comments on commit 7af8da9

Please sign in to comment.