summaryrefslogtreecommitdiff
path: root/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt')
-rw-r--r--storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt23
1 files changed, 16 insertions, 7 deletions
diff --git a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
index 484a7d63bfd..3577572a9f1 100644
--- a/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
+++ b/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com>
+# Copyright(C) 2013-2015 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -18,6 +18,16 @@
cmake_minimum_required(VERSION 2.6)
project(groonga-normalizer-mysql)
+if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED)
+ set(GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT
+ ${GROONGA_NORMALIZER_MYSQL_EMBED})
+else()
+ set(GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT OFF)
+endif()
+option(GROONGA_NORMALIZER_MYSQL_EMBED
+ "Build as a static library to embed into an application"
+ ${GROONGA_NORMALIZER_MYSQL_EMBED_DEFAULT})
+
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version" VERSION)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -53,12 +63,11 @@ link_directories(
add_subdirectory(normalizers)
-configure_file(
- groonga-normalizer-mysql.pc.in
- "${CMAKE_CURRENT_BINARY_DIR}/groonga-normalizer-mysql.pc"
- @ONLY)
-
-if(NOT GROONGA_NORMALIZER_MYSQL_FOUND)
+if(NOT GROONGA_NORMALIZER_MYSQL_EMBED)
+ configure_file(
+ groonga-normalizer-mysql.pc.in
+ "${CMAKE_CURRENT_BINARY_DIR}/groonga-normalizer-mysql.pc"
+ @ONLY)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/groonga-normalizer-mysql.pc"
DESTINATION "lib/pkgconfig/")