[Groonga-commit] groonga/groonga-normalizer-mysql at 8de3348 [master] cmake: support bundled build

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Apr 25 11:26:01 JST 2013


Kouhei Sutou	2013-04-25 11:26:01 +0900 (Thu, 25 Apr 2013)

  New Revision: 8de3348466fd409f71641b0d72f552ff253bb81b
  https://github.com/groonga/groonga-normalizer-mysql/commit/8de3348466fd409f71641b0d72f552ff253bb81b

  Message:
    cmake: support bundled build

  Modified files:
    CMakeLists.txt

  Modified: CMakeLists.txt (+13 -1)
===================================================================
--- CMakeLists.txt    2013-04-24 16:32:21 +0900 (dd65349)
+++ CMakeLists.txt    2013-04-25 11:26:01 +0900 (f16bbce)
@@ -18,8 +18,19 @@
 cmake_minimum_required(VERSION 2.6)
 project(groonga-normalizer-mysql)
 
-file(READ "${CMAKE_SOURCE_DIR}/version" VERSION)
+file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version" VERSION)
 
+if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
+  set(GROONGA_NORMALIZER_MYSQL_BUNDLED FALSE)
+else()
+  set(GROONGA_NORMALIZER_MYSQL_BUNDLED TRUE)
+endif()
+
+if(GROONGA_NORMALIZER_MYSQL_BUNDLED)
+  set(GROONGA_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
+  set(GROONGA_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib")
+  set(GROONGA_PLUGINS_DIR "${GRN_PLUGINS_DIR}")
+else()
 include(FindPkgConfig)
 include(${CMAKE_SOURCE_DIR}/build/cmake_modules/ReadFileList.cmake)
 
@@ -28,6 +39,7 @@ string(STRIP "${GROONGA_REQUIRED_VERSION}" GROONGA_REQUIRED_VERSION)
 
 pkg_check_modules(GROONGA REQUIRED "groonga >= ${GROONGA_REQUIRED_VERSION}")
 _pkgconfig_invoke(groonga GROONGA PLUGINS_DIR "" --variable=pluginsdir)
+endif()
 
 add_definitions(
   -DHAVE_CONFIG_H
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index