[vlc-devel] [PATCH 02/19] contrib: fix CMake root path on mingw

Rémi Denis-Courmont remi at remlab.net
Wed Jun 14 17:41:39 CEST 2017


Le keskiviikkona 14. kesäkuuta 2017, 17.31.14 EEST Steve Lhomme a écrit :
> On Wed, Jun 14, 2017 at 3:33 PM, Rémi Denis-Courmont <remi at remlab.net> 
wrote:
> > On June 14, 2017 3:01:51 PM GMT+03:00, Steve Lhomme <robux4 at videolabs.io> 
wrote:
> >>CMake needs a hybrid path format for the build target root path on
> >>Windows.
> >>---
> >>
> >> contrib/src/main.mak | 8 ++++++++
> >> 1 file changed, 8 insertions(+)
> >>
> >>diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> >>index 7a77d03afb..28bd43c632 100644
> >>--- a/contrib/src/main.mak
> >>+++ b/contrib/src/main.mak
> >>@@ -492,7 +492,15 @@ endif
> >>
> >> endif
> >> 
> >>       echo "set(CMAKE_C_COMPILER $(CC))" >> $@
> >>       echo "set(CMAKE_CXX_COMPILER $(CXX))" >> $@
> >>
> >>+ifndef HAVE_CROSS_COMPILE
> >>+ifdef HAVE_WIN32
> >>+      echo "set(CMAKE_FIND_ROOT_PATH `cygpath -am $(PREFIX)`)" >> $@
> >>+else
> >>
> >>       echo "set(CMAKE_FIND_ROOT_PATH $(PREFIX))" >> $@
> >>
> >>+endif
> >>+else
> >>+      echo "set(CMAKE_FIND_ROOT_PATH $(PREFIX))" >> $@
> >>+endif
> >>
> >>       echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> $@
> >>       echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> $@
> >>       echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> $@
> >>
> >>--
> >>2.12.1
> >>
> >>_______________________________________________
> >>vlc-devel mailing list
> >>To unsubscribe or modify your subscription options:
> >>https://mailman.videolan.org/listinfo/vlc-devel
> >>
> > The predicate is sufficient but not necessary here, so not correct AFAICT.
> 
> Can you be more specific ? Which predicate is not necessary ? Given
> cygpath likely only exist on mingw, I think assuming HAVE_WIN32 and
> HAVE_CROSS_COMPILE not defined means we're on msys/mingw.

Yes, that´s what I said: it´s a sufficient, but not necessary condition.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list