Warning, /multimedia/kid3/src/plugins/acoustidimport/cmake/modules/FindChromaprint.cmake is written in an unsupported language. File is not indexed.

0001 # Redistribution and use is allowed according to the terms of the BSD license.
0002 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0003 include(FindPackageHandleStandardArgs)
0004 find_package(PkgConfig)
0005 pkg_check_modules(PKG_LIBCHROMAPRINT libchromaprint)
0006 
0007 find_path(CHROMAPRINT_INCLUDE_DIR chromaprint.h
0008   ${PKG_LIBCHROMAPRINT_INCLUDE_DIRS}
0009   /usr/include
0010   /usr/local/include)
0011 
0012 find_library(CHROMAPRINT_LIBRARIES
0013   NAMES chromaprint chromaprint.dll
0014   PATHS ${PKG_LIBCHROMAPRINT_LIBRARY_DIRS}
0015         /usr/lib
0016         /usr/local/lib)
0017 
0018 find_package_handle_standard_args(Chromaprint DEFAULT_MSG CHROMAPRINT_LIBRARIES CHROMAPRINT_INCLUDE_DIR)
0019 
0020 if(CHROMAPRINT_FOUND)
0021   if(NOT TARGET Chromaprint::Chromaprint)
0022     if(WIN32)
0023       set(CHROMAPRINT_COMPILE_DEFINITIONS CHROMAPRINT_NODLL)
0024     endif()
0025     add_library(Chromaprint::Chromaprint UNKNOWN IMPORTED)
0026     set_target_properties(Chromaprint::Chromaprint PROPERTIES
0027       IMPORTED_LOCATION "${CHROMAPRINT_LIBRARIES}"
0028       INTERFACE_INCLUDE_DIRECTORIES "${CHROMAPRINT_INCLUDE_DIR}"
0029       INTERFACE_COMPILE_DEFINITIONS "${CHROMAPRINT_COMPILE_DEFINITIONS}"
0030       INTERFACE_COMPILE_OPTIONS "${CHROMAPRINT_CFLAGS}"
0031     )
0032   endif()
0033 endif()