Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rtti option #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Android")
set(CMAKE_C_FLAGS "-Wno-error=unused-but-set-variable -Wno-error=strict-prototypes")
endif()

# Add -frtti only for Linux and macOS
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti")
endif()
Comment on lines +24 to +26

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working on linux but getting the same error for intel mac architecture.

Screenshot 2025-03-18 at 5 51 18 PM


set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)

Expand All @@ -44,20 +49,30 @@ endif()

add_library(${PROJECT_NAME} SHARED
src/cpp/rtc-wrapper.cpp
src/cpp/media-direction.cpp
src/cpp/media-rtcpreceivingsession-wrapper.cpp
src/cpp/media-track-wrapper.cpp
src/cpp/media-audio-wrapper.cpp
src/cpp/media-video-wrapper.cpp
src/cpp/data-channel-wrapper.cpp
src/cpp/peer-connection-wrapper.cpp
src/cpp/thread-safe-callback.cpp
src/cpp/web-socket-wrapper.cpp
src/cpp/web-socket-server-wrapper.cpp
src/cpp/main.cpp
${CMAKE_JS_SRC}
)

if(NOT NO_MEDIA)
target_sources(${PROJECT_NAME} PRIVATE
src/cpp/media-direction.cpp
src/cpp/media-rtcpreceivingsession-wrapper.cpp
src/cpp/media-track-wrapper.cpp
src/cpp/media-audio-wrapper.cpp
src/cpp/media-video-wrapper.cpp
)
endif()

if(NOT NO_WEBSOCKET)
target_sources(${PROJECT_NAME} PRIVATE
src/cpp/web-socket-wrapper.cpp
src/cpp/web-socket-server-wrapper.cpp
)
endif()
Comment on lines 50 to +74

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update is giving error: 'napi.h' file not found


set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")

Expand Down