Link against Connector-C.
Now, qc_mysqlembedded is linked against MySQL's embedded library, and MaxScale itself against Connector-C. So, in order to build MaxScale, Connector-C must be installed. This has been tested with Connector-C 2.2.1. The build variable MYSQLCLIENT_LIBRARIES is no longer used.
This commit is contained in:
@ -6,7 +6,7 @@ install(TARGETS binlogrouter DESTINATION ${MAXSCALE_LIBDIR})
|
||||
add_executable(maxbinlogcheck maxbinlogcheck.c blr_file.c blr_cache.c blr_master.c blr_slave.c blr.c)
|
||||
# maxbinlogcheck refers to my_uuid_init and my_uuin. They are non-public functions and
|
||||
# should not be used. They are found only from the embedded lib.
|
||||
target_link_libraries(maxbinlogcheck maxscale-common query_classifier ${EMBEDDED_LIB})
|
||||
target_link_libraries(maxbinlogcheck maxscale-common query_classifier ${MYSQL_EMBEDDED_LIB})
|
||||
|
||||
install(TARGETS maxbinlogcheck DESTINATION bin)
|
||||
|
||||
|
@ -2,6 +2,6 @@ if(BUILD_TESTS)
|
||||
add_executable(testbinlogrouter testbinlog.c ../blr.c ../blr_slave.c ../blr_master.c ../blr_file.c ../blr_cache.c)
|
||||
# testbinlogrouter refers to my_uuid_init and my_uuin. They are non-public functions and
|
||||
# should not be used. They are found only from the embedded lib.
|
||||
target_link_libraries(testbinlogrouter maxscale-common query_classifier ${EMBEDDED_LIB})
|
||||
target_link_libraries(testbinlogrouter maxscale-common query_classifier ${MYSQL_EMBEDDED_LIB})
|
||||
add_test(TestBinlogRouter ${CMAKE_CURRENT_BINARY_DIR}/testbinlogrouter)
|
||||
endif()
|
||||
|
@ -1,9 +1,9 @@
|
||||
if(MYSQLCLIENT_FOUND AND BUILD_TESTS)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/test.cmake @ONLY)
|
||||
add_executable(testschemarouter testschemarouter.c)
|
||||
target_link_libraries(testschemarouter ${MYSQLCLIENT_LIBRARIES} ssl crypto dl z m rt pthread)
|
||||
target_link_libraries(testschemarouter ${MARIADB_CONNECTOR_LIB} ssl crypto dl z m rt pthread)
|
||||
add_executable(testschemarouter2 testschemarouter2.c)
|
||||
target_link_libraries(testschemarouter2 ${MYSQLCLIENT_LIBRARIES} ssl crypto dl z m rt pthread)
|
||||
target_link_libraries(testschemarouter2 ${MARIADB_CONNECTOR_LIB} ssl crypto dl z m rt pthread)
|
||||
add_test(NAME TestSchemaRouter COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test.cmake)
|
||||
|
||||
endif()
|
||||
|
@ -1,6 +1,6 @@
|
||||
if(MYSQLCLIENT_FOUND)
|
||||
add_executable(testconnect testconnect.c)
|
||||
message(STATUS "Linking against: ${MYSQLCLIENT_LIBRARIES}")
|
||||
target_link_libraries(testconnect ${MYSQLCLIENT_LIBRARIES} ssl crypto dl z m rt pthread)
|
||||
message(STATUS "Linking against: ${MARIADB_CONNECTOR_LIB}")
|
||||
target_link_libraries(testconnect ${MARIADB_CONNECTOR_LIB} ssl crypto dl z m rt pthread)
|
||||
add_test(NAME ReadConnRouterAuthTest COMMAND $<TARGET_FILE:testconnect> 10000 ${TEST_HOST} ${MASTER_PORT} ${TEST_HOST} ${TEST_PORT} 1.10)
|
||||
endif()
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user