summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <kent@mysql.com/kent-amd64.(none)>2007-08-06 23:16:01 +0200
committerunknown <kent@mysql.com/kent-amd64.(none)>2007-08-06 23:16:01 +0200
commit1337c429fb559242bcafb3ca29de65dfa48a89d5 (patch)
tree7b218053b942a53e4c500c94ca3a1c0d7464d859 /storage
parente4d449a655ac16d43642cf5d57769c68468c979b (diff)
downloadmariadb-git-1337c429fb559242bcafb3ca29de65dfa48a89d5.tar.gz
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903 - Changed to do embedded build part as normal build, when WITH_EMBEDDED_SERVER is set. - Allow both normal and debug build with embedded. - Build static embedded library by pointing out all source and compile it all, i.e. not building libraries from libraries, not portable. - Let embedded use generated files from the "sql" directory, added dependencies to make sure built before embedded. - Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only linked in when debug target is used. - Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as others can't depend on it, not defined at configure time. Instead set the output file name. - Created work around for bug in CMake 2.4.6 and output names, to set the "mysqld<suffix>.pdb" name to the same base name. - Set the correct manifest "name" (patch by iggy) CMakeLists.txt: Changes for embedded and Windows libmysql/CMakeLists.txt: Changes for embedded and Windows libmysqld/CMakeLists.txt: Changes for embedded and Windows libmysqld/examples/CMakeLists.txt: Changes for embedded and Windows mysys/CMakeLists.txt: Changes for embedded and Windows regex/CMakeLists.txt: Changes for embedded and Windows server-tools/instance-manager/CMakeLists.txt: Changes for embedded and Windows sql/CMakeLists.txt: Changes for embedded and Windows storage/archive/CMakeLists.txt: Changes for embedded and Windows storage/blackhole/CMakeLists.txt: Changes for embedded and Windows storage/csv/CMakeLists.txt: Changes for embedded and Windows storage/example/CMakeLists.txt: Changes for embedded and Windows storage/federated/CMakeLists.txt: Changes for embedded and Windows storage/heap/CMakeLists.txt: Changes for embedded and Windows storage/innobase/CMakeLists.txt: Changes for embedded and Windows storage/myisam/CMakeLists.txt: Changes for embedded and Windows storage/myisammrg/CMakeLists.txt: Changes for embedded and Windows strings/CMakeLists.txt: Changes for embedded and Windows vio/CMakeLists.txt: Changes for embedded and Windows win/README: Changes for embedded and Windows win/configure.js: Changes for embedded and Windows win/mysql_manifest.cmake: Changes for embedded and Windows
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/CMakeLists.txt8
-rw-r--r--storage/blackhole/CMakeLists.txt7
-rw-r--r--storage/csv/CMakeLists.txt7
-rw-r--r--storage/example/CMakeLists.txt7
-rw-r--r--storage/federated/CMakeLists.txt10
-rwxr-xr-xstorage/heap/CMakeLists.txt10
-rwxr-xr-xstorage/innobase/CMakeLists.txt16
-rwxr-xr-xstorage/myisam/CMakeLists.txt41
-rwxr-xr-xstorage/myisammrg/CMakeLists.txt10
9 files changed, 73 insertions, 43 deletions
diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt
index 09227a6cc2d..9a1cfe081b6 100644
--- a/storage/archive/CMakeLists.txt
+++ b/storage/archive/CMakeLists.txt
@@ -20,5 +20,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(archive azio.c ha_archive.cc ha_archive.h)
-TARGET_LINK_LIBRARIES(archive zlib mysys dbug strings)
+
+SET(ARCHIVE_SOURCES azio.c ha_archive.cc ha_archive.h)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(archive ${ARCHIVE_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/blackhole/CMakeLists.txt b/storage/blackhole/CMakeLists.txt
index 6b02e1effa9..9b6dd7adac9 100644
--- a/storage/blackhole/CMakeLists.txt
+++ b/storage/blackhole/CMakeLists.txt
@@ -19,4 +19,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(blackhole ha_blackhole.cc ha_blackhole.h)
+
+SET(BLACKHOLE_SOURCES ha_blackhole.cc ha_blackhole.h)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(blackhole ${BLACKHOLE_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/csv/CMakeLists.txt b/storage/csv/CMakeLists.txt
index 359d1509a7e..bb0df45e5f4 100644
--- a/storage/csv/CMakeLists.txt
+++ b/storage/csv/CMakeLists.txt
@@ -19,4 +19,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(csv ha_tina.cc ha_tina.h transparent_file.cc transparent_file.h)
+
+SET(CSV_SOURCES ha_tina.cc ha_tina.h transparent_file.cc transparent_file.h)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(csv ${CSV_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/example/CMakeLists.txt b/storage/example/CMakeLists.txt
index f4e8639ef25..99c223f3f85 100644
--- a/storage/example/CMakeLists.txt
+++ b/storage/example/CMakeLists.txt
@@ -19,4 +19,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(example ha_example.cc)
+
+SET(EXAMPLE_SOURCES ha_example.cc)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(example ${EXAMPLE_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/federated/CMakeLists.txt b/storage/federated/CMakeLists.txt
index 359a8784877..62064a633b1 100644
--- a/storage/federated/CMakeLists.txt
+++ b/storage/federated/CMakeLists.txt
@@ -15,11 +15,13 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-IF(EMBEDDED_ONLY)
- ADD_DEFINITIONS(-DUSE_TLS)
-ENDIF(EMBEDDED_ONLY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(federated ha_federated.cc)
+
+SET(FEDERATED_SOURCES ha_federated.cc)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(federated ${FEDERATED_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt
index f4732397cc4..fd3ce149b2c 100755
--- a/storage/heap/CMakeLists.txt
+++ b/storage/heap/CMakeLists.txt
@@ -15,16 +15,18 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-IF(EMBEDDED_ONLY)
- ADD_DEFINITIONS(-DUSE_TLS)
-ENDIF(EMBEDDED_ONLY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(heap _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c
+
+SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create.c
ha_heap.cc
hp_delete.c hp_extra.c hp_hash.c hp_info.c hp_open.c hp_panic.c
hp_rename.c hp_rfirst.c hp_rkey.c hp_rlast.c hp_rnext.c hp_rprev.c
hp_rrnd.c hp_rsame.c hp_scan.c hp_static.c hp_update.c hp_write.c)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(heap ${HEAP_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index d2b6162ba26..47b1a566cd8 100755
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -15,18 +15,16 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-ADD_DEFINITIONS(-DMYSQL_SERVER -D_WIN32 -DWIN32 -D_LIB)
-IF(EMBEDDED_ONLY)
- ADD_DEFINITIONS(-DUSE_TLS)
-ENDIF(EMBEDDED_ONLY)
+ADD_DEFINITIONS(-DMYSQL_SERVER -D_WIN32 -D_LIB)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
- include
- handler
+ ${CMAKE_SOURCE_DIR}/storage/innobase/include
+ ${CMAKE_SOURCE_DIR}/storage/innobase/handler
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
+
+SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c
dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
@@ -57,3 +55,7 @@ ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c
usr/usr0sess.c
ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c ut/ut0vec.c ut/ut0list.c ut/ut0wqueue.c)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(innobase ${INNOBASE_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt
index de2880298b5..9d91bf0560a 100755
--- a/storage/myisam/CMakeLists.txt
+++ b/storage/myisam/CMakeLists.txt
@@ -16,16 +16,13 @@ INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-IF(EMBEDDED_ONLY)
- ADD_DEFINITIONS(-DUSE_TLS)
- ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
-ENDIF(EMBEDDED_ONLY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
+
+SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c ft_stem.c
ha_myisam.cc
ft_stopwords.c ft_update.c mi_cache.c mi_changed.c mi_check.c
mi_checksum.c mi_close.c mi_create.c mi_dbug.c mi_delete.c
@@ -37,21 +34,27 @@ ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c f
mi_unique.c mi_update.c mi_write.c rt_index.c rt_key.c rt_mbr.c
rt_split.c sort.c sp_key.c ft_eval.h myisamdef.h rt_index.h mi_rkey.c)
-ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
-TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys debug dbug strings zlib wsock32)
+IF(NOT SOURCE_SUBLIBS)
+
+ ADD_LIBRARY(myisam ${MYISAM_SOURCES})
+
+ ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c)
+ TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys debug dbug strings zlib wsock32)
+
+ ADD_EXECUTABLE(myisamchk myisamchk.c)
+ TARGET_LINK_LIBRARIES(myisamchk myisam mysys debug dbug strings zlib wsock32)
-ADD_EXECUTABLE(myisamchk myisamchk.c)
-TARGET_LINK_LIBRARIES(myisamchk myisam mysys debug dbug strings zlib wsock32)
+ ADD_EXECUTABLE(myisamlog myisamlog.c)
+ TARGET_LINK_LIBRARIES(myisamlog myisam mysys debug dbug strings zlib wsock32)
-ADD_EXECUTABLE(myisamlog myisamlog.c)
-TARGET_LINK_LIBRARIES(myisamlog myisam mysys debug dbug strings zlib wsock32)
+ ADD_EXECUTABLE(myisampack myisampack.c)
+ TARGET_LINK_LIBRARIES(myisampack myisam mysys debug dbug strings zlib wsock32)
-ADD_EXECUTABLE(myisampack myisampack.c)
-TARGET_LINK_LIBRARIES(myisampack myisam mysys debug dbug strings zlib wsock32)
+ IF(EMBED_MANIFESTS)
+ MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisamchk" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisamlog" "asInvoker")
+ MYSQL_EMBED_MANIFEST("myisampack" "asInvoker")
+ ENDIF(EMBED_MANIFESTS)
-IF(EMBED_MANIFESTS)
- MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker")
- MYSQL_EMBED_MANIFEST("myisamchk" "asInvoker")
- MYSQL_EMBED_MANIFEST("myisamlog" "asInvoker")
- MYSQL_EMBED_MANIFEST("myisampack" "asInvoker")
-ENDIF(EMBED_MANIFESTS)
+ENDIF(NOT SOURCE_SUBLIBS)
diff --git a/storage/myisammrg/CMakeLists.txt b/storage/myisammrg/CMakeLists.txt
index b35638ac91d..848f2dfea43 100755
--- a/storage/myisammrg/CMakeLists.txt
+++ b/storage/myisammrg/CMakeLists.txt
@@ -15,17 +15,19 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
-IF(EMBEDDED_ONLY)
- ADD_DEFINITIONS(-DUSE_TLS)
-ENDIF(EMBEDDED_ONLY)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-ADD_LIBRARY(myisammrg myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myrg_info.c
+
+SET(MYISAMMRG_SOURCES myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myrg_info.c
ha_myisammrg.cc
myrg_locking.c myrg_open.c myrg_panic.c myrg_queue.c myrg_range.c
myrg_rfirst.c myrg_rkey.c myrg_rlast.c myrg_rnext.c myrg_rnext_same.c
myrg_rprev.c myrg_rrnd.c myrg_rsame.c myrg_static.c myrg_update.c
myrg_write.c)
+
+IF(NOT SOURCE_SUBLIBS)
+ ADD_LIBRARY(myisammrg ${MYISAMMRG_SOURCES})
+ENDIF(NOT SOURCE_SUBLIBS)