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

0001 cmake_minimum_required(VERSION 3.16)
0002 
0003 # KDE Application Version, managed by release script
0004 set(RELEASE_SERVICE_VERSION_MAJOR "23")
0005 set(RELEASE_SERVICE_VERSION_MINOR "03")
0006 set(RELEASE_SERVICE_VERSION_MICRO "70")
0007 set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
0008 
0009 project(step VERSION ${RELEASE_SERVICE_VERSION})
0010 
0011 set(KDE_COMPILERSETTINGS_LEVEL "5.84")
0012 set(QT_MIN_VERSION "5.15.2")
0013 set(KF5_MIN_VERSION "5.90.0")
0014 
0015 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0016 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
0017 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
0018 
0019 include(KDEInstallDirs)
0020 include(ECMAddTests)
0021 include(KDECompilerSettings NO_POLICY_SCOPE)
0022 include(KDECMakeSettings)
0023 include(ECMInstallIcons)
0024 include(ECMOptionalAddSubdirectory)
0025 include(ECMSetupVersion)
0026 include(FeatureSummary)
0027 include(ECMPoQmTools)
0028 
0029 find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS
0030     Xml
0031     Svg
0032 )
0033 if (QT_MAJOR_VERSION STREQUAL "6")
0034     find_package(Qt6 REQUIRED NO_MODULE COMPONENTS OpenGLWidgets)
0035 endif()
0036 
0037 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0038     Crash
0039     Config
0040     I18n
0041     IconThemes
0042     KIO
0043     NewStuff
0044     Plotting
0045     TextWidgets
0046 )
0047 find_package(KF5DocTools ${KF5_MIN_VERSION})
0048 find_package(Eigen3 3.2.2 REQUIRED)
0049 find_package(GSL)
0050 find_package(Qalculate)
0051 
0052 set_package_properties(EIGEN3 PROPERTIES
0053                        DESCRIPTION "Eigen3"
0054                        URL "https://eigen.tuxfamily.org"
0055                        TYPE OPTIONAL
0056                        PURPOSE "Required to build step")
0057 
0058 set_package_properties(QALCULATE PROPERTIES
0059 #                      REQUIRED_VERSION "0.9.5"
0060                        DESCRIPTION "Qalculate"
0061                        URL "https://qalculate.github.io/"
0062                        TYPE OPTIONAL
0063                        PURPOSE "Unit conversion support in Step")
0064 
0065 set_package_properties(GSL PROPERTIES
0066 #                      REQUIRED_VERSION "1.8"
0067                        DESCRIPTION "GSL"
0068                        URL "https://www.gnu.org/software/gsl/"
0069                        TYPE OPTIONAL
0070                        PURPOSE "Provides a GSL-powered solver for Step")
0071 
0072 set(STEPCORE_WITH_GSL ${GSL_FOUND} CACHE BOOL "Enable GSL-powered features for StepCore")
0073 set(STEPCORE_WITH_QT ON) # CACHE BOOL "Enable QT-powered features for StepCore")
0074 set(STEP_WITH_QALCULATE ${QALCULATE_FOUND} CACHE BOOL "Enable unit conversion support using libqalculate")
0075 if (QT_MAJOR_VERSION STREQUAL "6")
0076     MESSAGE(STATUS "QALCULATE was not ported to QT6 yet")
0077     set(STEP_WITH_QALCULATE false)
0078 endif()
0079 
0080 # Compiler specific options
0081 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
0082     # Clang specific options
0083     include(${CMAKE_CURRENT_SOURCE_DIR}/Clang.cmake)
0084 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
0085     # GCC specific options
0086     include(${CMAKE_CURRENT_SOURCE_DIR}/GCC.cmake)
0087 else()
0088     # Some other compiler
0089 endif()
0090 
0091 if(KF5DocTools_FOUND)
0092     ecm_optional_add_subdirectory(doc)
0093 endif()
0094 add_subdirectory(stepcore)
0095 add_subdirectory(step)
0096 add_subdirectory(autotests)
0097 
0098 ecm_install_po_files_as_qm(poqm)
0099 ki18n_install(po)
0100 if (KF5DocTools_FOUND)
0101     kdoctools_install(po)
0102 endif()
0103 install(FILES org.kde.step.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0104 
0105 find_package(SharedMimeInfo REQUIRED)
0106 install(FILES org.kde.step.xml DESTINATION ${KDE_INSTALL_MIMEDIR})
0107 update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
0108 
0109 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)