mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-25 09:41:30 +02:00
contrib: srt: fix non-GNU compiler detection
CMAKE_CXX_COMPILER_ID is not necessarily defined
This commit is contained in:
parent
ccbef67f77
commit
36ebbca2ca
@ -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 $@
|
||||
|
||||
|
23
contrib/src/srt/srt-fix-non-gnu-detection.patch
Normal file
23
contrib/src/srt/srt-fix-non-gnu-detection.patch
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user