summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--data/keyboards/CMakeLists.txt2
-rw-r--r--hangul/CMakeLists.txt13
-rw-r--r--po/CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt2
5 files changed, 14 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b31d0e4..2307e55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,8 +25,13 @@ set(LIBHANGUL_SOVERSION_MAJOR 1)
set(LIBHANGUL_SOVERSION_MINOR 0)
set(LIBHANGUL_SOVERSION_PATCH 1)
+option(BUILD_SHARED_LIBS
+ "Enable/Disable shared library build."
+ ON
+)
+
option(ENABLE_EXTERNAL_KEYBOARDS
- "enable external keyboard xml file loading feature"
+ "Enable/Disable external keyboard xml file loading feature."
ON
)
diff --git a/data/keyboards/CMakeLists.txt b/data/keyboards/CMakeLists.txt
index 6c94c18..fea4951 100644
--- a/data/keyboards/CMakeLists.txt
+++ b/data/keyboards/CMakeLists.txt
@@ -18,7 +18,7 @@
cmake_minimum_required(VERSION 3.0)
#include(GNUInstallDirs)
-include(FindGettext)
+find_package(Gettext)
set(keyboard_file_list
hangul-keyboard-2.xml
diff --git a/hangul/CMakeLists.txt b/hangul/CMakeLists.txt
index aa6e27e..93f7fb4 100644
--- a/hangul/CMakeLists.txt
+++ b/hangul/CMakeLists.txt
@@ -17,14 +17,11 @@
cmake_minimum_required(VERSION 3.0)
-include(FindPkgConfig)
-include(FindEXPAT)
include(GNUInstallDirs)
-option(ENABLE_EXTERNAL_KEYBOARDS
- "enable external keyboard xml file loading feature"
- ON
-)
+if(ENABLE_EXTERNAL_KEYBOARDS)
+ find_package(EXPAT)
+endif()
set(hangul_PUBLIC_HEADERS
hangul.h
@@ -37,7 +34,7 @@ set(hangul_PRIVATE_HEADERS
hanjacompatible.h
)
-add_library(hangul SHARED
+add_library(hangul
${hangul_PUBLIC_HEADERS}
${hangul_PRIVATE_HEADERS}
hangulctype.c
@@ -53,7 +50,7 @@ target_compile_definitions(hangul
PRIVATE -DTOP_SRCDIR=\"${CMAKE_SOURCE_DIR}\"
)
-if (ENABLE_EXTERNAL_KEYBOARDS)
+if(ENABLE_EXTERNAL_KEYBOARDS)
target_compile_definitions(hangul
PRIVATE -DENABLE_EXTERNAL_KEYBOARDS=1
)
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index 82e26d4..ffa968b 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -17,7 +17,7 @@
cmake_minimum_required(VERSION 3.0)
-include(FindGettext)
+find_package(Gettext)
include(GNUInstallDirs)
file(READ LINGUAS LINGUAS)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 433baf9..52415bf 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -17,7 +17,7 @@
cmake_minimum_required(VERSION 3.0)
-include(FindPkgConfig)
+find_package(PkgConfig)
add_executable(test-hangul
hangul.c