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

0001 cmake_minimum_required(VERSION 3.5)
0002 
0003 # KDE Application Version, managed by release script
0004 set(RELEASE_SERVICE_VERSION_MAJOR "22")
0005 set(RELEASE_SERVICE_VERSION_MINOR "11")
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     OpenGL
0033 )
0034 
0035 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0036     Crash
0037     Config
0038     I18n
0039     IconThemes
0040     KIO
0041     NewStuff
0042     Plotting
0043     TextWidgets
0044 )
0045 find_package(KF5DocTools ${KF5_MIN_VERSION})
0046 find_package(Eigen3 3.2.2 REQUIRED)
0047 find_package(GSL)
0048 find_package(Qalculate)
0049 
0050 set_package_properties(EIGEN3 PROPERTIES
0051                        DESCRIPTION "Eigen3"
0052                        URL "https://eigen.tuxfamily.org"
0053                        TYPE OPTIONAL
0054                        PURPOSE "Required to build step")
0055 
0056 set_package_properties(QALCULATE PROPERTIES
0057 #                      REQUIRED_VERSION "0.9.5"
0058                        DESCRIPTION "Qalculate"
0059                        URL "https://qalculate.github.io/"
0060                        TYPE OPTIONAL
0061                        PURPOSE "Unit conversion support in Step")
0062 
0063 set_package_properties(GSL PROPERTIES
0064 #                      REQUIRED_VERSION "1.8"
0065                        DESCRIPTION "GSL"
0066                        URL "https://www.gnu.org/software/gsl/"
0067                        TYPE OPTIONAL
0068                        PURPOSE "Provides a GSL-powered solver for Step")
0069 
0070 set(STEPCORE_WITH_GSL ${GSL_FOUND} CACHE BOOL "Enable GSL-powered features for StepCore")
0071 set(STEPCORE_WITH_QT ON) # CACHE BOOL "Enable QT-powered features for StepCore")
0072 set(STEP_WITH_QALCULATE ${QALCULATE_FOUND} CACHE BOOL "Enable unit conversion support using libqalculate")
0073 if (QT_MAJOR_VERSION STREQUAL "6")
0074     MESSAGE(STATUS "QALCULATE was not ported to QT6 yet")
0075     set(STEP_WITH_QALCULATE false)
0076 endif()
0077 
0078 # Compiler specific options
0079 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
0080     # Clang specific options
0081     include(${CMAKE_CURRENT_SOURCE_DIR}/Clang.cmake)
0082 elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
0083     # GCC specific options
0084     include(${CMAKE_CURRENT_SOURCE_DIR}/GCC.cmake)
0085 else()
0086     # Some other compiler
0087 endif()
0088 
0089 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
0090 
0091 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
0092 
0093 if(KF5DocTools_FOUND)
0094     ecm_optional_add_subdirectory(doc)
0095 endif()
0096 add_subdirectory(stepcore)
0097 add_subdirectory(step)
0098 add_subdirectory(autotests)
0099 
0100 ki18n_install(po)
0101 if (KF5DocTools_FOUND)
0102     kdoctools_install(po)
0103 endif()
0104 install(FILES org.kde.step.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0105 
0106 find_package(SharedMimeInfo REQUIRED)
0107 install(FILES org.kde.step.xml DESTINATION ${KDE_INSTALL_MIMEDIR})
0108 update_xdg_mimetypes(${KDE_INSTALL_MIMEDIR})
0109 
0110 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)