diff --git a/CMakeLists.txt b/CMakeLists.txt index 5760a4b7b..9dd556c18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -257,11 +257,22 @@ add_library(datachannel SHARED ${LIBDATACHANNEL_HEADERS} ${LIBDATACHANNEL_IMPL_SOURCES} ${LIBDATACHANNEL_IMPL_HEADERS}) + set_target_properties(datachannel PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} CXX_STANDARD 17 CXX_VISIBILITY_PRESET default) + +if(APPLE) + set_target_properties(datachannel PROPERTIES + VERSION 0 + SOVERSION 0 + MACHO_COMPATIBILITY_VERSION 0 + MACHO_CURRENT_VERSION ${PROJECT_VERSION} + NO_SONAME TRUE) +endif() + target_compile_definitions(datachannel PRIVATE RTC_EXPORTS) add_library(datachannel-static STATIC EXCLUDE_FROM_ALL