--- a/libmysql/CMakeLists.txt 2019-02-18 20:33:19.000000000 -0500
+++ b/libmysql/CMakeLists.txt 2019-02-18 20:33:13.000000000 -0500
TARGET_LINK_LIBRARIES(libmysql_api_test libmysql)
+ set(LD_PATH_VAR "LD_LIBRARY_PATH")
+ set(LD_PATH_VAR "DYLD_LIBRARY_PATH")
+ set(COM_ENV ${CMAKE_COMMAND} -E env "${LD_PATH_VAR}=${CMAKE_CURRENT_BINARY_DIR}")
# Verify that libmysql_api_test runs OK
ADD_CUSTOM_COMMAND(TARGET libmysql_api_test POST_BUILD
- COMMAND $<TARGET_FILE:libmysql_api_test>
+ COMMAND ${COM_ENV} $<TARGET_FILE:libmysql_api_test>
> ${CMAKE_CURRENT_BINARY_DIR}/libmysql_api_test.out