bundle: OSX use -rpath for bundled libevent
This commit is contained in:
@@ -149,6 +149,9 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get -y install doxygen python-is-python3 python3-breathe
|
||||
make -C documentation
|
||||
- name: otool
|
||||
if: runner.os == 'macOS'
|
||||
run: otool -D -L bundle/usr/*/lib/*.dylib lib/*/*.dylib bin/*/pvxinfo
|
||||
- name: Host info
|
||||
run: python .ci/cue.py --add-path "{TOP}/bin/{EPICS_HOST_ARCH}" --add-path "{TOP}/bundle/usr/{EPICS_HOST_ARCH}/lib" exec pvxinfo -D
|
||||
- name: Run main module tests
|
||||
|
||||
+3
-1
@@ -30,6 +30,8 @@ CMAKEFLAGS += -DEVENT__DISABLE_SAMPLES=ON
|
||||
CMAKEFLAGS += -DEVENT__DISABLE_TESTS=ON
|
||||
CMAKEFLAGS += -DEVENT__DISABLE_BENCHMARK=ON
|
||||
|
||||
CMAKEFLAGS += -DCMAKE_MACOSX_RPATH=ON -DCMAKE_SKIP_INSTALL_RPATH=OFF
|
||||
|
||||
# searched for toolchain files
|
||||
CMAKEFLAGS += -DCMAKE_MODULE_PATH:DIR="$(abspath $(TOP)/bundle/cmake)"
|
||||
|
||||
@@ -120,7 +122,7 @@ ifneq (,$(filter %mingw,$(T_A)))
|
||||
ifeq (NO,$(SHARED_LIBRARIES))
|
||||
$(CP) $(LIBEVENT_$(T_A))/lib/libevent_core.a $(LIBEVENT_$(T_A))/lib/event_core.lib
|
||||
# HACK: when STATIC_BUILD=YES we (in configure/RULES_PVXS_MODULE) inject the event_core
|
||||
# dependency via <target>_LIBS += event_core which requires end existance of
|
||||
# dependency via <target>_LIBS += event_core which requires the existance of
|
||||
# $(event_core_DIR)/event_core.lib however, cmake outputs the *nix style name
|
||||
# libevent_core.a (probably because it can coexist with the dll import library
|
||||
# named libevent_core.dll.a).
|
||||
|
||||
@@ -28,6 +28,9 @@ LIBEVENT_BUNDLE_LIBS += $(LIBEVENT_BUNDLE_LIBS_POSIX_$(POSIX))
|
||||
LIBEVENT_SYS_LIBS_WIN32 = bcrypt iphlpapi netapi32 ws2_32
|
||||
LIBEVENT_SYS_LIBS += $(LIBEVENT_SYS_LIBS_$(OS_CLASS))
|
||||
|
||||
LIBEVENT_BUNDLE_LDFLAGS_Darwin_NO = -Wl,-rpath,$(LIBEVENT)/lib
|
||||
LIBEVENT_BUNDLE_LDFLAGS += $(LIBEVENT_BUNDLE_LDFLAGS_$(OS_CLASS)_$(STATIC_BUILD))
|
||||
|
||||
event_core_DIR = $(LIBEVENT)/lib
|
||||
event_pthreads_DIR = $(LIBEVENT)/lib
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ endif
|
||||
_PVXS_CHECK_VARS := PROD TESTPROD LIB $(PROD) $(TESTPROD) $(LIBRARY)
|
||||
|
||||
ifeq (,$(LIBEVENT))
|
||||
# libevent in default search path
|
||||
|
||||
# $(1) is PROD or LIBRARY name
|
||||
define _PVXS_ADD_LIBEVENT
|
||||
@@ -20,11 +21,13 @@ $(1)_SYS_LIBS := $$($(1)_SYS_LIBS) $$(if $$(filter pvxs,$$($(1)_LIBS)),$$(LIBEVE
|
||||
endef
|
||||
|
||||
else
|
||||
# libevent in specific location
|
||||
|
||||
# $(1) is PROD or LIBRARY name
|
||||
define _PVXS_ADD_LIBEVENT
|
||||
$(1)_LIBS := $$($(1)_LIBS) $$(if $$(filter pvxs,$$($(1)_LIBS)),$$(LIBEVENT_BUNDLE_LIBS))
|
||||
$(1)_SYS_LIBS := $$($(1)_SYS_LIBS) $$(if $$(filter pvxs,$$($(1)_LIBS)),$$(LIBEVENT_SYS_LIBS))
|
||||
$(1)_LDFLAGS := $$($(1)_LDFLAGS) $$(if $$(filter pvxs,$$($(1)_LIBS)),$$(LIBEVENT_BUNDLE_LDFLAGS))
|
||||
endef
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user