diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-07-08 19:34:53 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-07-08 19:34:53 +0200 |
commit | 528c1111ad8ac116ba3fe2a4a640a1006f666338 (patch) | |
tree | cd4d6490061168badcf98e272f626e6ecf184d62 /CMakeLists.txt | |
parent | 648fb98eb6834781e5ff7bd13f26e7b3755fdf81 (diff) | |
parent | cdc38712e4d359348346758e47e1ebc7d1743f82 (diff) | |
download | mariadb-git-528c1111ad8ac116ba3fe2a4a640a1006f666338.tar.gz |
MDEV-6410 Cross-compile fixes
https://code.launchpad.net/~chewi/maria/mysql-fix-bug61340/+merge/217351
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b4ce461022b..bad38462007 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,6 +386,11 @@ ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO") SET(CMAKE_CXX_FLAGS_DEBUG "${MY_MAINTAINER_CXX_WARNINGS} ${CMAKE_CXX_FLAGS_DEBUG}") ENDIF() +IF(CMAKE_CROSSCOMPILING) + SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") + INCLUDE(${IMPORT_EXECUTABLES}) +ENDIF() + IF(WITH_UNIT_TESTS) ENABLE_TESTING() ADD_SUBDIRECTORY(unittest/mytap) @@ -451,6 +456,13 @@ IF(WIN32) ENDIF() ADD_SUBDIRECTORY(packaging/solaris) +IF(NOT CMAKE_CROSSCOMPILING) + SET(EXPORTED comp_err comp_sql factorial gen_lex_hash) + # minimal target to build only binaries for export + ADD_CUSTOM_TARGET(import_executables DEPENDS ${EXPORTED}) + EXPORT(TARGETS ${EXPORTED} FILE ${CMAKE_BINARY_DIR}/import_executables.cmake) +ENDIF() + CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h) CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in |