File: FindOpenmpt.cmake

package info (click to toggle)
kodi-audiodecoder-openmpt 20.2.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 576 kB
  • sloc: cpp: 187; makefile: 9
file content (25 lines) | stat: -rw-r--r-- 945 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# - Try to find openmpt
# Once done this will define
#
# OPENMPT_FOUND - system has openmpt
# OPENMPT_INCLUDE_DIRS - the openmpt include directory
# OPENMPT_LIBRARIES - The openmpt libraries

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
  pkg_check_modules(PC_OPENMPT libopenmpt QUIET)
endif()

find_path(OPENMPT_INCLUDE_DIRS libopenmpt/libopenmpt.h
                               PATHS ${PC_OPENMPT_INCLUDEDIR})
find_path(OPENMPT_INCLUDE_CONFIG libopenmpt_config.h
                                 PATH_SUFFIXES libopenmpt
                                 PATHS ${PC_OPENMPT_INCLUDEDIR})
list(APPEND OPENMPT_INCLUDE_DIRS ${OPENMPT_INCLUDE_CONFIG})
find_library(OPENMPT_LIBRARIES NAMES openmpt
                               PATHS ${PC_OPENMPT_LIBDIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Openmpt DEFAULT_MSG OPENMPT_INCLUDE_DIRS OPENMPT_LIBRARIES)

mark_as_advanced(OPENMPT_INCLUDE_DIRS OPENMPT_LIBRARIES)