]> git.tdb.fi Git - ext/openal.git/blob - cmake/FindOboe.cmake
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / cmake / FindOboe.cmake
1 # - Find Oboe
2 # Find the Oboe library
3 #
4 # This module defines the following variable:
5 #   OBOE_FOUND - True if Oboe was found
6 #
7 # This module defines the following target:
8 #   oboe::oboe - Import target for linking Oboe to a project
9 #
10
11 find_path(OBOE_INCLUDE_DIR NAMES oboe/Oboe.h
12     DOC "The Oboe include directory"
13 )
14
15 find_library(OBOE_LIBRARY NAMES oboe
16     DOC "The Oboe library"
17 )
18
19 # handle the QUIETLY and REQUIRED arguments and set OBOE_FOUND to TRUE if
20 # all listed variables are TRUE
21 include(FindPackageHandleStandardArgs)
22 find_package_handle_standard_args(Oboe REQUIRED_VARS OBOE_LIBRARY OBOE_INCLUDE_DIR)
23
24 if(OBOE_FOUND)
25     add_library(oboe::oboe UNKNOWN IMPORTED)
26     set_target_properties(oboe::oboe PROPERTIES
27         IMPORTED_LOCATION ${OBOE_LIBRARY}
28         INTERFACE_INCLUDE_DIRECTORIES ${OBOE_INCLUDE_DIR})
29 endif()
30
31 mark_as_advanced(OBOE_INCLUDE_DIR OBOE_LIBRARY)