Commit c8cb2a6e authored by Steve Lhomme's avatar Steve Lhomme

contrib: srt: fix compilation when the CMAKE_CXX_COMPILER_ID is not found

parent 5389c05b
......@@ -37,6 +37,7 @@ ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/srt/0002-CMakeLists.txt-let-cmake-find-pthread.patch
$(APPLY) $(SRC)/srt/srt-no-implicit-libs.patch
endif
$(APPLY) $(SRC)/srt/srt-fix-compiler-detect.patch
$(call pkg_static,"scripts/haisrt.pc.in")
mv srt-$(SRT_VERSION) $@ && touch $@
......
--- srt/CMakeLists.txt.msvc-detect 2018-05-23 08:55:10.318208300 +0200
+++ srt/CMakeLists.txt 2018-05-18 13:33:40.442158800 +0200
@@ -115,12 +115,14 @@ message (STATUS "SSL libraries: ${SSL_LI
# Detect if the compiler is GNU compatable for flags
set(HAVE_COMPILER_GNU_COMPAT 0)
-foreach (gnid GNU Intel Clang AppleClang)
- if (${CMAKE_CXX_COMPILER_ID} STREQUAL ${gnid})
- set(HAVE_COMPILER_GNU_COMPAT 1)
- break()
- endif()
-endforeach()
+if ( CMAKE_CXX_COMPILER_ID )
+ foreach (gnid GNU Intel Clang AppleClang)
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL ${gnid})
+ set(HAVE_COMPILER_GNU_COMPAT 1)
+ break()
+ endif()
+ endforeach()
+endif()
if (DISABLE_CXX11)
set (ENABLE_CXX11 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment