vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Mon Apr 23 13:15:12 
2018 +0200| [36ebbca2caf6d2f5f7cd392732a6056baf8929a9] | committer: Steve Lhomme

contrib: srt: fix non-GNU compiler detection

CMAKE_CXX_COMPILER_ID is not necessarily defined

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=36ebbca2caf6d2f5f7cd392732a6056baf8929a9
---

 contrib/src/srt/rules.mak                       |  1 +
 contrib/src/srt/srt-fix-non-gnu-detection.patch | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/contrib/src/srt/rules.mak b/contrib/src/srt/rules.mak
index 68233c8f01..bed9fc524d 100644
--- a/contrib/src/srt/rules.mak
+++ b/contrib/src/srt/rules.mak
@@ -29,6 +29,7 @@ srt: srt-$(SRT_VERSION).tar.gz .sum-srt
        $(APPLY) $(SRC)/srt/add-implicit-link-libraries.patch 
        $(APPLY) 
$(SRC)/srt/0001-CMakeLists.txt-substitute-link-flags-for-package-nam.patch
        $(APPLY) $(SRC)/srt/0002-CMakeLists.txt-let-cmake-find-pthread.patch
+       $(APPLY) $(SRC)/srt/srt-fix-non-gnu-detection.patch 
        $(call pkg_static,"scripts/haisrt.pc.in")
        mv srt-$(SRT_VERSION) $@ && touch $@
 
diff --git a/contrib/src/srt/srt-fix-non-gnu-detection.patch 
b/contrib/src/srt/srt-fix-non-gnu-detection.patch
new file mode 100644
index 0000000000..f7118afd1c
--- /dev/null
+++ b/contrib/src/srt/srt-fix-non-gnu-detection.patch
@@ -0,0 +1,23 @@
+--- srt/CMakeLists.txt 2018-04-23 13:12:07.138132400 +0200
++++ srt/CMakeLists.txt.non-gnu 2018-04-23 13:11:11.088341900 +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)

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to