Debian Codegraph @

avogadro/qtgui/CMakeLists.txt

raw
1 if(QT_VERSION EQUAL 6)
2 find_package(Qt6 COMPONENTS Widgets Concurrent REQUIRED)
3 endif()
4
5 # Provide some simple API to find the plugins, scripts, etc.
6 if(APPLE)
7 # It is a special case, the app bundle logic breaks the relative pathing.
8 add_definitions(-DAvogadroLibs_LIB_DIR=\"lib\")
9 add_definitions(-DAvogadroLibs_DATA_DIR=\"share\")
10 else()
11 add_definitions(-DAvogadroLibs_LIB_DIR=\"${INSTALL_LIBRARY_DIR}\")
12 add_definitions(-DAvogadroLibs_DATA_DIR=\"${INSTALL_DATA_DIR}\")
13 endif()
14
15 if(USE_SPGLIB)
16 add_definitions(-DUSE_SPGLIB)
17 endif()
18
19 # Find python for input generator scripts:
20 find_package(Python3 COMPONENTS Interpreter)
21
22 file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/avogadropython.h.in"
23 "namespace Avogadro {
24 static const char *pythonInterpreterPath = \"${Python3_EXECUTABLE}\";
25 }
26 ")
27 configure_file("${CMAKE_CURRENT_BINARY_DIR}/avogadropython.h.in"
28 "${CMAKE_CURRENT_BINARY_DIR}/avogadropython.h")
29
30 add_library(QtGui)
31
32 if(USE_PLOTTER)
33 find_package(JKQTPlotter${QT_VERSION} REQUIRED)
34 endif()
35
36 avogadro_headers(QtGui
37 backgroundfileformat.h
38 calcworker.h
39 colorbutton.h
40 containerwidget.h
41 customelementdialog.h
42 elementtranslator.h
43 extensionplugin.h
44 filebrowsewidget.h
45 fileformatdialog.h
46 gaussiansetconcurrent.h
47 generichighlighter.h
48 hydrogentools.h
49 insertfragmentdialog.h
50 interfacescript.h
51 interfacewidget.h
52 jsonwidget.h
53 layermodel.h
54 rwlayermanager.h
55 meshgenerator.h
56 molecule.h
57 moleculemodel.h
58 multiviewwidget.h
59 packagemanager.h
60 periodictableview.h
61 tomlparse.h
62 persistentatom.h
63 persistentbond.h
64 pluginlayermanager.h
65 pythonscript.h
66 richtextdelegate.h
67 rwmolecule.h
68 sceneplugin.h
69 scenepluginmodel.h
70 slatersetconcurrent.h
71 sortfiltertreeproxymodel.h
72 timedprogressdialog.h
73 toolplugin.h
74 utilities.h
75 viewfactory.h
76 )
77
78 target_sources(QtGui PRIVATE
79 backgroundfileformat.cpp
80 calcworker.cpp
81 colorbutton.cpp
82 containerwidget.cpp
83 customelementdialog.cpp
84 elementdetail_p.cpp
85 elementitem_p.cpp
86 elementtranslator.cpp
87 extensionplugin.cpp
88 filebrowsewidget.cpp
89 fileformatdialog.cpp
90 gaussiansetconcurrent.cpp
91 generichighlighter.cpp
92 hydrogentools.cpp
93 insertfragmentdialog.cpp
94 interfacescript.cpp
95 interfacewidget.cpp
96 jsonwidget.cpp
97 layermodel.cpp
98 richtextdelegate.cpp
99 rwlayermanager.cpp
100 meshgenerator.cpp
101 molecule.cpp
102 moleculemodel.cpp
103 multiviewwidget.cpp
104 packagemanager.cpp
105 periodictablescene_p.cpp
106 tomlparse.cpp
107 periodictableview.cpp
108 pluginlayermanager.cpp
109 pythonscript.cpp
110 rwmolecule.cpp
111 sceneplugin.cpp
112 scenepluginmodel.cpp
113 slatersetconcurrent.cpp
114 sortfiltertreeproxymodel.cpp
115 timedprogressdialog.cpp
116 toolplugin.cpp
117 utilities.cpp
118 viewfactory.cpp
119 )
120
121 set(UIS
122 customelementdialog.ui
123 insertfragmentdialog.ui
124 )
125 qt_wrap_ui(UI_SOURCES ${UIS})
126 target_sources(QtGui PRIVATE ${UI_SOURCES})
127
128 set(RCS
129 qtgui.qrc
130 )
131 qt_add_resources(RC_SOURCES ${RCS})
132 target_sources(QtGui PRIVATE ${RC_SOURCES})
133
134 if(USE_PLOTTER)
135 avogadro_headers(QtGui
136 chartdialog.h
137 chartwidget.h
138 )
139 target_sources(QtGui PRIVATE
140 chartdialog.cpp
141 chartwidget.cpp
142 )
143 endif()
144
145 avogadro_add_library(QtGui)
146 target_link_libraries(QtGui PUBLIC Avogadro::IO Avogadro::Calc Qt::Widgets Qt::Concurrent
147 PRIVATE tomlplusplus::tomlplusplus)
148 if(USE_PLOTTER)
149 target_link_libraries(QtGui PUBLIC JKQTPlotter${QT_VERSION}::JKQTPlotter${QT_VERSION})
150 target_compile_definitions(QtGui PUBLIC USE_PLOTTER)
151 endif()