Fix CMake warning on macOS since CMake 3.9
This commit is contained in:
parent
f963faa694
commit
8b7a50a914
2 changed files with 18 additions and 10 deletions
|
@ -123,13 +123,13 @@ macro(sfml_add_library target)
|
|||
# adapt install directory to allow distributing dylibs/frameworks in user's frameworks/application bundle
|
||||
# but only if cmake rpath options aren't set
|
||||
if(NOT CMAKE_SKIP_RPATH AND NOT CMAKE_SKIP_INSTALL_RPATH AND NOT CMAKE_INSTALL_RPATH AND NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH AND NOT CMAKE_INSTALL_NAME_DIR)
|
||||
if(CMAKE_SKIP_BUILD_RPATH)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
INSTALL_NAME_DIR "@rpath")
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES
|
||||
BUILD_WITH_INSTALL_RPATH 1
|
||||
INSTALL_NAME_DIR "@rpath")
|
||||
set_target_properties(${target} PROPERTIES INSTALL_NAME_DIR "@rpath")
|
||||
if(NOT CMAKE_SKIP_BUILD_RPATH)
|
||||
if (CMAKE_VERSION VERSION_LESS 3.9)
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
else()
|
||||
set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue