diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 7dd2c43..69ee0c3 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -303,9 +303,19 @@ target_link_libraries(TeaSpeakServer zstd::libzstd_static ) -target_link_libraries(TeaSpeakServer - ${CMAKE_SOURCE_DIR}/rtclib/target/debug/libteaspeak_rtc.so -) +if(EXISTS "${CMAKE_SOURCE_DIR}/rtclib/librtc.so" AND NOT NO_RELEASE_RTC) + message("Linking to release librtc file") + target_link_libraries(TeaSpeakServer + ${CMAKE_SOURCE_DIR}/rtclib/librtc.so + ) +elseif(EXISTS "${CMAKE_SOURCE_DIR}/rtclib/target/debug/libteaspeak_rtc.so") + message("Linkding against debug libteaspeak_rtc.so") + target_link_libraries(TeaSpeakServer + ${CMAKE_SOURCE_DIR}/rtclib/target/debug/libteaspeak_rtc.so + ) +else() + message(FATAL_ERROR "Missing librtc library file") +endif() # include_directories(${LIBRARY_PATH}/boringssl/include/) target_link_libraries(TeaSpeakServer