Fix major misunderstanding of cached variables in all find modules
This commit is contained in:
parent
34134bfbf6
commit
978ff008fe
@ -3,51 +3,48 @@
|
||||
# ICONV_FOUND
|
||||
# ICONV_INCLUDE_DIRS
|
||||
# ICONV_LIBRARIES
|
||||
#
|
||||
|
||||
if(ICONV_INCLUDE_DIRS AND ICONV_LIBRARIES)
|
||||
set(ICONV_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_ICONV QUIET iconv)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(ICONV_PATH_ARCH IconvPath${_lib_suffix})
|
||||
|
||||
find_path(ICONV_INCLUDE_DIR
|
||||
NAMES iconv.h
|
||||
HINTS
|
||||
${_ICONV_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV IconvPath
|
||||
ENV ${ICONV_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(ICONV_LIB
|
||||
NAMES ${_ICONV_LIBRARIES} iconv libiconv
|
||||
HINTS
|
||||
${_ICONV_LIBRARY_DIRS}
|
||||
"${ICONV_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${ICONV_INCLUDE_DIR}/../lib"
|
||||
"${ICONV_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${ICONV_INCLUDE_DIR}/lib"
|
||||
"${ICONV_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR} CACHE PATH "iconv include dir")
|
||||
set(ICONV_LIBRARIES ${ICONV_LIB} CACHE STRING "iconv libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_INCLUDE_DIR)
|
||||
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_ICONV QUIET iconv)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(ICONV_PATH_ARCH IconvPath${_lib_suffix})
|
||||
|
||||
find_path(ICONV_INCLUDE_DIR
|
||||
NAMES iconv.h
|
||||
HINTS
|
||||
${_ICONV_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV IconvPath
|
||||
ENV ${ICONV_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(ICONV_LIB
|
||||
NAMES ${_ICONV_LIBRARIES} iconv libiconv
|
||||
HINTS
|
||||
${_ICONV_LIBRARY_DIRS}
|
||||
"${ICONV_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${ICONV_INCLUDE_DIR}/../lib"
|
||||
"${ICONV_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${ICONV_INCLUDE_DIR}/lib"
|
||||
"${ICONV_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Iconv DEFAULT_MSG ICONV_LIB ICONV_INCLUDE_DIR)
|
||||
mark_as_advanced(ICONV_INCLUDE_DIR ICONV_LIB)
|
||||
|
||||
if(ICONV_FOUND)
|
||||
set(ICONV_INCLUDE_DIRS ${ICONV_INCLUDE_DIR})
|
||||
set(ICONV_LIBRARIES ${ICONV_LIB})
|
||||
endif()
|
||||
|
@ -4,73 +4,64 @@
|
||||
# JANSSON_INCLUDE_DIRS
|
||||
# JANSSON_LIBRARIES
|
||||
# JANSSON_VERSION
|
||||
#
|
||||
|
||||
if(JANSSON_INCLUDE_DIRS AND JANSSON_LIBRARIES)
|
||||
set(JANSSON_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_JANSSON QUIET jansson)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(JANSSON_PATH_ARCH JanssonPath${_lib_suffix})
|
||||
|
||||
find_path(Jansson_INCLUDE_DIR
|
||||
NAMES jansson.h
|
||||
HINTS
|
||||
${_JANSSON_INCLUDE_DIRS}
|
||||
ENV JanssonPath
|
||||
ENV ${JANSSON_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(Jansson_LIB
|
||||
NAMES ${_JANSSON_LIBRARIES} jansson libjansson
|
||||
HINTS
|
||||
${_JANSSON_LIBRARY_DIRS}
|
||||
"${Jansson_INCLUDE_DIR}/../lib"
|
||||
"${Jansson_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
if(JANSSON_VERSION)
|
||||
set(_JANSSON_VERSION_STRING "${JANSSON_VERSION}")
|
||||
elseif(_JANSSON_FOUND AND _JANSSON_VERSION)
|
||||
set(_JANSSON_VERSION_STRING "${_JANSSON_VERSION}")
|
||||
elseif(EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
|
||||
file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" _jansson_version_parse
|
||||
REGEX "#define[ \t]+JANSSON_VERSION[ \t]+.+")
|
||||
string(REGEX REPLACE
|
||||
".*#define[ \t]+JANSSON_VERSION[ \t]+\"(.+)\".*" "\\1"
|
||||
_JANSSON_VERSION_STRING "${_jansson_version_parse}")
|
||||
else()
|
||||
if(NOT Jansson_FIND_QUIETLY)
|
||||
message(WARNING "Failed to find Jansson version")
|
||||
endif()
|
||||
set(_JANSSON_VERSION_STRING "unknown")
|
||||
endif()
|
||||
|
||||
set(JANSSON_INCLUDE_DIRS ${Jansson_INCLUDE_DIR} CACHE PATH "Jansson include dir")
|
||||
set(JANSSON_LIBRARIES ${Jansson_LIB} CACHE STRING "Jansson libraries")
|
||||
set(JANSSON_VERSION "${_JANSSON_VERSION_STRING}" CACHE STRING "Jansson version")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Jansson
|
||||
FOUND_VAR JANSSON_FOUND
|
||||
REQUIRED_VARS Jansson_LIB Jansson_INCLUDE_DIR
|
||||
VERSION_VAR JANSSON_VERSION)
|
||||
mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIB)
|
||||
|
||||
if(NOT JANSSON_FOUND)
|
||||
unset(JANSSON_INCLUDE_DIRS CACHE)
|
||||
unset(JANSSON_LIBRARIES CACHE)
|
||||
endif()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_JANSSON QUIET jansson)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(JANSSON_PATH_ARCH JanssonPath${_lib_suffix})
|
||||
|
||||
find_path(Jansson_INCLUDE_DIR
|
||||
NAMES jansson.h
|
||||
HINTS
|
||||
${_JANSSON_INCLUDE_DIRS}
|
||||
ENV JanssonPath
|
||||
ENV ${JANSSON_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(Jansson_LIB
|
||||
NAMES ${_JANSSON_LIBRARIES} jansson libjansson
|
||||
HINTS
|
||||
${_JANSSON_LIBRARY_DIRS}
|
||||
"${Jansson_INCLUDE_DIR}/../lib"
|
||||
"${Jansson_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
if(JANSSON_VERSION)
|
||||
set(_JANSSON_VERSION_STRING "${JANSSON_VERSION}")
|
||||
elseif(_JANSSON_FOUND AND _JANSSON_VERSION)
|
||||
set(_JANSSON_VERSION_STRING "${_JANSSON_VERSION}")
|
||||
elseif(EXISTS "${Jansson_INCLUDE_DIR}/jansson.h")
|
||||
file(STRINGS "${Jansson_INCLUDE_DIR}/jansson.h" _jansson_version_parse
|
||||
REGEX "#define[ \t]+JANSSON_VERSION[ \t]+.+")
|
||||
string(REGEX REPLACE
|
||||
".*#define[ \t]+JANSSON_VERSION[ \t]+\"(.+)\".*" "\\1"
|
||||
_JANSSON_VERSION_STRING "${_jansson_version_parse}")
|
||||
else()
|
||||
if(NOT Jansson_FIND_QUIETLY)
|
||||
message(WARNING "Failed to find Jansson version")
|
||||
endif()
|
||||
set(_JANSSON_VERSION_STRING "unknown")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Jansson
|
||||
FOUND_VAR JANSSON_FOUND
|
||||
REQUIRED_VARS Jansson_LIB Jansson_INCLUDE_DIR
|
||||
VERSION_VAR _JANSSON_VERSION_STRING)
|
||||
mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIB)
|
||||
|
||||
if(JANSSON_FOUND)
|
||||
set(JANSSON_INCLUDE_DIRS ${Jansson_INCLUDE_DIR})
|
||||
set(JANSSON_LIBRARIES ${Jansson_LIB})
|
||||
set(JANSSON_VERSION ${_JANSSON_VERSION_STRING})
|
||||
endif()
|
||||
|
@ -7,53 +7,49 @@
|
||||
# For use in OBS:
|
||||
#
|
||||
# FFMPEG_INCLUDE_DIR
|
||||
#
|
||||
|
||||
if(LIBAVCODEC_INCLUDE_DIRS AND LIBAVCODEC_LIBRARIES)
|
||||
set(LIBAVCODEC_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVCODEC QUIET libavcodec)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavcodec/avcodec.h
|
||||
HINTS
|
||||
${_AVCODEC_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVCODEC_LIB
|
||||
NAMES ${_AVCODEC_LIBRARIES} avcodec-ffmpeg avcodec
|
||||
HINTS
|
||||
${_AVCODEC_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBAVCODEC_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR} CACHE PATH "Libavcodec include dir")
|
||||
set(LIBAVCODEC_LIBRARIES ${AVCODEC_LIB} CACHE STRING "Libavcodec libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavcodec DEFAULT_MSG AVCODEC_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVCODEC_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVCODEC QUIET libavcodec)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavcodec/avcodec.h
|
||||
HINTS
|
||||
${_AVCODEC_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVCODEC_LIB
|
||||
NAMES ${_AVCODEC_LIBRARIES} avcodec-ffmpeg avcodec
|
||||
HINTS
|
||||
${_AVCODEC_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavcodec DEFAULT_MSG AVCODEC_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVCODEC_LIB)
|
||||
|
||||
if(LIBAVCODEC_FOUND)
|
||||
set(LIBAVCODEC_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
|
||||
set(LIBAVCODEC_LIBRARIES ${AVCODEC_LIB})
|
||||
endif()
|
||||
|
@ -3,53 +3,49 @@
|
||||
# LIBAVFORMAT_FOUND
|
||||
# LIBAVFORMAT_INCLUDE_DIRS
|
||||
# LIBAVFORMAT_LIBRARIES
|
||||
#
|
||||
|
||||
if(LIBAVFORMAT_INCLUDE_DIRS AND LIBAVFORMAT_LIBRARIES)
|
||||
set(LIBAVFORMAT_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVFORMAT QUIET libavformat)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavformat/avformat.h
|
||||
HINTS
|
||||
${_AVFORMAT_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVFORMAT_LIB
|
||||
NAMES ${_AVFORMAT_LIBRARIES} avformat-ffmpeg avformat
|
||||
HINTS
|
||||
${_AVFORMAT_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBAVFORMAT_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR} CACHE PATH "Libavformat include dir")
|
||||
set(LIBAVFORMAT_LIBRARIES ${AVFORMAT_LIB} CACHE STRING "Libavformat libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavformat DEFAULT_MSG AVFORMAT_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVFORMAT_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVFORMAT QUIET libavformat)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavformat/avformat.h
|
||||
HINTS
|
||||
${_AVFORMAT_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVFORMAT_LIB
|
||||
NAMES ${_AVFORMAT_LIBRARIES} avformat-ffmpeg avformat
|
||||
HINTS
|
||||
${_AVFORMAT_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavformat DEFAULT_MSG AVFORMAT_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVFORMAT_LIB)
|
||||
|
||||
if(LIBAVFORMAT_FOUND)
|
||||
set(LIBAVFORMAT_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
|
||||
set(LIBAVFORMAT_LIBRARIES ${AVFORMAT_LIB})
|
||||
endif()
|
||||
|
@ -3,53 +3,49 @@
|
||||
# LIBAVUTIL_FOUND
|
||||
# LIBAVUTIL_INCLUDE_DIRS
|
||||
# LIBAVUTIL_LIBRARIES
|
||||
#
|
||||
|
||||
if(LIBAVUTIL_INCLUDE_DIRS AND LIBAVUTIL_LIBRARIES)
|
||||
set(LIBAVUTIL_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVUTIL QUIET libavutil)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavutil/avutil.h
|
||||
HINTS
|
||||
${_AVUTIL_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVUTIL_LIB
|
||||
NAMES ${_AVUTIL_LIBRARIES} avutil-ffmpeg avutil
|
||||
HINTS
|
||||
${_AVUTIL_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBAVUTIL_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR} CACHE PATH "Libavutil include dir")
|
||||
set(LIBAVUTIL_LIBRARIES ${AVUTIL_LIB} CACHE STRING "Libavutil libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavutil DEFAULT_MSG AVUTIL_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVUTIL_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_AVUTIL QUIET libavutil)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libavutil/avutil.h
|
||||
HINTS
|
||||
${_AVUTIL_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(AVUTIL_LIB
|
||||
NAMES ${_AVUTIL_LIBRARIES} avutil-ffmpeg avutil
|
||||
HINTS
|
||||
${_AVUTIL_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libavutil DEFAULT_MSG AVUTIL_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR AVUTIL_LIB)
|
||||
|
||||
if(LIBAVUTIL_FOUND)
|
||||
set(LIBAVUTIL_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
|
||||
set(LIBAVUTIL_LIBRARIES ${AVUTIL_LIB})
|
||||
endif()
|
||||
|
@ -7,55 +7,51 @@
|
||||
# For use in OBS:
|
||||
#
|
||||
# Libfdk_INCLUDE_DIR
|
||||
#
|
||||
|
||||
if(LIBFDK_INCLUDE_DIRS AND LIBFDK_LIBRARIES)
|
||||
set(LIBFDK_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_LIBFDK QUIET fdk-aac)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(LIBFDK_PATH_ARCH LibfdkPath${_lib_suffix})
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(Libfdk_INCLUDE_DIR
|
||||
NAMES fdk-aac/aacenc_lib.h
|
||||
HINTS
|
||||
${_LIBFDK_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV LibfdkPath
|
||||
ENV FFmpegPath
|
||||
ENV ${LIBFDK_PATH_ARCH}
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(Libfdk_LIB
|
||||
NAMES ${_LIBFDK_LIBRARIES} fdk-aac libfdk-aac
|
||||
HINTS
|
||||
${_LIBFDK_LIBRARY_DIRS}
|
||||
"${Libfdk_INCLUDE_DIR}/../lib"
|
||||
"${Libfdk_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${Libfdk_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${Libfdk_INCLUDE_DIR}/lib"
|
||||
"${Libfdk_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBFDK_INCLUDE_DIRS ${Libfdk_INCLUDE_DIR} CACHE PATH "Libfdk include dir")
|
||||
set(LIBFDK_LIBRARIES ${Libfdk_LIB} CACHE STRING "Libfdk libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libfdk DEFAULT_MSG Libfdk_LIB Libfdk_INCLUDE_DIR)
|
||||
mark_as_advanced(Libfdk_INCLUDE_DIR Libfdk_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_LIBFDK QUIET fdk-aac)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(LIBFDK_PATH_ARCH LibfdkPath${_lib_suffix})
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(Libfdk_INCLUDE_DIR
|
||||
NAMES fdk-aac/aacenc_lib.h
|
||||
HINTS
|
||||
${_LIBFDK_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV LibfdkPath
|
||||
ENV FFmpegPath
|
||||
ENV ${LIBFDK_PATH_ARCH}
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(Libfdk_LIB
|
||||
NAMES ${_LIBFDK_LIBRARIES} fdk-aac libfdk-aac
|
||||
HINTS
|
||||
${_LIBFDK_LIBRARY_DIRS}
|
||||
"${Libfdk_INCLUDE_DIR}/../lib"
|
||||
"${Libfdk_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${Libfdk_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${Libfdk_INCLUDE_DIR}/lib"
|
||||
"${Libfdk_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libfdk DEFAULT_MSG Libfdk_LIB Libfdk_INCLUDE_DIR)
|
||||
mark_as_advanced(Libfdk_INCLUDE_DIR Libfdk_LIB)
|
||||
|
||||
if(LIBFDK_FOUND)
|
||||
set(LIBFDK_INCLUDE_DIRS ${Libfdk_INCLUDE_DIR})
|
||||
set(LIBFDK_LIBRARIES ${Libfdk_LIB})
|
||||
endif()
|
||||
|
@ -3,53 +3,49 @@
|
||||
# LIBSWRESAMPLE_FOUND
|
||||
# LIBSWRESAMPLE_INCLUDE_DIRS
|
||||
# LIBSWRESAMPLE_LIBRARIES
|
||||
#
|
||||
|
||||
if(LIBSWRESAMPLE_INCLUDE_DIRS AND LIBSWRESAMPLE_LIBRARIES)
|
||||
set(LIBSWRESAMPLE_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SWRESAMPLE QUIET libswresample)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libswresample/swresample.h
|
||||
HINTS
|
||||
${_SWRESAMPLE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(SWRESAMPLE_LIB
|
||||
NAMES ${_SWRESAMPLE_LIBRARIES} swresample-ffmpeg swresample
|
||||
HINTS
|
||||
${_SWRESAMPLE_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBSWRESAMPLE_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR} CACHE PATH "Libswresample include dir")
|
||||
set(LIBSWRESAMPLE_LIBRARIES ${SWRESAMPLE_LIB} CACHE STRING "Libswresample libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libswresample DEFAULT_MSG SWRESAMPLE_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR SWRESAMPLE_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SWRESAMPLE QUIET libswresample)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libswresample/swresample.h
|
||||
HINTS
|
||||
${_SWRESAMPLE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(SWRESAMPLE_LIB
|
||||
NAMES ${_SWRESAMPLE_LIBRARIES} swresample-ffmpeg swresample
|
||||
HINTS
|
||||
${_SWRESAMPLE_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libswresample DEFAULT_MSG SWRESAMPLE_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR SWRESAMPLE_LIB)
|
||||
|
||||
if(LIBSWRESAMPLE_FOUND)
|
||||
set(LIBSWRESAMPLE_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
|
||||
set(LIBSWRESAMPLE_LIBRARIES ${SWRESAMPLE_LIB})
|
||||
endif()
|
||||
|
@ -3,53 +3,49 @@
|
||||
# LIBSWSCALE_FOUND
|
||||
# LIBSWSCALE_INCLUDE_DIRS
|
||||
# LIBSWSCALE_LIBRARIES
|
||||
#
|
||||
|
||||
if(LIBSWSCALE_INCLUDE_DIRS AND LIBSWSCALE_LIBRARIES)
|
||||
set(LIBSWSCALE_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SWSCALE QUIET libswscale)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libswscale/swscale.h
|
||||
HINTS
|
||||
${_SWSCALE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(SWSCALE_LIB
|
||||
NAMES ${_SWSCALE_LIBRARIES} swscale-ffmpeg swscale
|
||||
HINTS
|
||||
${_SWSCALE_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBSWSCALE_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR} CACHE PATH "Libswscale include dir")
|
||||
set(LIBSWSCALE_LIBRARIES ${SWSCALE_LIB} CACHE STRING "Libswscale libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libswscale DEFAULT_MSG SWSCALE_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR SWSCALE_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_SWSCALE QUIET libswscale)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(FFMPEG_INCLUDE_DIR
|
||||
NAMES libswscale/swscale.h
|
||||
HINTS
|
||||
${_SWSCALE_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV FFmpegPath
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include
|
||||
PATH_SUFFIXES ffmpeg libav)
|
||||
|
||||
find_library(SWSCALE_LIB
|
||||
NAMES ${_SWSCALE_LIBRARIES} swscale-ffmpeg swscale
|
||||
HINTS
|
||||
${_SWSCALE_LIBRARY_DIRS}
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib"
|
||||
"${FFMPEG_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libswscale DEFAULT_MSG SWSCALE_LIB FFMPEG_INCLUDE_DIR)
|
||||
mark_as_advanced(FFMPEG_INCLUDE_DIR SWSCALE_LIB)
|
||||
|
||||
if(LIBSWSCALE_FOUND)
|
||||
set(LIBSWSCALE_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR})
|
||||
set(LIBSWSCALE_LIBRARIES ${SWSCALE_LIB})
|
||||
endif()
|
||||
|
@ -3,37 +3,31 @@
|
||||
# LIBV4L2_FOUND
|
||||
# LIBV4L2_INCLUDE_DIRS
|
||||
# LIBV4L2_LIBRARIES
|
||||
#
|
||||
|
||||
if(LIBV4L2_INCLUDE_DIRS AND LIBV4L2_LIBRARIES)
|
||||
set(LIBV4L2_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_V4L2 QUIET v4l-utils)
|
||||
endif()
|
||||
|
||||
find_path(V4L2_INCLUDE_DIR
|
||||
NAMES libv4l2.h
|
||||
HINTS
|
||||
${_V4L2_INCLUDE_DIRS}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(V4L2_LIB
|
||||
NAMES v4l2
|
||||
HINTS
|
||||
${_V4L2_LIBRARY_DIRS}
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
set(LIBV4L2_INCLUDE_DIRS ${V4L2_INCLUDE_DIR}
|
||||
CACHE PATH "v4l2 include dir")
|
||||
set(LIBV4L2_LIBRARIES "${V4L2_LIB}"
|
||||
CACHE STRING "v4l2 libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibV4L2 DEFAULT_MSG V4L2_LIB
|
||||
V4L2_INCLUDE_DIR)
|
||||
mark_as_advanced(V4L2_INCLUDE_DIR V4L2_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_V4L2 QUIET v4l-utils)
|
||||
endif()
|
||||
|
||||
find_path(V4L2_INCLUDE_DIR
|
||||
NAMES libv4l2.h
|
||||
HINTS
|
||||
${_V4L2_INCLUDE_DIRS}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include)
|
||||
|
||||
find_library(V4L2_LIB
|
||||
NAMES v4l2
|
||||
HINTS
|
||||
${_V4L2_LIBRARY_DIRS}
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibV4L2 DEFAULT_MSG V4L2_LIB V4L2_INCLUDE_DIR)
|
||||
mark_as_advanced(V4L2_INCLUDE_DIR V4L2_LIB)
|
||||
|
||||
if(LIBV4L2_FOUND)
|
||||
set(LIBV4L2_INCLUDE_DIRS ${V4L2_INCLUDE_DIR})
|
||||
set(LIBV4L2_LIBRARIES ${V4L2_LIB})
|
||||
endif()
|
||||
|
@ -7,54 +7,51 @@
|
||||
# For use in OBS:
|
||||
#
|
||||
# X264_INCLUDE_DIR
|
||||
#
|
||||
|
||||
if(LIBX264_INCLUDE_DIRS AND LIBX264_LIBRARIES)
|
||||
set(LIBX264_FOUND TRUE)
|
||||
else()
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_X264 QUIET x264)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(X264_PATH_ARCH x264Path${_lib_suffix})
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(X264_INCLUDE_DIR
|
||||
NAMES x264.h
|
||||
HINTS
|
||||
${_X264_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV x264Path
|
||||
ENV FFmpegPath
|
||||
ENV ${X264_PATH_ARCH}
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(X264_LIB
|
||||
NAMES ${_X264_LIBRARIES} x264 libx264
|
||||
HINTS
|
||||
${_X264_LIBRARY_DIRS}
|
||||
"${X264_INCLUDE_DIR}/../lib"
|
||||
"${X264_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${X264_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${X264_INCLUDE_DIR}/lib"
|
||||
"${X264_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
set(LIBX264_INCLUDE_DIRS ${X264_INCLUDE_DIR} CACHE PATH "x264 include dir")
|
||||
set(LIBX264_LIBRARIES ${X264_LIB} CACHE STRING "x264 libraries")
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libx264 DEFAULT_MSG X264_LIB X264_INCLUDE_DIR)
|
||||
mark_as_advanced(X264_INCLUDE_DIR X264_LIB)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(_X264 QUIET x264)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
set(X264_PATH_ARCH x264Path${_lib_suffix})
|
||||
set(FFMPEG_PATH_ARCH FFmpegPath${_lib_suffix})
|
||||
|
||||
find_path(X264_INCLUDE_DIR
|
||||
NAMES x264.h
|
||||
HINTS
|
||||
${_X264_INCLUDE_DIRS}
|
||||
"${CMAKE_SOURCE_DIR}/additional_install_files/include"
|
||||
"$ENV{obsAdditionalInstallFiles}/include"
|
||||
ENV x264Path
|
||||
ENV FFmpegPath
|
||||
ENV ${X264_PATH_ARCH}
|
||||
ENV ${FFMPEG_PATH_ARCH}
|
||||
PATHS
|
||||
/usr/include /usr/local/include /opt/local/include /sw/include)
|
||||
|
||||
find_library(X264_LIB
|
||||
NAMES ${_X264_LIBRARIES} x264 libx264
|
||||
HINTS
|
||||
${_X264_LIBRARY_DIRS}
|
||||
"${X264_INCLUDE_DIR}/../lib"
|
||||
"${X264_INCLUDE_DIR}/../lib${_lib_suffix}"
|
||||
"${X264_INCLUDE_DIR}/../libs${_lib_suffix}"
|
||||
"${X264_INCLUDE_DIR}/lib"
|
||||
"${X264_INCLUDE_DIR}/lib${_lib_suffix}"
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib /opt/local/lib /sw/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libx264 DEFAULT_MSG X264_LIB X264_INCLUDE_DIR)
|
||||
mark_as_advanced(X264_INCLUDE_DIR X264_LIB)
|
||||
|
||||
if(LIBX264_FOUND)
|
||||
set(LIBX264_INCLUDE_DIRS ${X264_INCLUDE_DIR})
|
||||
set(LIBX264_LIBRARIES ${X264_LIB})
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user