Skip to content

Commit

Permalink
CMakeLists.txt, README, configure.js
Browse files Browse the repository at this point in the history
  Several adjustments to make client libraries pass the link test
  on both win32 and winx64, Visual Studio 2003 and 2005 (bug#30118)

--BZR--
revision-id: [email protected]/kent-amd64.(none)-20070803195137-14015
property-file-info: ld7:file_id59:sp1f-readme-20060831175237-zacffbzavgr7gudfhx3kjpxy7oycydqw7:message51:- Removed references to PARTITION engine, 5.1 only
property-file-info: 4:path10:win/READMEed7:file_id65:sp1f-configure.js-20060831175237-wtkkcfy2qif537uwyjhphlbee2gfe7rs7:message51:- Removed references to PARTITION engine, 5.1 only
property-file-info: 4:path16:win/configure.jsed7:file_id67:sp1f-cmakelists.txt-20060831175236-uva2lw4uramzkyx4a5w66os4jz5cv7g57:message117:Use the special 'debug' list element to mark that "dbug" library
property-file-info: is only to be linked against if build type "Debug".
property-file-info: 4:path20:extra/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-isyf2yt2n4jgrnjcfu6r2327heoabcyx7:message117:Use the special 'debug' list element to mark that "dbug" library
property-file-info: is only to be linked against if build type "Debug".
property-file-info: 4:path21:myisam/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20070418112138-acihcbj7ovt6jifuq7fzvs4mdjxtqvsz7:message117:Use the special 'debug' list element to mark that "dbug" library
property-file-info: is only to be linked against if build type "Debug".
property-file-info: 4:path22:scripts/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-odaylgvbqfabopzjlssuey6qon5k7v627:message117:Use the special 'debug' list element to mark that "dbug" library
property-file-info: is only to be linked against if build type "Debug".
property-file-info: 4:path44:server-tools/instance-manager/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-esoeu5kpdtwjvehkghwy6fzbleniq2wy7:message117:Use the special 'debug' list element to mark that "dbug" library
property-file-info: is only to be linked against if build type "Debug".
property-file-info: 4:path18:sql/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175236-433hkm7nrqfjbwios4ancgytabw354nr7:message0:4:path14:CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-shgpjtu5x7rmyswxjiriviagwnm5kvpd7:message40:Restored include path to "mysys" itself
property-file-info: 4:path20:mysys/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175236-d5bv3fgibf4p4ql4ntcr4ypt63z5zfi67:message59:Changed to optionally be included to give a file list only
property-file-info: 4:path19:dbug/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-xjxcqitzywtqhrevp5syq2kjpjabnvhl7:message59:Changed to optionally be included to give a file list only
property-file-info: 4:path26:extra/yassl/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-ewydqdjmnnisumb2tchnxjj6yzqrzyga7:message59:Changed to optionally be included to give a file list only
property-file-info: 4:path35:extra/yassl/taocrypt/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-74jhok62cpua656jlx6rcyvbwgq6vsuw7:message59:Changed to optionally be included to give a file list only
property-file-info: 4:path19:zlib/CMakeLists.txted7:file_id67:sp1f-cmakelists.txt-20060831175237-3bbprkzqdl3gopcnlt3evmaikau67bcq7:message245:For compatibility with Visual Studio 2005, list all files that are to
property-file-info: be part of the library build, i.e. libraries can't be built from other
property-file-info: libraries. Set SOURCE_SUBLIBS and include the file listings from
property-file-info: "zlib", "dbug", "taocrypt" and "yassl"
property-file-info: 4:path23:libmysql/CMakeLists.txtee
property-sp1-file-info: ld9:commit_id64:[email protected]/kent-amd64.(none)|win/README|20070803132323|100147:file_id74:[email protected]|win/README|20060831175237|35978|ec09791b66c5da52ed9:commit_id70:[email protected]/kent-amd64.(none)|win/configure.js|20070803132335|018437:file_id80:[email protected]|win/configure.js|20060831175237|26761|7d08c2bed2dcd741ed9:commit_id74:[email protected]/kent-amd64.(none)|extra/CMakeLists.txt|20070803194004|574367:file_id82:[email protected]|extra/CMakeLists.txt|20060831175236|58115|cc73089ca423eeed9:commit_id75:[email protected]/kent-amd64.(none)|myisam/CMakeLists.txt|20070803194042|055567:file_id85:[email protected]|myisam/CMakeLists.txt|20060831175237|47487|c20dcd005f596740ed9:commit_id76:[email protected]/kent-amd64.(none)|scripts/CMakeLists.txt|20070803194043|289227:file_id85:[email protected]|scripts/CMakeLists.txt|20070418112138|13899|3d77b8eb83aab270ed9:commit_id98:[email protected]/kent-amd64.(none)|server-tools/instance-manager/CMakeLists.txt|20070803194048|256817:file_id108:[email protected]|server-tools/instance-manager/CMakeLists.txt|20060831175237|20836|cc9bc5dc17e40f5fed9:commit_id72:[email protected]/kent-amd64.(none)|sql/CMakeLists.txt|20070803194052|527747:file_id82:[email protected]|sql/CMakeLists.txt|20060831175237|04370|ac380ff32f3cd5d9ed9:commit_id68:[email protected]/kent-amd64.(none)|CMakeLists.txt|20070803194227|606097:file_id78:[email protected]|CMakeLists.txt|20060831175236|10824|1273a23991fedf8fed9:commit_id74:[email protected]/kent-amd64.(none)|mysys/CMakeLists.txt|20070803194343|166597:file_id84:[email protected]|mysys/CMakeLists.txt|20060831175237|56994|73d7507b9d28fd67ed9:commit_id73:[email protected]/kent-amd64.(none)|dbug/CMakeLists.txt|20070803194526|147707:file_id83:[email protected]|dbug/CMakeLists.txt|20060831175236|19714|4ad0ec3bc5cc6871ed9:commit_id80:[email protected]/kent-amd64.(none)|extra/yassl/CMakeLists.txt|20070803194526|375927:file_id90:[email protected]|extra/yassl/CMakeLists.txt|20060831175237|64786|6441b2eec2c14614ed9:commit_id89:[email protected]/kent-amd64.(none)|extra/yassl/taocrypt/CMakeLists.txt|20070803194526|097787:file_id99:[email protected]|extra/yassl/taocrypt/CMakeLists.txt|20060831175237|16858|fcf25a063c0b1d93ed9:commit_id73:[email protected]/kent-amd64.(none)|zlib/CMakeLists.txt|20070803194526|506927:file_id83:[email protected]|zlib/CMakeLists.txt|20060831175237|33729|8666d8a3d9d0ea6eed9:commit_id77:[email protected]/kent-amd64.(none)|libmysql/CMakeLists.txt|20070803194832|395617:file_id87:[email protected]|libmysql/CMakeLists.txt|20060831175237|15980|32558b90c958e5b0ee
testament3-sha1: 1f29ca19a2fa83b38a6c2c5c01bea832ccb22178
  • Loading branch information
[email protected]/kent-amd64.(none) committed Aug 3, 2007
1 parent cfc1adf commit 8c5f97c
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 100 deletions.
96 changes: 37 additions & 59 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,53 +22,38 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
${CMAKE_SOURCE_DIR}/include/mysql_version.h @ONLY)

# Set standard options
ADD_DEFINITIONS(-D WITH_MYISAM_STORAGE_ENGINE)
ADD_DEFINITIONS(-D CMAKE_BUILD)
ADD_DEFINITIONS(-D HAVE_YASSL)

# Set debug options
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DFORCE_INIT_OF_VARS")

SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_myisam_plugin")

# Note that some engines are always compiled in, MyISAM, MyISAMMRG, HEAP

IF(WITH_ARCHIVE_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_ARCHIVE_DB)
ENDIF(WITH_ARCHIVE_STORAGE_ENGINE)

IF (WITH_HEAP_STORAGE_ENGINE)
ADD_DEFINITIONS(-D WITH_HEAP_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_heap_plugin")
ENDIF (WITH_HEAP_STORAGE_ENGINE)

IF (WITH_MYISAMMRG_STORAGE_ENGINE)
ADD_DEFINITIONS(-D WITH_MYISAMMRG_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_myisammrg_plugin")
ENDIF (WITH_MYISAMMRG_STORAGE_ENGINE)

IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_INNOBASE_DB)
ADD_DEFINITIONS(-D WITH_INNOBASE_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_innobase_plugin")
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)

IF(WITH_FEDERATED_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_FEDERATED_DB)
ADD_DEFINITIONS(-D WITH_FEDERATED_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_federated_plugin")
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)

IF(WITH_BERKELEY_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_BERKELEY_DB)
ADD_DEFINITIONS(-D WITH_BERKELEY_STORAGE_ENGINE)
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_berkeley_plugin")
ENDIF(WITH_BERKELEY_STORAGE_ENGINE)

IF (WITH_BLACKHOLE_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_BLACKHOLE_DB)
ENDIF (WITH_BLACKHOLE_STORAGE_ENGINE)

IF(WITH_EXAMPLE_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_EXAMPLE_DB)
ENDIF(WITH_EXAMPLE_STORAGE_ENGINE)

IF(WITH_FEDERATED_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_FEDERATED_DB)
ENDIF(WITH_FEDERATED_STORAGE_ENGINE)

IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEFINITIONS(-D HAVE_INNOBASE_DB)
ENDIF(WITH_INNOBASE_STORAGE_ENGINE)

SET(localstatedir "C:\\mysql\\data")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
${CMAKE_SOURCE_DIR}/support-files/my-huge.ini @ONLY)
Expand Down Expand Up @@ -102,37 +87,28 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")

IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
CMAKE_GENERATOR MATCHES "Visual Studio 8")
# replace /MDd with /MTd
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT
${CMAKE_CXX_FLAGS_DEBUG_INIT})
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG_INIT
${CMAKE_C_FLAGS_DEBUG_INIT})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE
${CMAKE_C_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO
${CMAKE_C_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG
${CMAKE_C_FLAGS_DEBUG})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE
${CMAKE_CXX_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO
${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG
${CMAKE_CXX_FLAGS_DEBUG})

# generate map files
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS")

# set stack size (see bug#20815)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")

# remove support for Exception handling
STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT
${CMAKE_CXX_FLAGS_INIT})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT
${CMAKE_CXX_FLAGS_DEBUG_INIT})

# replace /MDd with /MTd
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG_INIT ${CMAKE_C_FLAGS_DEBUG_INIT})

STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})

# generate map files, set stack size (see bug#20815)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")

# remove support for Exception handling
STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT})
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})

ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
CMAKE_GENERATOR MATCHES "Visual Studio 8")

Expand Down Expand Up @@ -196,6 +172,8 @@ IF(EMBED_MANIFESTS)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
ENDIF(EMBED_MANIFESTS)

# FIXME "debug" only needed if build type is "Debug", but
# CMAKE_BUILD_TYPE is not set during configure time.
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(dbug)
ADD_SUBDIRECTORY(strings)
Expand Down
11 changes: 8 additions & 3 deletions dbug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/dbug)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(dbug dbug.c factorial.c sanity.c)
SET(DBUG_SOURCES dbug.c factorial.c sanity.c)

IF(NOT SOURCE_SUBLIBS)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_LIBRARY(dbug ${DBUG_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
8 changes: 4 additions & 4 deletions extra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)

ADD_EXECUTABLE(comp_err comp_err.c)
TARGET_LINK_LIBRARIES(comp_err dbug mysys strings zlib wsock32)
TARGET_LINK_LIBRARIES(comp_err debug dbug mysys strings zlib wsock32)

GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)

Expand All @@ -39,13 +39,13 @@ ADD_CUSTOM_TARGET(GenError
DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h)

ADD_EXECUTABLE(my_print_defaults my_print_defaults.c)
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys dbug taocrypt wsock32)
TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock32)

ADD_EXECUTABLE(perror perror.c)
TARGET_LINK_LIBRARIES(perror strings mysys dbug wsock32)
TARGET_LINK_LIBRARIES(perror strings mysys debug dbug wsock32)

ADD_EXECUTABLE(replace replace.c)
TARGET_LINK_LIBRARIES(replace strings mysys dbug wsock32)
TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32)

IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("my_print_defaults" "asInvoker")
Expand Down
12 changes: 9 additions & 3 deletions extra/yassl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

ADD_DEFINITIONS("-DWIN32 -D_LIB -DYASSL_PREFIX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)

INCLUDE_DIRECTORIES(include taocrypt/include taocrypt/mySTL)
ADD_LIBRARY(yassl src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
ADD_DEFINITIONS("-D_LIB -DYASSL_PREFIX")

SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
src/yassl_imp.cpp src/yassl_int.cpp)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(yassl ${YASSL_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
8 changes: 6 additions & 2 deletions extra/yassl/taocrypt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

INCLUDE_DIRECTORIES(mySTL include)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include)

ADD_LIBRARY(taocrypt src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp
include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp
include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp include/integer.hpp
include/md2.hpp include/md5.hpp include/misc.hpp include/modarith.hpp include/modes.hpp
include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp)
IF(NOT SOURCE_SUBLIBS)
ADD_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
ENDIF(NOT SOURCE_SUBLIBS)
56 changes: 42 additions & 14 deletions libmysql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,43 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
# have been a problem anyway, they don't use thread local storage.

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include
${CMAKE_SOURCE_DIR}/libmysql
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings)

# We include the source file listing instead of referencing the
# libraries. At least with CMake 2.4 and Visual Studio 2005 a static
# library created from other static libraries would not be complete,
# i.e. the libraries listed in TARGET_LINK_LIBRARIES() were just
# ignored.


# Include and add the directory path
SET(SOURCE_SUBLIBS TRUE)

INCLUDE(${CMAKE_SOURCE_DIR}/zlib/CMakeLists.txt)
FOREACH(rpath ${ZLIB_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../zlib/${rpath})
ENDFOREACH(rpath)

# FIXME only needed if build type is "Debug", but CMAKE_BUILD_TYPE is
# not set during configure time.
INCLUDE(${CMAKE_SOURCE_DIR}/dbug/CMakeLists.txt)
FOREACH(rpath ${DBUG_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../dbug/${rpath})
ENDFOREACH(rpath)

INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/CMakeLists.txt)
FOREACH(rpath ${TAOCRYPT_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/taocrypt/${rpath})
ENDFOREACH(rpath)

INCLUDE(${CMAKE_SOURCE_DIR}/extra/yassl/CMakeLists.txt)
FOREACH(rpath ${YASSL_SOURCES})
SET(LIB_SOURCES ${LIB_SOURCES} ../extra/yassl/${rpath})
ENDFOREACH(rpath)

SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
../sql-common/client.c ../strings/ctype-big5.c ../strings/ctype-bin.c
Expand Down Expand Up @@ -66,7 +96,8 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)
../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c
${LIB_SOURCES})

# Need to set USE_TLS for building the DLL, since __declspec(thread)
# approach to thread local storage does not work properly in DLLs.
Expand All @@ -79,23 +110,20 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
# beond the documented API, and try access the Thread Local Storage.
# The "_notls" means no Tls*() functions used, i.e. "static" TLS.

ADD_LIBRARY(libmysql SHARED dll.c libmysql.def ${CLIENT_SOURCES})
ADD_LIBRARY(mysqlclient STATIC ${CLIENT_SOURCES})
ADD_LIBRARY(libmysql SHARED ${CLIENT_SOURCES} dll.c libmysql.def)
ADD_LIBRARY(mysqlclient STATIC ${CLIENT_SOURCES})
ADD_LIBRARY(mysqlclient_notls STATIC ${CLIENT_SOURCES})

SET_TARGET_PROPERTIES(libmysql mysqlclient PROPERTIES COMPILE_FLAGS "-DUSE_TLS")

SET(CLIENT_LIB_DEPS yassl taocrypt zlib dbug GenError)
SET(CLIENT_LIBS yassl taocrypt zlib debug dbug)

ADD_DEPENDENCIES(libmysql ${CLIENT_LIB_DEPS})
TARGET_LINK_LIBRARIES(libmysql ${CLIENT_LIBS} wsock32)
ADD_DEPENDENCIES(libmysql GenError)
TARGET_LINK_LIBRARIES(libmysql wsock32)

ADD_DEPENDENCIES(mysqlclient ${CLIENT_LIB_DEPS})
TARGET_LINK_LIBRARIES(mysqlclient ${CLIENT_LIBS})
ADD_DEPENDENCIES(mysqlclient GenError)
TARGET_LINK_LIBRARIES(mysqlclient)

ADD_DEPENDENCIES(mysqlclient_notls ${CLIENT_LIB_DEPS})
TARGET_LINK_LIBRARIES(mysqlclient_notls ${CLIENT_LIBS})
ADD_DEPENDENCIES(mysqlclient_notls GenError)
TARGET_LINK_LIBRARIES(mysqlclient_notls)

ADD_EXECUTABLE(myTest mytest.c)
TARGET_LINK_LIBRARIES(myTest libmysql)
Expand Down
8 changes: 4 additions & 4 deletions myisam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ ADD_LIBRARY(myisam ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c f
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 dbug strings zlib wsock32)
TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys debug dbug strings zlib wsock32)

ADD_EXECUTABLE(myisamchk myisamchk.c)
TARGET_LINK_LIBRARIES(myisamchk myisam mysys dbug strings zlib wsock32)
TARGET_LINK_LIBRARIES(myisamchk myisam mysys debug dbug strings zlib wsock32)

ADD_EXECUTABLE(myisamlog myisamlog.c)
TARGET_LINK_LIBRARIES(myisamlog myisam mysys dbug strings zlib wsock32)
TARGET_LINK_LIBRARIES(myisamlog myisam mysys debug dbug strings zlib wsock32)

ADD_EXECUTABLE(myisampack myisampack.c)
TARGET_LINK_LIBRARIES(myisampack myisam mysys dbug strings zlib wsock32)
TARGET_LINK_LIBRARIES(myisampack myisam mysys debug dbug strings zlib wsock32)

IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("myisam_ftdump" "asInvoker")
Expand Down
3 changes: 1 addition & 2 deletions mysys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")

# Only the server link with this library, the client libraries and the client
# executables all link with recompiles of source found in the "mysys" directory.
# So we only need to create one version of this library, with the "static"
# Thread Local Storage model.

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys )
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)

ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c
errors.c hash.c list.c md5.c mf_brkhant.c mf_cache.c mf_dirname.c mf_fn_ext.c
Expand Down
2 changes: 1 addition & 1 deletion scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tabl

# Build comp_sql - used for embedding SQL in C or C++ programs
ADD_EXECUTABLE(comp_sql comp_sql.c)
TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings)
TARGET_LINK_LIBRARIES(comp_sql debug dbug mysys strings)

# Use comp_sql to build mysql_fix_privilege_tables_sql.c
GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
Expand Down
2 changes: 1 addition & 1 deletion server-tools/instance-manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instanc
../../libmysql/errmsg.c)

ADD_DEPENDENCIES(mysqlmanager GenError)
TARGET_LINK_LIBRARIES(mysqlmanager dbug mysys strings taocrypt vio yassl zlib wsock32)
TARGET_LINK_LIBRARIES(mysqlmanager debug dbug mysys strings taocrypt vio yassl zlib wsock32)

IF(EMBED_MANIFESTS)
MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker")
Expand Down
2 changes: 1 addition & 1 deletion sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ ADD_EXECUTABLE(mysqld${MYSQLD_EXE_SUFFIX}
${PROJECT_SOURCE_DIR}/sql/lex_hash.h)

TARGET_LINK_LIBRARIES(mysqld${MYSQLD_EXE_SUFFIX}
heap myisam myisammrg mysys yassl zlib dbug yassl
heap myisam myisammrg mysys yassl zlib debug dbug yassl
taocrypt strings vio regex wsock32)

IF(EMBED_MANIFESTS)
Expand Down
3 changes: 1 addition & 2 deletions win/README
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ From the root of your bk clone, execute the command: win\configure <options>.
The options right now are

WITH_INNOBASE_STORAGE_ENGINE Enable particular storage engines
WITH_PARTITION_STORAGE_ENGINE
WITH_ARCHIVE_STORAGE_ENGINE
WITH_BERKELEY_STORAGE_ENGINE
WITH_BLACKHOLE_STORAGE_ENGINE
Expand All @@ -57,7 +56,7 @@ The options right now are

So the command line could look like:

win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_PARTITION_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-pro
win\configure WITH_INNOBASE_STORAGE_ENGINE WITH_ARCHIVE_STORAGE_ENGINE MYSQL_SERVER_SUFFIX=-my-suffix

Step 5
------
Expand Down
1 change: 0 additions & 1 deletion win/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ try
case "WITH_EXAMPLE_STORAGE_ENGINE":
case "WITH_FEDERATED_STORAGE_ENGINE":
case "WITH_INNOBASE_STORAGE_ENGINE":
case "WITH_PARTITION_STORAGE_ENGINE":
case "__NT__":
case "DISABLE_GRANT_OPTIONS":
case "EMBED_MANIFESTS":
Expand Down
Loading

0 comments on commit 8c5f97c

Please sign in to comment.