diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:27:37 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-08-19 15:27:37 +0000 |
commit | 7b89b9f5108c80f4f270da922d7e6c182a663719 (patch) | |
tree | 858a3873942f07610fb26685781e8bdbd3ab2c7f /tests/CMakeLists.txt | |
parent | daff133ddf9a9d120050703c0b5753979c6190e0 (diff) | |
download | mariadb-git-7b89b9f5108c80f4f270da922d7e6c182a663719.tar.gz |
MDEV-9293 Connector/C integration
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f32e0270ce4..703efd56d55 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,16 +15,21 @@ ADD_DEFINITIONS("-DMYSQL_CLIENT") -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/client) +INCLUDE_DIRECTORIES(BEFORE ${CONNECTOR_C_INSTALLDIR}/include/mariadb) ADD_EXECUTABLE(mysql_client_test mysql_client_test.c) -TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient) -SET_TARGET_PROPERTIES(mysql_client_test PROPERTIES LINKER_LANGUAGE CXX) +SET(CLIENT_LIB ${CONNECTOR_C_LIBS} mysys) + +TARGET_LINK_LIBRARIES(mysql_client_test ${CLIENT_LIB}) +ADD_DEPENDENCIES(mysql_client_test GenError mariadb_connector_c) IF(WITH_UNIT_TESTS) ADD_EXECUTABLE(bug25714 bug25714.c) - TARGET_LINK_LIBRARIES(bug25714 mysqlclient) - SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX) + TARGET_LINK_LIBRARIES(bug25714 ${CLIENT_LIB}) + ADD_DEPENDENCIES(bug25714 GenError mariadb_connector_c) ENDIF() INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test) @@ -34,7 +39,6 @@ FIND_LIBRARY(EVENT_LIBRARY event) MARK_AS_ADVANCED(EVENT_LIBRARY) IF(HAVE_EVENT_H AND EVENT_LIBRARY) ADD_EXECUTABLE(async_queries async_queries.c) - TARGET_LINK_LIBRARIES(async_queries mysqlclient ${EVENT_LIBRARY}) - SET_TARGET_PROPERTIES(async_queries PROPERTIES LINKER_LANGUAGE CXX) - + TARGET_LINK_LIBRARIES(async_queries ${CLIENT_LIB} ${EVENT_LIBRARY}) + ADD_DEPENDENCIES(async_queries GenError mariadb_connector_c) ENDIF() |