summaryrefslogtreecommitdiff
path: root/hangul-config.cmake.in
diff options
context:
space:
mode:
authorChoe Hwanjin <choe.hwanjin@gmail.com>2021-09-28 22:30:52 +0900
committerChoe Hwanjin <choe.hwanjin@gmail.com>2021-09-28 22:30:52 +0900
commitdab127b85d1b4c88a1a729b1cd6f9000ab25eb77 (patch)
tree51a86de776d2689258d5a1f90b37e783fd75d7b5 /hangul-config.cmake.in
parentb6f983765b6c192b50d3dc05c3c7863ca446b259 (diff)
downloadlibhangul-dab127b85d1b4c88a1a729b1cd6f9000ab25eb77.tar.gz
cmake: Add hangul-config.cmake.in
실수로 파일을 add하지 않았다. 추가한다. 추가로 cmake 디렉토리 이름을 하드코딩하지 않고 CMAKE_PROJECT_NAME 변수를 사용하도록 변경한다. https://github.com/libhangul/libhangul/issues/56
Diffstat (limited to 'hangul-config.cmake.in')
-rw-r--r--hangul-config.cmake.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/hangul-config.cmake.in b/hangul-config.cmake.in
new file mode 100644
index 0000000..ea67762
--- /dev/null
+++ b/hangul-config.cmake.in
@@ -0,0 +1,36 @@
+# libhangul
+# Copyright 2021 Choe Hwanjin
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+include("${CMAKE_CURRENT_LIST_DIR}/hangul-config-version.cmake")
+
+@PACKAGE_INIT@
+
+message("LIBHANGUL_INCLUDE_DIR: @PACKAGE_LIBHANGUL_INCLUDE_DIR@")
+message("LIBHANGUL_LIBRARY_DIR: @PACKAGE_LIBHANGUL_LIBRARY_DIR@")
+
+set_and_check(LIBHANGUL_INCLUDE_DIR "@PACKAGE_LIBHANGUL_INCLUDE_DIR@")
+set_and_check(LIBHANGUL_LIBRARY_DIR "@PACKAGE_LIBHANGUL_LIBRARY_DIR@")
+
+set(LIBHANGUL_INCLUDE_DIR2 "@LIBHANGUL_INCLUDE_DIR@")
+set(LIBHANGUL_LIBRARY_DIR2 "@LIBHANGUL_LIBRARY_DIR@")
+
+
+add_library(hangul SHARED IMPORTED)
+set_target_properties(hangul PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${LIBHANGUL_INCLUDE_DIR}"
+ IMPORTED_LOCATION "${LIBHANGUL_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}hangul${CMAKE_SHARED_LIBRARY_SUFFIX}"
+)