[vlmc-devel] commit: cmake: improve libvlc detection (Ludovic Fauvet )

git at videolan.org git at videolan.org
Wed Apr 14 01:59:57 CEST 2010


vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Wed Apr 14 01:57:05 2010 +0200| [ee2a6e296e44ae14b8310c7e18d125a3ae68ccbf] | committer: Ludovic Fauvet 

cmake: improve libvlc detection

Changes made by phonon-vlc developers.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=ee2a6e296e44ae14b8310c7e18d125a3ae68ccbf
---

 cmake/FindLIBVLC.cmake |   51 ++++++++++++++++++++++++-----------------------
 1 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/cmake/FindLIBVLC.cmake b/cmake/FindLIBVLC.cmake
index b312cd6..537d7d7 100644
--- a/cmake/FindLIBVLC.cmake
+++ b/cmake/FindLIBVLC.cmake
@@ -18,37 +18,37 @@
 #Put here path to custom location
 #example: /home/user/vlc/include etc..
 FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h
-  "$ENV{LIBVLC_INCLUDE_PATH}"
-  "$ENV{LIB_DIR}/include"
-  "$ENV{LIB_DIR}/include/vlc"
-  "/usr/include"
-  "/usr/include/vlc"
-  "/usr/local/include"
-  "/usr/local/include/vlc"
-  #mingw
-  c:/msys/local/include
-  NO_DEFAULT_PATH
+  HINTS "$ENV{LIBVLC_INCLUDE_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/include"
+    "$ENV{LIB_DIR}/include/vlc"
+    "/usr/include"
+    "/usr/include/vlc"
+    "/usr/local/include"
+    "/usr/local/include/vlc"
+    #mingw
+    c:/msys/local/include
   )
-FIND_PATH(LIBVLC_INCLUDE_DIR vlc.h)
+FIND_PATH(LIBVLC_INCLUDE_DIR PATHS "${CMAKE_INCLUDE_PATH}/vlc" NAMES vlc.h)
 
 #Put here path to custom location
 #example: /home/user/vlc/lib etc..
-FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc PATHS
-  "$ENV{LIBVLC_LIBRARY_PATH}"
-  "$ENV{LIB_DIR}/lib"
-  #mingw
-  c:/msys/local/lib
-  NO_DEFAULT_PATH
+FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc libvlc
+  HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    #mingw
+    c:/msys/local/lib
   )
-FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc)
-FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore PATHS
-  "$ENV{LIBVLC_LIBRARY_PATH}"
-  "$ENV{LIB_DIR}/lib"
-  #mingw
-  c:/msys/local/lib
-  NO_DEFAULT_PATH
+FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc libvlc)
+FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore
+  HINTS "$ENV{LIBVLC_LIBRARY_PATH}"
+  PATHS
+    "$ENV{LIB_DIR}/lib"
+    #mingw
+    c:/msys/local/lib
   )
-FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore)
+FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore libvlccore)
 
 IF (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY)
    SET(LIBVLC_FOUND TRUE)
@@ -65,3 +65,4 @@ ELSE (LIBVLC_FOUND)
       MESSAGE(FATAL_ERROR "Could not find LibVLC")
    ENDIF (LIBVLC_FIND_REQUIRED)
 ENDIF (LIBVLC_FOUND)
+



More information about the Vlmc-devel mailing list