diff options
author | unknown <iggy@amd64.(none)> | 2007-08-03 14:43:12 -0400 |
---|---|---|
committer | unknown <iggy@amd64.(none)> | 2007-08-03 14:43:12 -0400 |
commit | c6c57ed783eabf5d9c99a3c1fd4f5ea5518c069c (patch) | |
tree | 743ce671890386580cfb5fe72e9393a21c9f567f /libmysqld/CMakeLists.txt | |
parent | 6f88aa45dbc129751890421b13e8c4e13b8bd888 (diff) | |
download | mariadb-git-c6c57ed783eabf5d9c99a3c1fd4f5ea5518c069c.tar.gz |
Bug#29903 The CMake build method does not produce the embedded library.
- Changes to correct and test Windows embedded build.
BitKeeper/etc/ignore:
Bug#29903 The CMake build method does not produce the embedded library.
- Ignore auto-generated Windows embedded resources.
CMakeLists.txt:
Bug#29903 The CMake build method does not produce the embedded library.
- Hardcode CSV for all configurations.
- Add client directory for gen_lex_hash dependency.
client/CMakeLists.txt:
Bug#29903 The CMake build method does not produce the embedded library.
- Build the mysqlclient library and echo for the embedded solution.
client/client_priv.h:
Bug#29903 The CMake build method does not produce the embedded library.
- Defined new option.
client/mysql.cc:
Bug#29903 The CMake build method does not produce the embedded library.
- Add server-arg command line parameter
libmysqld/CMakeLists.txt:
Bug#29903 The CMake build method does not produce the embedded library.
- Added auto generated resources; sql_yacc.cc, sql_yacc.h, message.rc
message.h and lex_hash.h.
- Link csv library to libmsyqld.
libmysqld/Makefile.am:
Bug#29903 The CMake build method does not produce the embedded library.
- Include CMakeLists.txt in dist.
libmysqld/examples/CMakeLists.txt:
Bug#29903 The CMake build method does not produce the embedded library.
- Follow existing naming convention.
libmysqld/examples/Makefile.am:
Bug#29903 The CMake build method does not produce the embedded library.
- Include CMakeLists.txt in dist.
mysql-test/mysql-test-run.pl:
Bug#29903 The CMake build method does not produce the embedded library.
- Move embedded option block earlier in the script.
- Added the path to the libmysqld.dll to Windows path.
win/README:
Bug#29903 The CMake build method does not produce the embedded library.
- Add instructions for building/testing the embedded library.
Diffstat (limited to 'libmysqld/CMakeLists.txt')
-rw-r--r-- | libmysqld/CMakeLists.txt | 63 |
1 files changed, 57 insertions, 6 deletions
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index dd42bafcfe0..3a6873112f3 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -25,16 +25,20 @@ ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_SERVER) ADD_DEFINITIONS(-DUSING_CMAKE) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/libmysqld - ${CMAKE_SOURCE_DIR}/libmysql + ${CMAKE_SOURCE_DIR}/libmysqld + ${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/zlib ) -SET_SOURCE_FILES_PROPERTIES(${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc - ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h +SET_SOURCE_FILES_PROPERTIES(sql_yacc.cc + sql_yacc.h + message.h + message.rc + ${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc + lex_hash.h PROPERTIES GENERATED 1) ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc @@ -80,10 +84,54 @@ ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc ../sql/scheduler.cc ../vio/vio.c ../vio/viosocket.c ../vio/viossl.c ../vio/viosslfactories.c - ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc - ${PROJECT_SOURCE_DIR}/sql/sql_yacc.h) + sql_yacc.cc + sql_yacc.h + message.h + message.rc + lex_hash.h) ADD_DEPENDENCIES(mysqldemb GenError) +# Sql Parser custom command +ADD_CUSTOM_COMMAND( + SOURCE ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy + OUTPUT sql_yacc.cc + COMMAND bison.exe + ARGS -y -p MYSQL --defines=sql_yacc.h + --output=sql_yacc.cc ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy + DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.yy +) + +ADD_CUSTOM_COMMAND( + OUTPUT sql_yacc.h + COMMAND echo + DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc +) + +# Windows message file +ADD_CUSTOM_COMMAND( + SOURCE ${CMAKE_SOURCE_DIR}/sql/message.mc + OUTPUT message.rc message.h + COMMAND mc + ARGS ${CMAKE_SOURCE_DIR}/sql/message.mc + DEPENDS ${CMAKE_SOURCE_DIR}/sql/message.mc +) + +# Gen_lex_hash +ADD_EXECUTABLE(gen_lex_hash ../sql/gen_lex_hash.cc) +TARGET_LINK_LIBRARIES(gen_lex_hash dbug mysqlclient wsock32) +GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION) +ADD_CUSTOM_COMMAND( + OUTPUT lex_hash.h + COMMAND ${GEN_LEX_HASH_EXE} ARGS > lex_hash.h + DEPENDS ${GEN_LEX_HASH_EXE} +) + +# Remove the auto-generated files as part of 'Clean Solution' +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES + "lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc") + +ADD_DEPENDENCIES(mysqldemb gen_lex_hash) + # Seems we cannot make a library without at least one source file. So use a # dummy empty file FILE(WRITE cmake_dummy.c " ") @@ -120,3 +168,6 @@ ENDIF(WITH_ARCHIVE_STORAGE_ENGINE) IF(WITH_BLACKHOLE_STORAGE_ENGINE) TARGET_LINK_LIBRARIES(libmysqld blackhole) ENDIF(WITH_BLACKHOLE_STORAGE_ENGINE) +IF(WITH_CSV_STORAGE_ENGINE) + TARGET_LINK_LIBRARIES(libmysqld csv) +ENDIF(WITH_CSV_STORAGE_ENGINE) |