Aegisub/cmake/Finduchardet.cmake

21 lines
539 B
CMake
Raw Normal View History

2019-09-10 06:15:40 +02:00
find_package(PkgConfig QUIET)
pkg_check_modules(PC_uchardet QUIET uchardet)
find_path(uchardet_INCLUDE_DIRS
NAMES uchardet/uchardet.h
2019-09-10 06:15:40 +02:00
HINTS ${PC_uchardet_INCLUDE_DIRS}
)
find_library(uchardet_LIBRARIES
NAMES uchardet
2019-09-10 06:15:40 +02:00
PATH_SUFFIXES build/src
HINTS ${PC_uchardet_LIBRARY_DIRS}
)
set(uchardet_VERSION ${PC_uchardet_VERSION})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(uchardet
FOUND_VAR uchardet_FOUND
REQUIRED_VARS
uchardet_LIBRARIES
uchardet_INCLUDE_DIRS
VERSION_VAR uchardet_VERSION
2019-09-10 06:15:40 +02:00
)