Warning, /education/kalzium/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 add_executable(kalzium)
0002 
0003 target_include_directories(kalzium PRIVATE
0004    tools
0005    calculator
0006    psetable
0007    isotopetable
0008    ${CMAKE_CURRENT_BINARY_DIR}/..
0009 )
0010 
0011 ecm_setup_version(${RELEASE_SERVICE_VERSION}
0012    VARIABLE_PREFIX KALZIUM
0013    VERSION_HEADER kalzium_version.h
0014 )
0015 
0016 ecm_qt_declare_logging_category(kalzium
0017    HEADER kalzium_debug.h
0018    IDENTIFIER KALZIUM_LOG
0019    CATEGORY_NAME org.kde.kalzium
0020    DESCRIPTION "Kalzium"
0021    EXPORT KALZIUM
0022 )
0023 
0024 # The tools can only be built when OpenBabel is found.
0025 # The moleculeviewer needs not only OpenBabel but also Eigen and Avogadro,
0026 # so there is a nested if-check.
0027 if (HAVE_OPENBABEL)
0028    target_sources(kalzium PRIVATE
0029       tools/obconverter.cpp
0030    )
0031 
0032    ki18n_wrap_ui(kalzium
0033       tools/obconverterwidget.ui
0034    )
0035    target_include_directories(kalzium SYSTEM PRIVATE ${OPENBABEL_INCLUDE_DIR})
0036 
0037    if (EIGEN3_FOUND AND AvogadroLibs_FOUND)
0038       #include(${Avogadro_USE_FILE})
0039 
0040       target_sources(kalzium PRIVATE
0041          tools/moleculeview.cpp
0042          ../compoundviewer/kalziumglwidget.cpp
0043       )
0044 
0045       ki18n_wrap_ui(kalzium
0046          tools/moleculeviewerwidget.ui
0047       )
0048    endif ()
0049 endif ()
0050 
0051 ## Kalzium calculator files
0052 target_sources(kalzium PRIVATE
0053    calculator/calculator.cpp
0054    calculator/calculator.h
0055    calculator/concCalculator.cpp
0056    calculator/concCalculator.h
0057    calculator/gasCalculator.cpp
0058    calculator/gasCalculator.h
0059    calculator/nuclearCalculator.cpp
0060    calculator/nuclearCalculator.h
0061    calculator/titrationCalculator.cpp
0062    calculator/titrationCalculator.h
0063 #   calculator/massCalculator.cpp
0064 )
0065 ki18n_wrap_ui(kalzium
0066    calculator/calculator.ui
0067    calculator/nuclearCalculator.ui
0068    calculator/gasCalculator.ui
0069    calculator/concCalculator.ui
0070    calculator/settings_calc.ui
0071    calculator/titrationCalculator.ui
0072 #   calculator/massCalculator.ui
0073 )
0074 
0075 target_sources(kalzium PRIVATE
0076    detailedgraphicaloverview.cpp
0077    detailedgraphicaloverview.h
0078    detailinfodlg.cpp
0079    detailinfodlg.h
0080    elementdataviewer.cpp
0081    elementdataviewer.h
0082    exportdialog.cpp
0083    exportdialog.h
0084    gradientwidget_impl.cpp
0085    gradientwidget_impl.h
0086    isotopetable/informationitem.cpp
0087    isotopetable/informationitem.h
0088    isotopetable/isotopeguideview.cpp
0089    isotopetable/isotopeguideview.h
0090    isotopetable/isotopeitem.cpp
0091    isotopetable/isotopeitem.h
0092    isotopetable/isotopescene.cpp
0093    isotopetable/isotopescene.h
0094    isotopetable/isotopetabledialog.cpp
0095    isotopetable/isotopetabledialog.h
0096    isotopetable/isotopeview.cpp
0097    isotopetable/isotopeview.h
0098    kalzium.cpp
0099    kalziumdataobject.cpp
0100    kalziumdataobject.h
0101    kalziumelementproperty.cpp
0102    kalziumelementproperty.h
0103    kalziumgradienttype.cpp
0104    kalziumgradienttype.h
0105    kalzium.h
0106    kalziumnumerationtype.cpp
0107    kalziumnumerationtype.h
0108    kalziumschemetype.cpp
0109    kalziumschemetype.h
0110    kalziumunitcombobox.cpp
0111    kalziumunitcombobox.h
0112    kalziumutils.cpp
0113    kalziumutils.h
0114    kdeeduglossary.cpp
0115    kdeeduglossary.h
0116    legendwidget.cpp
0117    legendwidget.h
0118    main.cpp
0119    molcalcwidget.cpp
0120    molcalcwidget.h
0121    orbitswidget.cpp
0122    orbitswidget.h
0123    psetable/elementitem.cpp
0124    psetable/elementitem.h
0125    psetable/numerationitem.cpp
0126    psetable/numerationitem.h
0127    psetable/periodictablescene.cpp
0128    psetable/periodictablescene.h
0129    psetable/periodictablestates.cpp
0130    psetable/periodictablestates.h
0131    psetable/periodictableview.cpp
0132    psetable/periodictableview.h
0133    psetable/statemachine.cpp
0134    psetable/statemachine.h
0135    rsdialog.cpp
0136    rsdialog.h
0137    search.cpp
0138    search.h
0139    searchwidget.cpp
0140    searchwidget.h
0141    spectrumviewimpl.cpp
0142    spectrumviewimpl.h
0143    spectrumwidget.cpp
0144    spectrumwidget.h
0145    tableinfowidget.cpp
0146    tableinfowidget.h
0147    tablesdialog.cpp
0148    tablesdialog.h
0149    settings/kalziumconfigdialog.cpp
0150    settings/kalziumconfigdialog.h
0151    settings/unitsettingsdialog.cpp
0152    settings/unitsettingsdialog.h
0153    settings/isotopetablesettingsdialog.cpp
0154    settings/isotopetablesettingsdialog.h
0155    settings/isotopetablesettingscard.cpp
0156    settings/isotopetablesettingscard.h
0157 
0158    kalzium.qrc
0159 )
0160 
0161 if (LIBFACILE_FOUND)
0162    include(CMakeOCamlInstructions.cmake)
0163 
0164    target_sources(kalzium PRIVATE
0165       eqchemview.cpp
0166       ${CMAKE_CURRENT_BINARY_DIR}/solver.o
0167       ${CMAKE_CURRENT_BINARY_DIR}/modwrap.o
0168    )
0169    ki18n_wrap_ui(kalzium
0170       equationview.ui
0171    )
0172 endif ()
0173 
0174 ki18n_wrap_ui(kalzium
0175    isotopetable/isotopedialog.ui
0176    plotsetupwidget.ui
0177    molcalcwidgetbase.ui
0178    spectrumview.ui
0179    rswidget.ui
0180    gradientwidget.ui
0181    exportdialog.ui
0182    settings/settings_colors.ui
0183    settings/settings_gradients.ui
0184    )
0185 
0186 kconfig_add_kcfg_files(kalzium GENERATE_MOC prefs.kcfgc)
0187 
0188 file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-kalzium.png")
0189 ecm_add_app_icon(kalzium ICONS ${ICONS_SRCS})
0190 
0191 target_link_libraries(kalzium
0192     KF5::Completion
0193     KF5::ConfigWidgets
0194     KF5::ItemViews
0195     KF5::KIOWidgets
0196     KF5::Plotting
0197     KF5::TextWidgets
0198     KF5::UnitConversion
0199     KF5::XmlGui
0200     Qt::Svg
0201     science
0202 )
0203 if (QT_MAJOR_VERSION STREQUAL "5")
0204     target_link_libraries(kalzium Qt::Script)
0205 else()
0206     target_link_libraries(kalzium Qt::StateMachine)
0207 endif()
0208 if (HAVE_OPENBABEL)
0209    target_link_libraries(kalzium ${OPENBABEL_LIBRARIES})
0210    if (EIGEN3_FOUND AND AvogadroLibs_FOUND)
0211       target_link_libraries(kalzium
0212          KF5::NewStuff
0213          Qt::OpenGL
0214          compoundviewer
0215          AvogadroQtGui
0216          AvogadroQtOpenGL
0217          AvogadroQtPlugins
0218          Eigen3::Eigen
0219        )
0220       install(FILES kalzium.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR})
0221    endif ()
0222 endif ()
0223 
0224 if (LIBFACILE_FOUND)
0225    link_directories(${OCAMLC_DIR})
0226    set(CMAKE_LIBRARY_PATH ${OCAMLC_DIR})
0227 
0228    find_library(OCAML_ASMRUN_LIBRARY NAMES asmrun)
0229    if (OCAML_ASMRUN_LIBRARY)
0230       target_link_libraries(kalzium ${OCAML_ASMRUN_LIBRARY})
0231    endif ()
0232 
0233    find_library(OCAML_STR_LIBRARY NAMES str)
0234    if (OCAML_STR_LIBRARY)
0235       target_link_libraries(kalzium ${OCAML_STR_LIBRARY})
0236    endif ()
0237 
0238    find_library(OCAML_NUMS_LIBRARY NAMES nums)
0239    if (OCAML_NUMS_LIBRARY)
0240       target_link_libraries(kalzium ${OCAML_NUMS_LIBRARY})
0241    endif ()
0242 
0243    target_link_libraries(kalzium m ${CMAKE_DL_LIBS})
0244 endif ()
0245 
0246 install(TARGETS kalzium ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0247 
0248 install(PROGRAMS org.kde.kalzium.desktop org.kde.kalzium_cml.desktop DESTINATION ${KDE_INSTALL_APPDIR})
0249 install(FILES settings/kalzium.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
0250 
0251 ecm_install_icons(ICONS
0252     16-apps-kalzium.png
0253     22-apps-kalzium.png
0254     32-apps-kalzium.png
0255     48-apps-kalzium.png
0256     64-apps-kalzium.png
0257     128-apps-kalzium.png
0258     sc-apps-kalzium.svgz
0259     DESTINATION ${KDE_INSTALL_ICONDIR}
0260     THEME hicolor
0261 )