~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/CMakeLists.txt

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009 Oracle/Innobase Oy
2
 
#
3
 
# This program is free software; you can redistribute it and/or modify
4
 
# it under the terms of the GNU General Public License as published by
5
 
# the Free Software Foundation; version 2 of the License.
6
 
7
 
# This program is distributed in the hope that it will be useful,
8
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 
# GNU General Public License for more details.
11
 
12
 
# You should have received a copy of the GNU General Public License
13
 
# along with this program; if not, write to the Free Software
14
 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
15
 
 
16
 
# This is the CMakeLists for InnoDB Plugin
17
 
 
18
 
# The dynamic plugin requires CMake 2.6.0 or later. Otherwise, the /DELAYLOAD
19
 
# property will not be set
20
 
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
21
 
 
22
 
# When PROJECT is defined, a separate .sln file will be generated.
23
 
# PROJECT (INNODB_PLUGIN)
24
 
 
25
 
MESSAGE(STATUS "Enter InnoDB ...")
26
 
MESSAGE(STATUS "INNODB_DYNAMIC_PLUGIN: " ${INNODB_DYNAMIC_PLUGIN})
27
 
 
28
 
# Print out CMake info
29
 
MESSAGE(STATUS "CMAKE_GENERATOR: " ${CMAKE_GENERATOR})
30
 
MESSAGE(STATUS "CMAKE_SOURCE_DIR: " ${CMAKE_SOURCE_DIR})
31
 
 
32
 
# Print out system information
33
 
MESSAGE(STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM})
34
 
MESSAGE(STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR})
35
 
MESSAGE(STATUS "UNIX: " ${UNIX})
36
 
MESSAGE(STATUS "WIN32: " ${WIN32})
37
 
 
38
 
IF (CMAKE_SIZEOF_VOID_P MATCHES 8)
39
 
        SET(WIN64 TRUE)
40
 
ENDIF (CMAKE_SIZEOF_VOID_P MATCHES 8)
41
 
 
42
 
MESSAGE(STATUS "WIN64: " ${WIN64})
43
 
MESSAGE(STATUS "MSVC: " ${MSVC})
44
 
 
45
 
# Check type sizes
46
 
include(CheckTypeSize)
47
 
 
48
 
# Currently, the checked results are not used.
49
 
CHECK_TYPE_SIZE(int SIZEOF_INT)
50
 
CHECK_TYPE_SIZE(long SIZEOF_LONG)
51
 
CHECK_TYPE_SIZE(void* SIZEOF_VOID_P)
52
 
 
53
 
# Include directories under innobase
54
 
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/innobase/include
55
 
                    ${CMAKE_SOURCE_DIR}/storage/innobase/handler)
56
 
 
57
 
# Include directories under mysql
58
 
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
59
 
                    ${CMAKE_SOURCE_DIR}/sql
60
 
                    ${CMAKE_SOURCE_DIR}/regex
61
 
                    ${CMAKE_SOURCE_DIR}/zlib
62
 
                    ${CMAKE_SOURCE_DIR}/extra/yassl/include)
63
 
 
64
 
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
65
 
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
66
 
IF(MSVC AND $(WIN64))
67
 
        SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
68
 
                                    PROPERTIES COMPILE_FLAGS -Od)
69
 
ENDIF(MSVC AND $(WIN64))
70
 
 
71
 
SET(INNODB_SOURCES      btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
72
 
                        buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
73
 
                        data/data0data.c data/data0type.c
74
 
                        dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
75
 
                        dyn/dyn0dyn.c
76
 
                        eval/eval0eval.c eval/eval0proc.c
77
 
                        fil/fil0fil.c
78
 
                        fsp/fsp0fsp.c
79
 
                        fut/fut0fut.c fut/fut0lst.c
80
 
                        ha/ha0ha.c ha/hash0hash.c ha/ha0storage.c
81
 
                        ibuf/ibuf0ibuf.c
82
 
                        pars/lexyy.c pars/pars0grm.c pars/pars0opt.c pars/pars0pars.c pars/pars0sym.c
83
 
                        lock/lock0lock.c lock/lock0iter.c
84
 
                        log/log0log.c log/log0recv.c
85
 
                        mach/mach0data.c
86
 
                        mem/mem0mem.c mem/mem0pool.c
87
 
                        mtr/mtr0log.c mtr/mtr0mtr.c
88
 
                        os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
89
 
                        page/page0cur.c page/page0page.c page/page0zip.c
90
 
                        que/que0que.c
91
 
                        handler/ha_innodb.cc handler/handler0alter.cc handler/i_s.cc handler/mysql_addons.cc
92
 
                        read/read0read.c
93
 
                        rem/rem0cmp.c rem/rem0rec.c
94
 
                        row/row0ext.c row/row0ins.c row/row0merge.c row/row0mysql.c row/row0purge.c row/row0row.c
95
 
                        row/row0sel.c row/row0uins.c row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
96
 
                        srv/srv0que.c srv/srv0srv.c srv/srv0start.c
97
 
                        sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c
98
 
                        thr/thr0loc.c
99
 
                        trx/trx0i_s.c trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c
100
 
                        trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c
101
 
                        usr/usr0sess.c
102
 
                        ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rbt.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c
103
 
                        ut/ut0list.c ut/ut0wqueue.c)
104
 
 
105
 
IF(NOT SOURCE_SUBLIBS)
106
 
        # INNODB_RW_LOCKS_USE_ATOMICS may be defined only if HAVE_WINDOWS_ATOMICS is defined.
107
 
        # Windows Interlocked functions require Windows 2000 or newer operating system
108
 
        ADD_DEFINITIONS(-D_WIN32 -DHAVE_WINDOWS_ATOMICS -DINNODB_RW_LOCKS_USE_ATOMICS -DIB_HAVE_PAUSE_INSTRUCTION)
109
 
        ADD_LIBRARY(innobase STATIC ${INNODB_SOURCES})
110
 
        # Require mysqld_error.h, which is built as part of the GenError
111
 
        ADD_DEPENDENCIES(innobase GenError)
112
 
        # only set MYSQL_SERVER for the builtin engine, not the plugin
113
 
        SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_FLAGS "-DMYSQL_SERVER")
114
 
 
115
 
        # Dynamic plugin ha_innodb.dll
116
 
        IF(INNODB_DYNAMIC_PLUGIN)
117
 
                ADD_LIBRARY(ha_innodb SHARED ${INNODB_SOURCES} ha_innodb.def handler/win_delay_loader.cc)
118
 
                # Require mysqld_error.h, which is built as part of the GenError
119
 
                # Also require mysqld.lib, which is built as part of the mysqld
120
 
                ADD_DEPENDENCIES(ha_innodb GenError mysqld)
121
 
 
122
 
                TARGET_LINK_LIBRARIES(ha_innodb ${CMAKE_SOURCE_DIR}/sql/\$\(OutDir\)/mysqld.lib)
123
 
                SET_TARGET_PROPERTIES(ha_innodb PROPERTIES OUTPUT_NAME ha_innodb)
124
 
                SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/MAP /MAPINFO:EXPORTS")
125
 
                SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/ENTRY:\"_DllMainCRTStartup@12\"")
126
 
                SET_TARGET_PROPERTIES(ha_innodb PROPERTIES COMPILE_FLAGS "-DMYSQL_DYNAMIC_PLUGIN")
127
 
                SET_TARGET_PROPERTIES(ha_innodb PROPERTIES LINK_FLAGS "/DELAYLOAD:mysqld.exe")
128
 
        ENDIF(INNODB_DYNAMIC_PLUGIN)
129
 
ENDIF(NOT SOURCE_SUBLIBS)
130
 
 
131
 
MESSAGE(STATUS "Exit InnoDB ...")