mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 23:17:28 +00:00
fix: macos?
This commit is contained in:
parent
dab70ac096
commit
4569ea29d5
@ -134,10 +134,15 @@ message("libmariadb: ${MARIADBC_SHARED_LIBRARY_LOCATION}")
|
||||
message("libmariadbcpp: ${MARIADBCPP_SHARED_LIBRARY_LOCATION}")
|
||||
add_library(MariaDB::ConnCpp SHARED IMPORTED GLOBAL)
|
||||
add_dependencies(MariaDB::ConnCpp mariadb_connector_cpp)
|
||||
set_property(TARGET MariaDB::ConnCpp PROPERTY IMPORTED_LOCATION ${MARIADBCPP_SHARED_LIBRARY_LOCATION})
|
||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
||||
IMPORTED_LOCATION "${MARIADBCPP_SHARED_LIBRARY_LOCATION}")
|
||||
|
||||
if(WIN32)
|
||||
set_property(TARGET MariaDB::ConnCpp PROPERTY IMPORTED_IMPLIB ${MARIADB_IMPLIB_LOCATION})
|
||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
||||
IMPORTED_IMPLIB "${MARIADB_IMPLIB_LOCATION}")
|
||||
elseif(APPLE)
|
||||
set_target_properties(MariaDB::ConnCpp PROPERTIES
|
||||
MACOSX_RPATH TRUE)
|
||||
endif()
|
||||
|
||||
# Add directories to include lists
|
||||
|
@ -6,6 +6,10 @@ include(GoogleTest)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH True)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH True)
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path")
|
||||
|
||||
add_custom_target(conncpp_tests
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user