diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-01-29 18:51:12 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-01-29 18:51:12 +0100 |
commit | b19e99865ccf3e946ebe59bf09add8e0452904ac (patch) | |
tree | 23cb9e8176ef9d0e276b47d197e11d195b2ecafb /extra | |
parent | 3edf4dcd5a36be8d5acc94e0c5e29e77e47cd15b (diff) | |
download | mariadb-git-b19e99865ccf3e946ebe59bf09add8e0452904ac.tar.gz |
MWL#55 : cherrypick MySQL 5.5 CMake/build improvements in order
to be able to build MSI based installer
Diffstat (limited to 'extra')
-rwxr-xr-x | extra/CMakeLists.txt | 18 | ||||
-rw-r--r-- | extra/libevent/CMakeLists.txt | 12 |
2 files changed, 17 insertions, 13 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index 6cc69d3251e..f87dc1d0831 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -22,19 +22,19 @@ TARGET_LINK_LIBRARIES(comp_err debug dbug mysys strings zlib wsock32) GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION) -ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/include/mysqld_error.h COMMAND ${COMP_ERR_EXE} --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets - --out-dir=${PROJECT_SOURCE_DIR}/sql/share/ - --header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h - --name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h - --state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h + --out-dir=${CMAKE_BINARY_DIR}/sql/share/ + --header_file=${CMAKE_BINARY_DIR}/include/mysqld_error.h + --name_file=${CMAKE_BINARY_DIR}/include/mysqld_ername.h + --state_file=${CMAKE_BINARY_DIR}/include/sql_state.h --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt) ADD_CUSTOM_TARGET(GenError ALL - DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h) + DEPENDS ${CMAKE_BINARY_DIR}/include/mysqld_error.h) ADD_EXECUTABLE(my_print_defaults my_print_defaults.c) TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock32) @@ -48,8 +48,4 @@ TARGET_LINK_LIBRARIES(resolveip strings mysys debug dbug wsock32) ADD_EXECUTABLE(replace replace.c) TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32) -IF(EMBED_MANIFESTS) - MYSQL_EMBED_MANIFEST("myTest" "asInvoker") -ENDIF(EMBED_MANIFESTS) - -INSTALL(TARGETS comp_err my_print_defaults perror resolveip replace DESTINATION bin COMPONENT runtime) +MYSQL_INSTALL_TARGETS(comp_err my_print_defaults perror resolveip replace DESTINATION bin COMPONENT Server) diff --git a/extra/libevent/CMakeLists.txt b/extra/libevent/CMakeLists.txt index 83a6cf0f220..6be15641d3e 100644 --- a/extra/libevent/CMakeLists.txt +++ b/extra/libevent/CMakeLists.txt @@ -2,7 +2,9 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/extra/libevent ${CMAKE_SOURCE_DIR}/extra/libevent/compat ${CMAKE_SOURCE_DIR}/extra/libevent/WIN32-Code - ${CMAKE_SOURCE_DIR}/include) + ${CMAKE_BINARY_DIR}/extra/libevent + ${CMAKE_SOURCE_DIR}/include +) IF(MSVC) ADD_DEFINITIONS("-DWIN32 -DHAVE_CONFIG_H") @@ -28,8 +30,14 @@ SET(LIBEVENT_SOURCES min_heap.h strlcpy-internal.h ) +IF(WIN32) + # Workaround source distribution bug, remove preconfigured event-config + IF(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + FILE(REMOVE ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h) + ENDIF() + CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_BINARY_DIR}/extra/libevent/event-config.h COPYONLY) +ENDIF() -CONFIGURE_FILE(WIN32-Code/config.h ${CMAKE_SOURCE_DIR}/extra/libevent/event-config.h COPYONLY) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(libevent ${LIBEVENT_SOURCES}) ENDIF(NOT SOURCE_SUBLIBS) |