Fix problems found by Joro (Xcode generator specific)

This commit is contained in:
Vladislav Vaintroub 2009-11-09 19:14:33 +01:00
parent 15e58d56c8
commit cd2fa695de
2 changed files with 10 additions and 3 deletions

View file

@ -39,9 +39,13 @@ IF(CMAKE_GENERATOR MATCHES "Xcode")
# It does not seem possible to tell Xcode the resulting target might need
# to be linked with C++ runtime. The project needs to have at least one C++
# file. Add a dummy one.
MYSQL_CREATE_EMPTY_FILE(mysql_client_test_embedded_dummy.cc)
ADD_CUSTOM_COMMAND(OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc
COMMAND ${CMAKE_COMMAND} -E touch
${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc
)
ADD_EXECUTABLE(mysql_client_test_embedded
mysql_client_test_embedded_dummy.cc
${CMAKE_CURRENT_BINARY_DIR}/mysql_client_test_embedded_dummy.cc
../../tests/mysql_client_test.c)
ELSE()
ADD_EXECUTABLE(mysql_client_test_embedded ../../tests/mysql_client_test.c)

View file

@ -187,6 +187,9 @@ IF(WIN32 OR HAVE_DLOPEN)
SET_TARGET_PROPERTIES(udf_example PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/udf_example.def")
ENDIF()
TARGET_LINK_LIBRARIES(udf_example strings)
ELSE()
# udf_example is using safemutex exported by mysqld
TARGET_LINK_LIBRARIES(udf_example mysqld)
ENDIF()
ENDIF()
@ -246,4 +249,4 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
ELSE()
# Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql)
ENDIF()
ENDIF()