mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +00:00
29 lines
961 B
CMake
29 lines
961 B
CMake
find_package(PkgConfig)
|
|
|
|
if(PkgConfig_FOUND)
|
|
pkg_check_modules(PC_ZBAR QUIET zbar)
|
|
if(PC_ZBAR_FOUND)
|
|
set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
|
|
find_library(ZBAR_LIBRARIES NAMES zbar HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS})
|
|
find_path(ZBAR_INCLUDE_DIR Decoder.h HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS})
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT ZBAR_LIBRARIES AND ANDROID)
|
|
find_library(ZBARJNI_LIBRARY NAMES zbarjni)
|
|
find_library(ICONV_LIBRARY NAMES iconv)
|
|
if(ZBARJNI_LIBRARY AND ICONV_LIBRARY)
|
|
set(ZBAR_LIBRARIES ${ZBARJNI_LIBRARY} ${ICONV_LIBRARY})
|
|
endif()
|
|
endif()
|
|
|
|
if(NOT ZBAR_INCLUDE_DIR)
|
|
find_path(ZBAR_H_PATH zbar.h)
|
|
if(ZBAR_H_PATH)
|
|
set(ZBAR_INCLUDE_DIR "${ZBAR_H_PATH}")
|
|
endif()
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
|
|
message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}")
|