Kouhei Sutou
null+****@clear*****
Sun Dec 24 13:37:49 JST 2017
Kouhei Sutou 2017-12-24 13:37:49 +0900 (Sun, 24 Dec 2017) New Revision: f1727cfc3c8fa8e24d54ecdc4a7a5f57d0f231ab https://github.com/mroonga/mroonga/commit/f1727cfc3c8fa8e24d54ecdc4a7a5f57d0f231ab Message: Ensure linking libmysqlservices.a Modified files: CMakeLists.txt Modified: CMakeLists.txt (+9 -12) =================================================================== --- CMakeLists.txt 2017-12-24 13:22:14 +0900 (cb7e60af) +++ CMakeLists.txt 2017-12-24 13:37:49 +0900 (a3df4c9d) @@ -1,6 +1,6 @@ # -*- indent-tabs-mode: nil -*- # -# Copyright(C) 2012-2015 Kouhei Sutou <kou �� clear-code.com> +# Copyright(C) 2012-2017 Kouhei Sutou <kou �� clear-code.com> # Copyright(C) 2013 Kentoku SHIBA # # This library is free software; you can redistribute it and/or @@ -245,7 +245,6 @@ set(MYSQL_INCLUDE_DIRS if(MRN_BUNDLED) set(MYSQL_PLUGIN_DIR "${INSTALL_PLUGINDIR}") - set(MYSQL_SERVICES_LIB_DIR "${MYSQL_BUILD_DIR}/libservices") set(MYSQL_CFLAGS "${CMAKE_C_FLAGS}") set(MYSQL_VERSION "${MYSQL_BASE_VERSION}") else() @@ -259,11 +258,10 @@ else() set_mysql_config_value("--plugindir" MYSQL_PLUGIN_DIR) set_mysql_config_value("--variable=pkglibdir" MYSQL_PKG_LIB_DIR) - set(MYSQL_BUILD_LIBSERVICES_DIR "${MYSQL_BUILD_DIR}/libservices") - if(EXISTS "${MYSQL_BUILD_LIBSERVICES_DIR}/libmysqlservices.a") - set(MYSQL_SERVICES_LIB_DIR "${MYSQL_BUILD_LIBSERVICES_DIR}") - else() - set(MYSQL_SERVICES_LIB_DIR "${MYSQL_PKG_LIB_DIR}") + set(MYSQL_SERVICES_LIB_STATIC + "${MYSQL_BUILD_DIR}/libservices/libmysqlservices.a") + if(NOT EXISTS "${MYSQL_SERVICES_LIB_STATIC}") + set(MYSQL_SERVICES_LIB_STATIC "${MYSQL_PKG_LIB_DIR}/libmysqlservices.a") endif() set_mysql_config_value("--cflags" MYSQL_CFLAGS) set_mysql_config_value("--version" MYSQL_VERSION) @@ -317,9 +315,6 @@ if(WIN32) set(MYSQL_LIBRARY_DIRS "${MYSQL_BUILD_DIR}/lib" "${MYSQL_BUILD_DIR}/libmysqld") -else() - set(MYSQL_LIBRARY_DIRS - "${MYSQL_SERVICES_LIB_DIR}") endif() link_directories( ${MRN_LIBRARY_DIRS} @@ -342,8 +337,10 @@ if(MRN_BUNDLED) else() add_library(mroonga MODULE ${MRN_ALL_SOURCES}) - set(MYSQL_LIBRARIES "mysqlservices") - target_link_libraries(mroonga ${GROONGA_LIBRARIES} ${MYSQL_LIBRARIES}) + if(NOT WIN32) + set(MRN_LIBRARIES ${MRN_LIBRARIES} ${MYSQL_SERVICES_LIB_STATIC}) + endif() + target_link_libraries(mroonga ${MRN_LIBRARIES}) option(WITH_DEBUG "Enable debug options" OFF) if(WITH_DEBUG) -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20171224/60745c60/attachment-0001.htm