Skip to content

Commit

Permalink
Configure datachannel target_properties for APPLE
Browse files Browse the repository at this point in the history
After 7591b96 libdatachannel stopped working with OBS on macOS[0].
XCode only resolves one level of symlinks [1]. libdatachannel
is generating two levels.

This commit updates CMake to instead use ELF Headers instead of file
names to communicate version of macOS.

[0] https://stackoverflow.com/questions/29946961/xcode-copy-files-build-phase-and-symlinks
[1] obsproject/obs-deps#204 (comment)
  • Loading branch information
Sean-Der committed Jan 11, 2024
1 parent 143a44d commit 2f34bd5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ set_target_properties(datachannel PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
CXX_STANDARD 17
CXX_VISIBILITY_PRESET default)

if(APPLE)
set_target_properties(datachannel PROPERTIES
SOVERSION ${PROJECT_VERSION}
MACHO_COMPATIBILITY_VERSION 1.0.0
MACHO_CURRENT_VERSION ${PROJECT_VERSION})
endif()

target_compile_definitions(datachannel PRIVATE RTC_EXPORTS)

add_library(datachannel-static STATIC EXCLUDE_FROM_ALL
Expand Down

0 comments on commit 2f34bd5

Please sign in to comment.