Move libGL to proper location (as hard-coded in SDL)

This commit is contained in:
Lubos Dolezel 2020-02-15 16:45:27 +01:00
parent 1b657667b7
commit d48a15f9ba
3 changed files with 15 additions and 4 deletions

View File

@ -55,7 +55,7 @@ FUNCTION(use_ld64 target)
-Wl,-dylib_file,/usr/lib/libbz2.1.0.dylib:${CMAKE_BINARY_DIR}/src/external/bzip2/libbz2.1.0.dylib \
-Wl,-dylib_file,/usr/lib/libssl.0.9.8.dylib:${CMAKE_BINARY_DIR}/src/external/openssl/src/libssl.0.9.8.dylib \
-Wl,-dylib_file,/usr/lib/libcrypto.0.9.8.dylib:${CMAKE_BINARY_DIR}/src/external/openssl/src/libcrypto.0.9.8.dylib \
-Wl,-dylib_file,/usr/lib/native/libGL.dylib:${CMAKE_BINARY_DIR}/src/native/libGL.dylib \
-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:${CMAKE_BINARY_DIR}/src/native/libGL.dylib \
-Wl,-dylib_file,/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage:${CMAKE_BINARY_DIR}/src/frameworks/CoreImage/CoreImage \
-Wl,-dylib_file,/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents:${CMAKE_BINARY_DIR}/src/frameworks/CoreServices/FSEvents \
-Wl,-dylib_file,/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices:${CMAKE_BINARY_DIR}/src/frameworks/CoreServices/LaunchServices \

View File

@ -13,11 +13,17 @@ function(wrap_elf name elfname)
wrapgen
)
set(DYLIB_INSTALL_NAME "/usr/lib/native/lib${name}.dylib")
if (ARGC LESS 3)
set(destination "/usr/lib/native")
else (ARGC LESS 3)
set(destination ${ARGV2})
endif (ARGC LESS 3)
set(DYLIB_INSTALL_NAME "${destination}/lib${name}.dylib")
include_directories(${CMAKE_SOURCE_DIR}/src/libelfloader/native)
add_darling_library(${name} SHARED ${CMAKE_CURRENT_BINARY_DIR}/${name}.c)
target_link_libraries(${name} PRIVATE system elfloader)
make_fat(${name})
install(TARGETS ${name} DESTINATION libexec/darling/usr/lib/native)
install(TARGETS ${name} DESTINATION libexec/darling/${destination})
endfunction(wrap_elf)

View File

@ -7,9 +7,14 @@ wrap_elf(jpeg libjpeg.so)
wrap_elf(png libpng.so)
wrap_elf(tiff libtiff.so)
wrap_elf(X11 libX11.so)
wrap_elf(Xext libXext.so)
wrap_elf(XRandR libXrandr.so)
wrap_elf(Xcursor libXcursor.so)
wrap_elf(cairo libcairo.so)
wrap_elf(GL libGL.so)
wrap_elf(EGL libEGL.so)
wrap_elf(fontconfig libfontconfig.so)
wrap_elf(GL libGL.so "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries")
InstallSymlink(Versions/Current/Libraries
"${CMAKE_INSTALL_PREFIX}/libexec/darling/System/Library/Frameworks/OpenGL.framework/Libraries")