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

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