Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-16688 Add CBlas library to lib2 for APPLE #9377

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib2/CMakeLists.txt
Expand Up @@ -26,6 +26,7 @@ if (APPLE)
list(APPEND DYLIBS ${OPENSSL_LIBRARIES})
list(APPEND DYLIBS ${ZLIB_LIBRARIES})
list(APPEND DYLIBS ${LIBXML2_LIBRARIES})
list(APPEND DYLIBS ${CBLAS_LIBRARIES})
elseif (WIN32)
#TODO: Should find these dlls not assume them.
if (NOT USE_NATIVE_LIBRARIES)
Expand Down Expand Up @@ -107,6 +108,12 @@ foreach(dylib ${DYLIBS})
set(fixupCommand "${fixupCommand}\r\nexecute_process(COMMAND install_name_tool -change \"${dylib_1_path}\" \"@loader_path/../lib2/${dylib_name_ext}\" \${file})")
endif ()

if ("${dylib_path}" MATCHES "^/usr/local/Cellar/.*$")
get_filename_component(dylib_dir ${dylib} DIRECTORY)
set(dylib_link_path "${dylib_dir}/${dylib_name_ext}")
set(fixupCommand "${fixupCommand}\r\nexecute_process(COMMAND install_name_tool -change \"${dylib_link_path}\" \"@loader_path/../lib2/${dylib_name_ext}\" \${file})")
endif ()

install(CODE "
file(GLOB files \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${EXEC_DIR}/*\" \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/*.dylib\" \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/plugins/*.dylib\" \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib2/*.dylib\")
foreach(file \${files})
Expand Down