Commits

Pierre Joye  committed ad4461b

improve/fix vpx detection

  • Participants
  • Parent commits 2ce761c

Comments (0)

Files changed (1)

File cmake/modules/FindVPX.cmake

 SET(VPX_FOUND "NO")
 SET(VPX_LIBRARY "")
 
-FIND_PATH(VPX_VPX_INCLUDE_DIR vp8cx.h
+FIND_PATH(VPX_INCLUDE_DIR vp8cx.h
 /usr/local/include/vpx
 /usr/include/vpx
 )
 
-SET(VPX_NAMES ${VPX_NAMES} vpxmt libvpx)
+SET(VPX_NAMES ${VPX_NAMES} "vpxmt" "libvpx")
 FIND_LIBRARY(VPX_LIBRARY
  NAMES ${VPX_NAMES}
- PATHS /usr/lib64 /usr/lib /usr/local/lib
+ PATHS "${PROJECT_SOURCE_DIR}/../deps/lib" /usr/lib64 /usr/lib /usr/local/lib 
 )
 
-IF (VPX_LIBRARY AND VPX_VPX_INCLUDE_DIR)
-	SET(VPX_INCLUDE_DIR ${VPX_VPX_INCLUDE_DIR})
+IF (VPX_LIBRARY AND VPX_INCLUDE_DIR)
+	SET(VPX_INCLUDE_DIR ${VPX_INCLUDE_DIR})
 	SET(VPX_LIBRARIES ${VPX_LIBRARY})
 	SET(VPX_FOUND "YES")
 
-ENDIF (VPX_LIBRARY AND VPX_VPX_INCLUDE_DIR)
+ENDIF (VPX_LIBRARY AND VPX_INCLUDE_DIR)
 
 IF (VPX_FOUND)
   IF (NOT VPX_FIND_QUIETLY)
-    MESSAGE(STATUS "Found XPM: ${VPX_LIBRARY}")
+    MESSAGE(STATUS "Found VPX: ${VPX_LIBRARY}")
   ENDIF (NOT VPX_FIND_QUIETLY)
 ELSE (VPX_FOUND)
   IF (VPX_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find XPM library")
+    MESSAGE(FATAL_ERROR "Could not find VPX library")
   ENDIF (VPX_FIND_REQUIRED)
 ENDIF (VPX_FOUND)
 
-MARK_AS_ADVANCED(VPX_VPX_INCLUDE_DIR VPX_LIBRARY )
+MARK_AS_ADVANCED(VPX_INCLUDE_DIR VPX_LIBRARY )
 SET(VPX_LIBRARIES ${VPX_LIBRARY})