Commit 903d145f authored by Kentoku SHIBA's avatar Kentoku SHIBA

cmake: use "mroonga" instead of "ha_mroonga" for plugin name

parent c65b9ee7
...@@ -41,7 +41,7 @@ else() ...@@ -41,7 +41,7 @@ else()
endif() endif()
if(MRN_BUNDLED) if(MRN_BUNDLED)
if(WITHOUT_HA_MROONGA OR WITHOUT_HA_MROONGA_STORAGE_ENGINE) if(WITHOUT_MROONGA OR WITHOUT_MROONGA_STORAGE_ENGINE)
return() return()
endif() endif()
endif() endif()
...@@ -246,17 +246,15 @@ link_directories( ...@@ -246,17 +246,15 @@ link_directories(
if(MRN_BUNDLED) if(MRN_BUNDLED)
if(GROONGA_NORMALIZER_MYSQL_FOUND AND MRN_GROONGA_BUNDLED) if(GROONGA_NORMALIZER_MYSQL_FOUND AND MRN_GROONGA_BUNDLED)
mysql_add_plugin(ha_mroonga mysql_add_plugin(mroonga
"${MROONGA_SOURCES};${MRN_UDF_SOURCES};${MRN_GRN_NORMALIZER_MYSQL_SOURCES};${LIBMRN_NEED_MYSQL_SOURCES};${LIBMRN_NO_MYSQL_SOURCES}" "${MROONGA_SOURCES};${MRN_UDF_SOURCES};${MRN_GRN_NORMALIZER_MYSQL_SOURCES};${LIBMRN_NEED_MYSQL_SOURCES};${LIBMRN_NO_MYSQL_SOURCES}"
STORAGE_ENGINE MODULE_ONLY STORAGE_ENGINE MODULE_ONLY
LINK_LIBRARIES ${GROONGA_LIBRARIES} LINK_LIBRARIES ${GROONGA_LIBRARIES})
MODULE_OUTPUT_NAME "ha_mroonga")
else() else()
mysql_add_plugin(ha_mroonga mysql_add_plugin(mroonga
"${MROONGA_SOURCES};${MRN_UDF_SOURCES};${LIBMRN_NEED_MYSQL_SOURCES};${LIBMRN_NO_MYSQL_SOURCES}" "${MROONGA_SOURCES};${MRN_UDF_SOURCES};${LIBMRN_NEED_MYSQL_SOURCES};${LIBMRN_NO_MYSQL_SOURCES}"
STORAGE_ENGINE MODULE_ONLY STORAGE_ENGINE MODULE_ONLY
LINK_LIBRARIES ${GROONGA_LIBRARIES} LINK_LIBRARIES ${GROONGA_LIBRARIES})
MODULE_OUTPUT_NAME "ha_mroonga")
endif() endif()
set(EXPANDED_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}") set(EXPANDED_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBDIR}")
list(FIND list(FIND
...@@ -264,47 +262,47 @@ if(MRN_BUNDLED) ...@@ -264,47 +262,47 @@ if(MRN_BUNDLED)
"${EXPANDED_INSTALL_LIBDIR}" "${EXPANDED_INSTALL_LIBDIR}"
EXPANDED_INSTALL_LIBDIR_INDEX_IN_IMPLICIT_LINK_DIRECTORIES) EXPANDED_INSTALL_LIBDIR_INDEX_IN_IMPLICIT_LINK_DIRECTORIES)
if(EXPANDED_INSTALL_LIBDIR_INDEX_IN_IMPLICIT_LINK_DIRECTORIES EQUAL -1) if(EXPANDED_INSTALL_LIBDIR_INDEX_IN_IMPLICIT_LINK_DIRECTORIES EQUAL -1)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
INSTALL_RPATH "${EXPANDED_INSTALL_LIBDIR}") INSTALL_RPATH "${EXPANDED_INSTALL_LIBDIR}")
endif() endif()
else() else()
add_library(ha_mroonga MODULE add_library(mroonga MODULE
${MROONGA_SOURCES} ${MROONGA_SOURCES}
${MRN_UDF_SOURCES} ${MRN_UDF_SOURCES}
${LIBMRN_NO_MYSQL_SOURCES} ${LIBMRN_NO_MYSQL_SOURCES}
${LIBMRN_NEED_MYSQL_SOURCES}) ${LIBMRN_NEED_MYSQL_SOURCES})
set(MYSQL_LIBRARIES "mysqlservices") set(MYSQL_LIBRARIES "mysqlservices")
target_link_libraries(ha_mroonga ${GROONGA_LIBRARIES} ${MYSQL_LIBRARIES}) target_link_libraries(mroonga ${GROONGA_LIBRARIES} ${MYSQL_LIBRARIES})
option(WITH_DEBUG "Enable debug options" OFF) option(WITH_DEBUG "Enable debug options" OFF)
if(WITH_DEBUG) if(WITH_DEBUG)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "SAFE_MUTEX") COMPILE_DEFINITIONS "SAFE_MUTEX")
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
set(MRN_C_COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS} -g3 -O0") set(MRN_C_COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS} -g3 -O0")
set(MRN_CXX_COMPILE_FLAGS "${MRN_CXX_COMPILE_FLAGS} -g3 -O0") set(MRN_CXX_COMPILE_FLAGS "${MRN_CXX_COMPILE_FLAGS} -g3 -O0")
endif() endif()
else() else()
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "DBUG_OFF") COMPILE_DEFINITIONS "DBUG_OFF")
endif() endif()
option(WITH_DEBUG_FULL "Enable full debug options" OFF) option(WITH_DEBUG_FULL "Enable full debug options" OFF)
if(WITH_DEBUG_FULL) if(WITH_DEBUG_FULL)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "SAFE_MUTEX" "SAFEMALLOC") COMPILE_DEFINITIONS "SAFE_MUTEX" "SAFEMALLOC")
endif() endif()
option(DISABLE_FAST_MUTEXES "Force disabling fast mutex" OFF) option(DISABLE_FAST_MUTEXES "Force disabling fast mutex" OFF)
if(DISABLE_FAST_MUTEXES) if(DISABLE_FAST_MUTEXES)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "FORCE_FAST_MUTEX_DISABLED=1") COMPILE_DEFINITIONS "FORCE_FAST_MUTEX_DISABLED=1")
endif() endif()
option(WITH_FAST_MUTEXES "Enable fast mutex" OFF) option(WITH_FAST_MUTEXES "Enable fast mutex" OFF)
if(WITH_FAST_MUTEXES) if(WITH_FAST_MUTEXES)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "MY_PTHREAD_FASTMUTEX") COMPILE_DEFINITIONS "MY_PTHREAD_FASTMUTEX")
endif() endif()
...@@ -327,31 +325,31 @@ else() ...@@ -327,31 +325,31 @@ else()
COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS}") COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS}")
set_source_files_properties(${LIBMRN_NO_MYSQL_SOURCES} PROPERTIES set_source_files_properties(${LIBMRN_NO_MYSQL_SOURCES} PROPERTIES
COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS}") COMPILE_FLAGS "${MRN_C_COMPILE_FLAGS}")
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN") COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
set_target_properties(ha_mroonga PROPERTIES set_target_properties(mroonga PROPERTIES
PREFIX "" PREFIX ""
OUTPUT_NAME "ha_mroonga") OUTPUT_NAME "ha_mroonga")
install(TARGETS ha_mroonga DESTINATION "${MYSQL_PLUGIN_DIR}") install(TARGETS mroonga DESTINATION "${MYSQL_PLUGIN_DIR}")
endif() endif()
if(GROONGA_NORMALIZER_MYSQL_FOUND) if(GROONGA_NORMALIZER_MYSQL_FOUND)
set(WITH_GROONGA_NORMALIZER_MYSQL 1) set(WITH_GROONGA_NORMALIZER_MYSQL 1)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "WITH_GROONGA_NORMALIZER_MYSQL=1") COMPILE_DEFINITIONS "WITH_GROONGA_NORMALIZER_MYSQL=1")
if(MRN_GROONGA_BUNDLED) if(MRN_GROONGA_BUNDLED)
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_IS_BUNDLED_STATIC=1") COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_IS_BUNDLED_STATIC=1")
else() else()
set(GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME \"normalizers/mysql\") set(GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME \"normalizers/mysql\")
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME=\"normalizers/mysql\"") COMPILE_DEFINITIONS "GROONGA_NORMALIZER_MYSQL_PLUGIN_NAME=\"normalizers/mysql\"")
endif() endif()
endif() endif()
set(MRN_DEFAULT_PARSER "TokenBigram" CACHE STRING "The default fulltext parser") set(MRN_DEFAULT_PARSER "TokenBigram" CACHE STRING "The default fulltext parser")
set_property(TARGET ha_mroonga APPEND PROPERTY set_property(TARGET mroonga APPEND PROPERTY
COMPILE_DEFINITIONS "MRN_PARSER_DEFAULT=\"${MRN_DEFAULT_PARSER}\"") COMPILE_DEFINITIONS "MRN_PARSER_DEFAULT=\"${MRN_DEFAULT_PARSER}\"")
configure_file( configure_file(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment