Improved OSX/Cmake and dylibs' execution path
This commit is contained in:
parent
7f11d16f3b
commit
6b98053101
@ -142,7 +142,13 @@ macro(sfml_add_library target)
|
||||
if(THIS_EXTERNAL_LIBS)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
# in shared build, we use the regular linker commands
|
||||
target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
|
||||
target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
|
||||
|
||||
if (MACOSX)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@executable_path/../Frameworks")
|
||||
endif()
|
||||
else()
|
||||
# in static build there's no link stage, but with some compilers it is possible to force
|
||||
# the generated static library to directly contain the symbols from its dependencies
|
||||
|
@ -83,7 +83,7 @@ if(BUILD_SHARED_LIBS)
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${X11_LIBRARIES})
|
||||
elseif(MACOSX)
|
||||
# We use static version of freetype so we need to link against zlib.
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES} "-framework AGL")
|
||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user