Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 530236e

Browse files
committed
build: prepare standalone libchewing-data project
1 parent 341c60d commit 530236e

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.31.6...3.31.6)
2-
project(libchewing-data LANGUAGES NONE)
2+
project(libchewing-data VERSION 2026.1.27 LANGUAGES NONE)
3+
4+
if(PROJECT_IS_TOP_LEVEL)
5+
set(CMAKE_SYSTEM_NAME Generic)
6+
endif()
37

48
option(USE_SYSTEM_CHEWING_CLI "Use system-installed chewing-cli instead of building from source" ON)
59

@@ -11,5 +15,12 @@ if(USE_SYSTEM_CHEWING_CLI)
1115
)
1216
endif()
1317

18+
include(GNUInstallDirs)
19+
1420
add_subdirectory(dict/chewing)
1521
add_subdirectory(misc)
22+
23+
if(PROJECT_IS_TOP_LEVEL)
24+
set(CPACK_GENERATOR "ZIP")
25+
include(CPack)
26+
endif()

dict/chewing/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ foreach(TARGET ${TARGETS})
88
COMMAND ${CHEWING_CLI} init --csv ${CMAKE_CURRENT_SOURCE_DIR}/${SRC} ${TARGET}
99
DEPENDS ${SRC}
1010
)
11+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TARGET} DESTINATION ${CMAKE_INSTALL_DATADIR}/libchewing)
1112
endforeach()

misc/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ add_custom_command(
1515
${CMAKE_CURRENT_SOURCE_DIR}/symbols.dat
1616
)
1717
add_custom_target(misc ALL DEPENDS swkb.dat symbols.dat)
18+
19+
install(FILES swkb.dat symbols.dat DESTINATION ${CMAKE_INSTALL_DATADIR}/libchewing)

0 commit comments

Comments
 (0)