ソースを参照

Merge pull request #1417 from murat-dogan/cmake_version

libsrtp2 v2.7.0 requires cmake >= v3.21.0
Paul-Louis Ageneau 3 週間 前
コミット
32725ebf6f
1 ファイル変更6 行追加0 行削除
  1. 6 0
      CMakeLists.txt

+ 6 - 0
CMakeLists.txt

@@ -27,6 +27,12 @@ option(CAPI_STDCALL "Set calling convention of C API callbacks stdcall" OFF)
 option(SCTP_DEBUG "Enable SCTP debugging output to verbose log" OFF)
 option(SCTP_DEBUG "Enable SCTP debugging output to verbose log" OFF)
 option(RTC_UPDATE_VERSION_HEADER "Enable updating the version header" OFF)
 option(RTC_UPDATE_VERSION_HEADER "Enable updating the version header" OFF)
 
 
+if(NOT NO_MEDIA AND NOT PREFER_SYSTEM_LIB)
+	if(CMAKE_VERSION VERSION_LESS 3.21)
+		message(FATAL_ERROR "CMake >= v3.21 is required to build libdatachannel with media support (with submodules).")
+	endif()
+endif()
+
 if (USE_GNUTLS AND USE_MBEDTLS)
 if (USE_GNUTLS AND USE_MBEDTLS)
 	message(FATAL_ERROR "Both USE_MBEDTLS and USE_GNUTLS cannot be enabled at the same time")
 	message(FATAL_ERROR "Both USE_MBEDTLS and USE_GNUTLS cannot be enabled at the same time")
 endif()
 endif()