Debian Codegraph @

avogadro/qtplugins/forcefield/CMakeLists.txt

raw
1 if(QT_VERSION EQUAL 6)
2 find_package(Qt6 COMPONENTS Gui REQUIRED)
3 endif()
4
5 set(forcefield_srcs
6 forcefield.cpp
7 forcefielddialog.cpp
8 obmmenergy.cpp
9 scriptenergy.cpp
10 )
11
12 if (BUILD_GPL_PLUGINS)
13 find_package(OpenBabel3)
14 if (OpenBabel3_LIBRARIES)
15 list(APPEND forcefield_srcs
16 obenergy.cpp
17 )
18 add_definitions(-DBUILD_GPL_PLUGINS)
19 include_directories(${OpenBabel3_INCLUDE_DIRS} ${OpenBabel3_INCLUDE_DIR}
20 ${AvogadroLibs_BINARY_DIR}/../prefix/include/openbabel3)
21 endif()
22 endif()
23
24 avogadro_plugin(Forcefield
25 "Force field optimization and dynamics"
26 ExtensionPlugin
27 forcefield.h
28 Forcefield
29 "${forcefield_srcs}"
30 forcefielddialog.ui
31 )
32
33 target_link_libraries(Forcefield PRIVATE Avogadro::Calc Avogadro::QtGui)
34
35 if(QT_VERSION EQUAL 6)
36 target_link_libraries(Forcefield PRIVATE Qt6::Gui)
37 endif()
38
39 if (BUILD_GPL_PLUGINS AND OpenBabel3_LIBRARIES)
40 target_link_libraries(Forcefield PRIVATE OpenBabel3)
41 endif()
42
43 if (NOT BUILD_GPL_PLUGINS)
44 # install the OB / Pybel forcefield scripts
45 list(APPEND forcefields
46 scripts/gaff.py
47 scripts/mmff94.py
48 scripts/uff.py
49 )
50 endif()
51
52 # Don't install any scripts - we'll use these as plugins