-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
52 lines (39 loc) · 1.49 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.6.0)
project(fcitx5-hallelujah VERSION 5.0.1)
find_package(ECM 1.0.0 REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH})
include(FeatureSummary)
include(GNUInstallDirs)
include(ECMUninstallTarget)
option(ENABLE_TEST "Build Test" On)
option(BUILD_DATA "Build data" On)
find_package(Gettext REQUIRED)
find_package(Fcitx5Core 5.1.9 REQUIRED)
find_package(Fcitx5Module REQUIRED COMPONENTS Spell TestFrontend)
find_package(PkgConfig REQUIRED)
if (NOT TARGET fmt::fmt)
find_package(fmt REQUIRED)
endif()
if (NOT DEFINED MARISA_TARGET)
pkg_check_modules(Marisa REQUIRED IMPORTED_TARGET marisa)
set(MARISA_TARGET PkgConfig::Marisa)
endif()
if (NOT DEFINED JSONC_TARGET)
pkg_check_modules(JsonC REQUIRED IMPORTED_TARGET "json-c")
set(JSONC_TARGET PkgConfig::JsonC)
endif()
add_definitions(-DFCITX_GETTEXT_DOMAIN=\"fcitx5-hallelujah\")
fcitx5_add_i18n_definition()
include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake")
add_subdirectory(src)
if (ENABLE_TEST)
enable_testing()
add_subdirectory(test)
endif()
if (BUILD_DATA)
add_subdirectory(data)
endif()
fcitx5_translate_desktop_file(org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml.in
org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml XML)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.fcitx.Fcitx5.Addon.Hallelujah.metainfo.xml" DESTINATION ${FCITX_INSTALL_DATADIR}/metainfo)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)