mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-17 08:09:50 +00:00
17 lines
619 B
CMake
17 lines
619 B
CMake
# macos specific macros
|
|
|
|
# ADD_FRAMEWORK: args = `fwname`, `appname`
|
|
macro(ADD_FRAMEWORK fwname appname)
|
|
find_library(FRAMEWORK_${fwname}
|
|
NAMES ${fwname}
|
|
PATHS ${CMAKE_OSX_SYSROOT}/System/Library
|
|
PATH_SUFFIXES Frameworks
|
|
NO_DEFAULT_PATH)
|
|
if( ${FRAMEWORK_${fwname}} STREQUAL FRAMEWORK_${fwname}-NOTFOUND)
|
|
MESSAGE(ERROR ": Framework ${fwname} not found")
|
|
else()
|
|
TARGET_LINK_LIBRARIES(${appname} "${FRAMEWORK_${fwname}}/${fwname}")
|
|
MESSAGE(STATUS "Framework ${fwname} found at ${FRAMEWORK_${fwname}}")
|
|
endif()
|
|
endmacro(ADD_FRAMEWORK)
|