cmake hassle
This commit is contained in:
parent
15127c5122
commit
407e4fb474
10 changed files with 115 additions and 110 deletions
35
Externals/FindPortAudio.cmake
vendored
Normal file
35
Externals/FindPortAudio.cmake
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# - Find PortAudio includes and libraries
|
||||
#
|
||||
# PORTAUDIO_FOUND - True if PORTAUDIO_INCLUDE_DIR & PORTAUDIO_LIBRARY
|
||||
# are found
|
||||
# PORTAUDIO_LIBRARIES - Set when PORTAUDIO_LIBRARY is found
|
||||
# PORTAUDIO_INCLUDE_DIRS - Set when PORTAUDIO_INCLUDE_DIR is found
|
||||
#
|
||||
# PORTAUDIO_INCLUDE_DIR - where to find portaudio.h, etc.
|
||||
# PORTAUDIO_LIBRARY - the portaudio library
|
||||
#
|
||||
|
||||
find_path(PORTAUDIO_INCLUDE_DIR
|
||||
NAMES portaudio.h
|
||||
DOC "The PortAudio include directory"
|
||||
)
|
||||
|
||||
find_library(PORTAUDIO_LIBRARY
|
||||
NAMES portaudio
|
||||
DOC "The PortAudio library"
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(PortAudio
|
||||
REQUIRED_VARS PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR
|
||||
)
|
||||
|
||||
# Create an imported target for PortAudio
|
||||
add_library(PortAudio::PortAudio UNKNOWN IMPORTED)
|
||||
set_target_properties(PortAudio::PortAudio PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${PORTAUDIO_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${PORTAUDIO_LIBRARY}"
|
||||
)
|
||||
|
||||
# Provide the information to the user
|
||||
mark_as_advanced(PORTAUDIO_INCLUDE_DIR PORTAUDIO_LIBRARY)
|
||||
Loading…
Add table
Add a link
Reference in a new issue