Warning, /education/kiten/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 "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 #Name the project
0010 project(kiten VERSION ${RELEASE_SERVICE_VERSION})
0011 
0012 #ECM setup
0013 set(KF5_MIN_VERSION "5.90.0")
0014 set(KDE_COMPILERSETTINGS_LEVEL "5.82")
0015 set(QT_REQUIRED_VERSION "5.15.0")
0016 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
0017 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
0018 include(KDEInstallDirs)
0019 include(KDECompilerSettings NO_POLICY_SCOPE)
0020 include(KDECMakeSettings)
0021 include(ECMInstallIcons)
0022 include(CheckIncludeFiles)
0023 include(ECMGenerateHeaders)
0024 include(ECMAddAppIcon)
0025 include(ECMMarkNonGuiExecutable)
0026 include(GenerateExportHeader)
0027 include(ECMSetupVersion)
0028 
0029 find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Core Widgets)
0030 find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
0031     Archive
0032     Completion
0033     Config
0034     ConfigWidgets
0035     CoreAddons
0036     Crash
0037     DocTools
0038     I18n
0039     KIO
0040     Notifications
0041     XmlGui)
0042 if (QT_MAJOR_VERSION STREQUAL "6")
0043     find_package(Qt6Core5Compat)
0044 endif()
0045 
0046 ## Make it easy for radselect and kiten to find libkiten headers
0047 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib)
0048 include_directories(${CMAKE_CURRENT_BINARY_DIR})
0049 
0050 ## Find mman.h on Windows
0051 if(WIN32)
0052     find_path(MMAN_INCLUDE_PATH NAMES sys/mman.h)
0053     if(NOT MMAN_INCLUDE_PATH)
0054         message(FATAL_ERROR "On Windows, you need to install mman-win32 headers.")
0055     endif()
0056     message(STATUS "Found mman-win32 include: ${MMAN_INCLUDE_PATH}")
0057 
0058     find_library(MMAN_LIBRARY NAMES mman)
0059     if(NOT MMAN_LIBRARY)
0060         message(FATAL_ERROR "On Windows, you need to install mman-win32 library.")
0061     endif()
0062     message(STATUS "Found mman-win32 library: ${MMAN_LIBRARY}")
0063 endif(WIN32)
0064 
0065 ## Generate config.h
0066 check_include_files(stdint.h HAVE_STDINT_H)
0067 check_include_files(inttypes.h HAVE_INTTYPES_H)
0068 configure_file( config-kiten.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kiten.h )
0069 
0070 add_definitions(-DTRANSLATION_DOMAIN=\"kiten\")
0071 
0072 
0073 
0074 ## Build each subdir
0075 add_subdirectory( app )
0076 add_subdirectory( data/font )
0077 add_subdirectory( data/pics )
0078 add_subdirectory( doc )
0079 add_subdirectory( kanjibrowser )
0080 add_subdirectory( lib )
0081 add_subdirectory( radselect )
0082 
0083 ## Build kitengen, a small index generator used by the kiten app
0084 set(kitengen_SRCS xjdxgen.c)
0085 add_executable(kitengen ${kitengen_SRCS})
0086 ecm_mark_nongui_executable(kitengen)
0087 target_link_libraries(kitengen Qt::Core)
0088 install( TARGETS kitengen ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
0089 install(FILES org.kde.kiten.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
0090 ki18n_install(po)
0091 if (KF5DocTools_FOUND)
0092     kdoctools_install(po)
0093 endif()
0094 
0095 ## Install our datafiles
0096 install( FILES data/edict data/kanjidic data/radkfile data/vconj data/romkana.cnv DESTINATION ${KDE_INSTALL_DATADIR}/kiten )
0097 feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)