~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/CMakeLists.txt

Tags: innodb-plugin-1.0.2
InnoDB Plugin 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
18
18
ADD_DEFINITIONS(-DMYSQL_SERVER -D_WIN32 -D_LIB)
19
19
 
 
20
# Bug 19424 - InnoDB: Possibly a memory overrun of the buffer being freed (64-bit Visual C)
 
21
# Removing Win64 compiler optimizations for all innodb/mem/* files.
 
22
IF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
 
23
  SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/storage/innobase/mem/mem0mem.c
 
24
                              ${CMAKE_SOURCE_DIR}/storage/innobase/mem/mem0pool.c
 
25
                              PROPERTIES COMPILE_FLAGS -Od)
 
26
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio" AND CMAKE_SIZEOF_VOID_P MATCHES 8)
 
27
 
20
28
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
21
29
                    ${CMAKE_SOURCE_DIR}/storage/innobase/include
22
30
                    ${CMAKE_SOURCE_DIR}/storage/innobase/handler
61
69
IF(NOT SOURCE_SUBLIBS)
62
70
  ADD_LIBRARY(innobase ${INNOBASE_SOURCES})
63
71
  ADD_DEPENDENCIES(innobase GenError)
 
72
 
 
73
  IF(INNODB_DYNAMIC_PLUGIN)
 
74
    # The dynamic plugin requires CMake 2.6.0 or later. Otherwise, the /DELAYLOAD property
 
75
    # will not be set
 
76
    CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
 
77
    ADD_LIBRARY(ha_innodb SHARED ${INNOBASE_SOURCES} ha_innodb.def handler/win_delay_loader.cc)
 
78
    ADD_DEPENDENCIES(ha_innodb GenError mysqld)
 
79
    # If build type is not specified as Release, default to Debug
 
80
    # This is a workaround to a problem in CMake 2.6, which does not
 
81
    # set the path of mysqld.lib correctly
 
82
    IF(CMAKE_BUILD_TYPE MATCHES Release)
 
83
       SET(CMAKE_BUILD_TYPE "Release")
 
84
    ELSE(CMAKE_BUILD_TYPE MATCHES Release)
 
85
       SET(CMAKE_BUILD_TYPE "Debug") 
 
86
    ENDIF(CMAKE_BUILD_TYPE MATCHES Release)
 
87
    TARGET_LINK_LIBRARIES(ha_innodb strings zlib)
 
88
    TARGET_LINK_LIBRARIES(ha_innodb ${CMAKE_SOURCE_DIR}/sql/${CMAKE_BUILD_TYPE}/mysqld.lib)
 
89
    SET_TARGET_PROPERTIES(ha_innodb PROPERTIES OUTPUT_NAME ha_innodb)
 
90
    SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/MAP /MAPINFO:EXPORTS")
 
91
    SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/ENTRY:\"_DllMainCRTStartup@12\"")
 
92
    SET_TARGET_PROPERTIES(ha_innodb PROPERTIES COMPILE_FLAGS "-DMYSQL_DYNAMIC_PLUGIN")
 
93
    SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/DELAYLOAD:mysqld.exe")
 
94
  ENDIF(INNODB_DYNAMIC_PLUGIN)
 
95
 
64
96
ENDIF(NOT SOURCE_SUBLIBS)