Commit 8c2252b8 authored by David Partyka's avatar David Partyka

ENH: Fix pv_install_library macro for use on Mac

Fix Macro to correctly install libs and their symlinks on Mac which use a different nameing convention (lib.*.dylib) than Linux (lib.so.*).
parent a0665d6a
......@@ -79,8 +79,21 @@ ENDMACRO(pv_set_if_not_set)
FUNCTION (pv_install_library libpath dest component)
IF (NOT WIN32)
GET_FILENAME_COMPONENT(dir_tmp ${libpath} PATH)
GET_FILENAME_COMPONENT(name_tmp ${libpath} NAME)
FILE(GLOB lib_list RELATIVE "${dir_tmp}" "${libpath}*")
SET(name_tmp)
# libs symlinks are always named lib.*.dylib on mac
# libs symlinks are always named lib.so.* on linux
IF (APPLE)
GET_FILENAME_COMPONENT(name_tmp ${libpath} NAME_WE)
FILE(GLOB lib_list "${dir_tmp}/${name_tmp}*")
message("glob: ${dir_tmp}/${name_tmp}")
ELSE (APPLE)
GET_FILENAME_COMPONENT(dir_tmp ${libpath} PATH)
GET_FILENAME_COMPONENT(name_tmp ${libpath} NAME)
FILE(GLOB lib_list RELATIVE "${dir_tmp}" "${libpath}*")
ENDIF (APPLE)
message("libpath: ${libpath}")
message("dir_tmp: ${dir_tmp}")
message("lib_list: ${lib_list}")
INSTALL(CODE "
MESSAGE(STATUS \"Installing ${name_tmp}\")
EXECUTE_PROCESS (WORKING_DIRECTORY ${dir_tmp}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment