mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
Add a find_package fallback for the *system* libs
This is required, as PortMidi does not have package config available
This commit is contained in:
committed by
Dmitry Vedenko
parent
aae3627476
commit
b25e3b767f
@@ -655,11 +655,21 @@ function( addlib dir name symbol required check )
|
||||
# And add it to our target
|
||||
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
|
||||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||
elseif( ${_OPT}obey_system_dependencies )
|
||||
message( FATAL_ERROR "Failed to find the system package ${name}" )
|
||||
else()
|
||||
set( ${use} "local" )
|
||||
set_property( CACHE ${use} PROPERTY VALUE "local" )
|
||||
find_package( ${packages} QUIET )
|
||||
|
||||
if( TARGET ${TARGET} )
|
||||
set( PKG_${TARGET}_FOUND Yes )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( NOT PKG_${TARGET}_FOUND )
|
||||
if( ${_OPT}obey_system_dependencies )
|
||||
message( FATAL_ERROR "Failed to find the system package ${name}" )
|
||||
else()
|
||||
set( ${use} "local" )
|
||||
set_property( CACHE ${use} PROPERTY VALUE "local" )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user