summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-01-11 14:56:19 +0100
committerVladislav Vaintroub <wlad@montyprogram.com>2012-01-11 14:56:19 +0100
commit6404fcbf9e5924b54a01a033e2852939a2491240 (patch)
tree994d9d2fa2ecb2b1103bec807b1aba0b36dc3803 /cmake
parent67cfb8a5c564b2f1fb54e799bf331907f106ea4d (diff)
parent44c8745ff51506e7554a3a4263d90d32cb4dee6e (diff)
downloadmariadb-git-6404fcbf9e5924b54a01a033e2852939a2491240.tar.gz
merge 5.5
Diffstat (limited to 'cmake')
-rw-r--r--cmake/plugin.cmake28
1 files changed, 20 insertions, 8 deletions
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 5e59b71fd91..a74802c2314 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -111,8 +111,27 @@ MACRO(MYSQL_ADD_PLUGIN)
SET(ARG_DEPENDENCIES)
ENDIF()
SET(BUILD_PLUGIN 1)
+
+ IF(NOT ARG_MODULE_OUTPUT_NAME)
+ IF(ARG_STORAGE_ENGINE)
+ SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
+ ELSE()
+ SET(ARG_MODULE_OUTPUT_NAME "${target}")
+ ENDIF()
+ ENDIF()
+
# Build either static library or module
IF (WITH_${plugin} AND NOT ARG_MODULE_ONLY)
+
+ IF(CMAKE_GENERATOR MATCHES "Makefiles")
+ # If there is a shared library from previous shared build,
+ # remove it. This is done just for mysql-test-run.pl
+ # so it does not try to use stale shared lib as plugin
+ # in test.
+ FILE(REMOVE
+ ${CMAKE_CURRENT_BINARY_DIR}/${ARG_MODULE_OUTPUT_NAME}${CMAKE_SHARED_MODULE_SUFFIX})
+ ENDIF()
+
ADD_LIBRARY(${target} STATIC ${SOURCES})
SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITONS "MYSQL_SERVER")
DTRACE_INSTRUMENT(${target})
@@ -159,14 +178,7 @@ MACRO(MYSQL_ADD_PLUGIN)
PARENT_SCOPE)
ENDIF()
ELSEIF(NOT WITHOUT_${plugin} AND NOT ARG_STATIC_ONLY AND NOT WITHOUT_DYNAMIC_PLUGINS)
- IF(NOT ARG_MODULE_OUTPUT_NAME)
- IF(ARG_STORAGE_ENGINE)
- SET(ARG_MODULE_OUTPUT_NAME "ha_${target}")
- ELSE()
- SET(ARG_MODULE_OUTPUT_NAME "${target}")
- ENDIF()
- ENDIF()
-
+
ADD_VERSION_INFO(${target} MODULE SOURCES)
ADD_LIBRARY(${target} MODULE ${SOURCES})
DTRACE_INSTRUMENT(${target})