diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-11-09 12:32:48 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-11-09 12:32:48 +0100 |
commit | 13cd7170ccadbc596146175c0674956f49aed830 (patch) | |
tree | ef650a7fd633d354f237aa267a871fce11fe48d3 /client | |
parent | 411a6bfeb94e89f4cd4b8daaee96fe1913218a85 (diff) | |
download | mariadb-git-13cd7170ccadbc596146175c0674956f49aed830.tar.gz |
WL#5161 : Cross-platform build with CMake
Diffstat (limited to 'client')
-rwxr-xr-x | client/CMakeLists.txt | 72 |
1 files changed, 40 insertions, 32 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 28e4c354a69..1cda6592a6e 100755 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -12,46 +12,49 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE("${PROJECT_SOURCE_DIR}/win/mysql_manifest.cmake") -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) +INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/include + ${ZLIB_INCLUDE_DIR} + ${SSL_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/libmysql + ${CMAKE_SOURCE_DIR}/regex + ${CMAKE_SOURCE_DIR}/sql + ${CMAKE_SOURCE_DIR}/strings + ${READLINE_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) -ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c) +ADD_DEFINITIONS(${READLINE_DEFINES}) +ADD_DEFINITIONS(${SSL_DEFINES}) +ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc) TARGET_LINK_LIBRARIES(mysql mysqlclient) +IF(UNIX) + TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY}) +ENDIF(UNIX) ADD_EXECUTABLE(mysqltest mysqltest.cc) SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") -TARGET_LINK_LIBRARIES(mysqltest mysqlclient mysys regex dbug) +TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex) + ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient) -ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c ../mysys/mf_getdate.c) +ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c) TARGET_LINK_LIBRARIES(mysqldump mysqlclient) ADD_EXECUTABLE(mysqlimport mysqlimport.c) TARGET_LINK_LIBRARIES(mysqlimport mysqlclient) -ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c ../mysys/my_getpagesize.c) +ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c) TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient) ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) ADD_EXECUTABLE(mysqlshow mysqlshow.c) TARGET_LINK_LIBRARIES(mysqlshow mysqlclient) -ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc - ../mysys/mf_tempdir.c - ../mysys/my_new.cc - ../mysys/my_bit.c - ../mysys/my_bitmap.c - ../mysys/my_vle.c - ../mysys/base64.c) +ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient) ADD_EXECUTABLE(mysqladmin mysqladmin.cc) @@ -59,20 +62,25 @@ TARGET_LINK_LIBRARIES(mysqladmin mysqlclient) ADD_EXECUTABLE(mysqlslap mysqlslap.c) SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS") -TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys zlib dbug) +TARGET_LINK_LIBRARIES(mysqlslap mysqlclient) ADD_EXECUTABLE(echo echo.c) -IF(EMBED_MANIFESTS) - MYSQL_EMBED_MANIFEST("mysql" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqltest" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqlcheck" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqldump" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqlimport" "asInvoker") - MYSQL_EMBED_MANIFEST("mysql_upgrade" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqlshow" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqlbinlog" "asInvoker") - MYSQL_EMBED_MANIFEST("mysqladmin" "asInvoker") - MYSQL_EMBED_MANIFEST("echo" "asInvoker") -ENDIF(EMBED_MANIFESTS) +SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap +PROPERTIES HAS_CXX TRUE) + +SET(INSTALL_EXES + mysqlcheck + mysqldump + mysqlimport + mysql_upgrade + mysqlshow + mysqlslap + mysql + mysqladmin + mysqlbinlog + mysqltest) + +INSTALL(TARGETS ${INSTALL_EXES} DESTINATION bin) +INSTALL_DEBUG_SYMBOLS("${INSTALL_EXES}") |