summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQijia Liu <liumeo@pku.edu.cn>2025-12-22 17:53:58 -0500
committerPeng Wu <alexepico@gmail.com>2025-12-24 11:54:45 +0800
commit8279e5c57c44d00051f058a929e81da095440a50 (patch)
treef8d2bfa368294ee05955a58e26943ff20635004f
parent988df889e9351cba4d0f8ecae863f69c3cb4fcb2 (diff)
downloadlibpinyin-8279e5c57c44d00051f058a929e81da095440a50.tar.gz
libpinyin-8279e5c57c44d00051f058a929e81da095440a50.tar.xz
libpinyin-8279e5c57c44d00051f058a929e81da095440a50.zip
Support building static lib with CMake
-rw-r--r--CMakeLists.txt3
-rw-r--r--src/CMakeLists.txt1
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5361012..2dba3a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,9 @@ set (
set (VERSION ${LIBPINYIN_VERSION})
+######## Options
+option(BUILD_SHARED_LIBS "Build libpinyin as shared library" ON)
+
######## Validation
include(CheckIncludeFileCXX)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fe16a66..f48a9b3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,6 @@ set(
add_library(
pinyin
- SHARED
${LIBPINYIN_SOURCES}
)