diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-28 01:05:34 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-03-28 01:05:34 +0200 |
commit | 22a8654a6f8ec5a977c51f95b5c5e1489854912b (patch) | |
tree | a3f36e4a92542a9d201f5474fe3369f28ebfb2f4 /extra | |
parent | eaed26053da306109d93cbce42b3d275c3e62471 (diff) | |
download | mariadb-git-22a8654a6f8ec5a977c51f95b5c5e1489854912b.tar.gz |
CMake fixes for buildbot/MSI package building and signing:
- FIND_PROGRAM (signtool) will now get a hint about location of signtool.exe (Windows SDK)
- Targets "package" or "msi" will now fail, l if signing is requested but does not work
(e.g invalid certificate)
- During install, do not re-sign binaries, if they are already signed.
- Preserve mysqld_error.h timestamp whenever possible. This helps avoiding situations
where the whole server is rebuilt, whenever comp_err.exe changes (for example after code
signing, or also after a minor fix in mysys)
- Fix Wix error in UpgradeVersion, if patch part of the version is 0.
Diffstat (limited to 'extra')
-rwxr-xr-x | extra/CMakeLists.txt | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index f87dc1d0831..15194556a6b 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -22,19 +22,25 @@ TARGET_LINK_LIBRARIES(comp_err debug dbug mysys strings zlib wsock32) GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION) -ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/include/mysqld_error.h - COMMAND ${COMP_ERR_EXE} - --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets - --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) +# Generate mysqld_error.h +# Try not to change its timestamp if not necessary(as touching +# mysqld_error.h results in rebuild of the almost whole server) +# To preserve timestamp, first generate a temp header file, then copy it +# to mysqld_error.h using cmake -E copy_if_different +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp + COMMAND ${COMP_ERR_EXE} + --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets + --out-dir=${CMAKE_BINARY_DIR}/sql/share/ + --header_file=${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp + --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 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp ${CMAKE_BINARY_DIR}/include/mysqld_error.h + DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt) ADD_CUSTOM_TARGET(GenError ALL - DEPENDS ${CMAKE_BINARY_DIR}/include/mysqld_error.h) + DEPENDS ${CMAKE_BINARY_DIR}/include/mysqld_error.h.tmp) ADD_EXECUTABLE(my_print_defaults my_print_defaults.c) TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock32) |