mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Update cmake policy wrt. RPATH on OSX
Previous settings caused install outside CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES to use install_name "lib/" in place of the expected (and useful) "@rpath/".
This commit is contained in:
parent
3c29a81b8b
commit
c9ec6aafb6
@ -21,9 +21,15 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
|
||||
|
||||
if (POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default.
|
||||
endif()
|
||||
if (POLICY CMP0054)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
endif()
|
||||
if (POLICY CMP0068)
|
||||
cmake_policy(SET CMP0068 NEW) # RPATH settings on macOS do not affect install_name.
|
||||
endif()
|
||||
if (POLICY CMP0074)
|
||||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
@ -140,7 +140,6 @@ macro(add_event_library LIB_NAME)
|
||||
set_target_properties(
|
||||
"${LIB_NAME}_shared" PROPERTIES
|
||||
OUTPUT_NAME "${LIB_NAME}-${EVENT_PACKAGE_RELEASE}.${CURRENT_MINUS_AGE}"
|
||||
INSTALL_NAME_DIR "${CMAKE_INSTALL_LIBDIR}"
|
||||
LINK_FLAGS "-compatibility_version ${COMPATIBILITY_VERSION} -current_version ${COMPATIBILITY_VERSION}.${EVENT_ABI_LIBVERSION_REVISION}")
|
||||
else()
|
||||
math(EXPR CURRENT_MINUS_AGE "${EVENT_ABI_LIBVERSION_CURRENT}-${EVENT_ABI_LIBVERSION_AGE}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user