@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.27)
2
2
3
3
project (fcitx5-windows VERSION 0.1.0)
4
4
5
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
6
+
5
7
set (CMAKE_CXX_STANDARD 17)
6
8
7
9
option (ENABLE_TESTING_ADDONS "" OFF )
@@ -18,18 +20,34 @@ option(USE_SYSTEMD "" OFF)
18
20
option (ENABLE_XDGAUTOSTART "" OFF )
19
21
option (ENABLE_EMOJI "" OFF )
20
22
option (ENABLE_LIBUUID "" OFF )
23
+ option (BUILD_SPELL_DICT "" ${CYGWIN} )
24
+
25
+ if (CYGWIN )
26
+ set (CMAKE_INSTALL_PREFIX /usr)
27
+ set (ECM_DIR /clang64/share/ECM/cmake)
28
+ add_compile_definitions (-D_GNU_SOURCE)
29
+ else ()
30
+ set (CMAKE_INSTALL_PREFIX C:)
31
+ set (ECM_DIR C:/msys64/clang64/share/ECM/cmake)
32
+ set (GETTEXT_MSGMERGE_EXECUTABLE C:/msys64/usr/bin/msgmerge.exe)
33
+ set (GETTEXT_MSGFMT_EXECUTABLE C:/msys64/usr/bin/msgfmt.exe)
34
+ endif ()
21
35
22
- set (ECM_DIR /ucrt64/share/ECM/cmake)
23
- add_definitions (-DFcitx5Core_EXPORTS -DFcitx5Utils_EXPORTS -D_GNU_SOURCE)
24
36
add_subdirectory (fcitx5)
37
+ target_compile_definitions (Fcitx5Utils PUBLIC -DFcitx5Utils_EXPORTS)
38
+ target_compile_definitions (Fcitx5Core PUBLIC -DFcitx5Core_EXPORTS)
39
+
40
+ if (CYGWIN )
41
+ # exe needs dll in the same directory.
42
+ set (FCITX5UTILS_DLL_NAME msys-Fcitx5Utils-2.dll)
43
+ set (FCITX5UTILS_COPY "${PROJECT_BINARY_DIR} /fcitx5/src/modules/spell/${FCITX5UTILS_DLL_NAME} " )
44
+ add_custom_command (
45
+ OUTPUT "${FCITX5UTILS_COPY} "
46
+ DEPENDS Fcitx5Utils
47
+ COMMAND cp "$<TARGET_FILE:Fcitx5Utils>" "${FCITX5UTILS_COPY} "
48
+ )
49
+ add_custom_target (copy_fcitx5utils ALL DEPENDS "${FCITX5UTILS_COPY} " )
50
+ add_dependencies (spell_en_dict copy_fcitx5utils)
51
+ endif ()
25
52
26
- # exe needs dll in the same directory.
27
- set (FCITX5UTILS_DLL_NAME msys-Fcitx5Utils-2.dll)
28
- set (FCITX5UTILS_COPY "${PROJECT_BINARY_DIR} /fcitx5/src/modules/spell/${FCITX5UTILS_DLL_NAME} " )
29
- add_custom_command (
30
- OUTPUT "${FCITX5UTILS_COPY} "
31
- DEPENDS Fcitx5Utils
32
- COMMAND cp "$<TARGET_FILE:Fcitx5Utils>" "${FCITX5UTILS_COPY} "
33
- )
34
- add_custom_target (copy_fcitx5utils ALL DEPENDS "${FCITX5UTILS_COPY} " )
35
- add_dependencies (spell_en_dict copy_fcitx5utils)
53
+ add_subdirectory (src)
0 commit comments