File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,18 @@ function(bundle_lib lib)
558
558
DESTINATION "${INSTALL_LIB_DIR} "
559
559
COMPONENT JDBCDll
560
560
)
561
+ # Symlinks need to be created to allow authenticating
562
+ # plugins to load dependencies in MacOS
563
+ #
564
+ # NOTE: in Linux the dependencies are adressed in
565
+ # a different way
566
+ install (CODE "
567
+ execute_process(
568
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ../${lib_name} ${lib_name}
569
+ WORKING_DIRECTORY \"\$ ENV{DESTDIR}\$ {CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} /plugin\"
570
+ )
571
+ " )
572
+
561
573
else ()
562
574
install (FILES ${lib}
563
575
DESTINATION "${INSTALL_LIB_DIR} /private"
@@ -648,6 +660,26 @@ macro(bundle_libs to_bundle ignored)
648
660
649
661
endforeach ()
650
662
663
+ if (APPLE )
664
+ # Create symlinks for OpenSSL dependencies in MacOS.
665
+ # The actual OpenSSL libraries should already be
666
+ # installed with XDevAPI connector.
667
+ # Other dependencies such as fido2 already have symlinks
668
+ # created at this stage.
669
+ install (CODE "
670
+ foreach(openssl_lib ssl crypto)
671
+ file(GLOB found_libs \"\$ ENV{DESTDIR}\$ {CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} /lib\$ {openssl_lib}.*dylib\" )
672
+ foreach(lib_file \$ {found_libs})
673
+ get_filename_component(openssl_lib_name \$ {lib_file} NAME)
674
+ execute_process(
675
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ../\$ {openssl_lib_name} \$ {openssl_lib_name}
676
+ WORKING_DIRECTORY \"\$ ENV{DESTDIR}\$ {CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR} /plugin\"
677
+ )
678
+ endforeach(lib_file)
679
+ endforeach(openssl_lib)
680
+ " )
681
+ endif ()
682
+
651
683
endmacro (bundle_libs )
652
684
653
685
You can’t perform that action at this time.
0 commit comments