mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Libvpx is built with configure script and make. Unfortunate but the configure script is very dense and I'm not sure if it's worth translating into CMake, since it apparently does CPU detection for optimizations.
33 lines
636 B
CMake
33 lines
636 B
CMake
include(LibFindMacros)
|
|
|
|
libfind_pkg_check_modules(VPX_PKGCONF VPX)
|
|
|
|
find_path(VPX_INCLUDE_DIR
|
|
NAMES vpx/vp8.h
|
|
PATHS
|
|
${VPX_PKGCONF_INCLUDE_DIRS}
|
|
"/usr/include"
|
|
"/usr/local/include"
|
|
)
|
|
|
|
find_library(VPX_LIBRARY
|
|
NAMES vpx
|
|
PATHS
|
|
${VPX_PKGCONF_LIBRARY_DIRS}
|
|
"/usr/lib"
|
|
"/usr/local/lib"
|
|
)
|
|
|
|
set(VPX_PROCESS_INCLUDES VPX_INCLUDE_DIR)
|
|
set(VPX_PROCESS_LIBS VPX_LIBRARY)
|
|
libfind_process(VPX)
|
|
|
|
if(VPX_FOUND AND NOT TARGET webm::libvpx)
|
|
add_library(webm::libvpx UNKNOWN IMPORTED)
|
|
set_target_properties(
|
|
webm::libvpx
|
|
PROPERTIES
|
|
IMPORTED_LOCATION "${VPX_LIBRARY}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${VPX_INCLUDE_DIR}"
|
|
)
|
|
endif()
|