mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
More rpath fixes -- this time for macOS.
This commit is contained in:
parent
18960811cc
commit
6572465e1c
@ -1,6 +1,7 @@
|
||||
0.96.10
|
||||
|
||||
* fixed race condition in WasapiOut that caused the app to crash.
|
||||
* fixed `-rpath` for macOS build.
|
||||
|
||||
0.96.9
|
||||
|
||||
|
@ -111,8 +111,18 @@ message(STATUS "[build] link libraries are: ${musikcube_LINK_LIBS}")
|
||||
# ensure the binaries can find libmusikcore.so, which lives in the
|
||||
# same directory.
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
# in Linux/BSD distributions we can specify the magic "$ORIGIN" value for
|
||||
# the rpath for the dymamic linker to search the executable's directory
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
else()
|
||||
# from what i can tell, the macos dynamic linker does not support relative
|
||||
# rpath values, so the aboslute path to libmusikcube.dylib needs to be baked
|
||||
# in using these special flags. additionally, the rpath value specified here
|
||||
# is not applied to the binaries until the user runs `make install`.
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
set(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/share/musikcube/")
|
||||
endif()
|
||||
|
||||
if (EXISTS "/etc/arch-release" OR EXISTS "/etc/manjaro-release" OR NO_NCURSESW)
|
||||
|
@ -9,6 +9,4 @@ endif()
|
||||
|
||||
add_executable(core_c_demo ${CORE_C_DEMO_SRCS})
|
||||
|
||||
set_target_properties(core_c_demo PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN")
|
||||
|
||||
target_link_libraries(core_c_demo ${musikcube_LINK_LIBS} musikcore)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 96
|
||||
#define VERSION_PATCH 10
|
||||
#define VERSION_COMMIT_HASH "#4bb9bbad"
|
||||
#define VERSION_COMMIT_HASH "#18960811"
|
||||
#define VERSION "0.96.10"
|
||||
|
||||
namespace musik {
|
||||
|
@ -79,8 +79,6 @@ configure_file("musikcube.in" "musikcube" @ONLY)
|
||||
add_executable(musikcube ${CUBE_SRCS})
|
||||
add_definitions(-DNCURSES_WIDECHAR)
|
||||
|
||||
set_target_properties(musikcube PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN")
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
if (${LINK_STATICALLY} MATCHES "true")
|
||||
find_library(
|
||||
|
@ -12,8 +12,6 @@ endif()
|
||||
configure_file("musikcubed.in" "musikcubed" @ONLY)
|
||||
add_executable(musikcubed ${DAEMON_SRCS})
|
||||
|
||||
set_target_properties(musikcubed PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN")
|
||||
|
||||
if (${LINK_STATICALLY} MATCHES "true")
|
||||
find_library(EVLIB NAMES libev.a ev)
|
||||
target_link_libraries(musikcubed ${musikcube_LINK_LIBS} ${EVLIB} musikcore)
|
||||
|
Loading…
Reference in New Issue
Block a user