2023-09-05 00:16:30 +00:00
|
|
|
# macos specific compile definitions
|
|
|
|
|
|
|
|
add_compile_definitions(SUNSHINE_PLATFORM="macos")
|
|
|
|
|
2024-05-13 14:53:15 +00:00
|
|
|
set(MACOS_LINK_DIRECTORIES
|
|
|
|
/opt/homebrew/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/usr/local/lib)
|
|
|
|
|
|
|
|
foreach(dir ${MACOS_LINK_DIRECTORIES})
|
|
|
|
if(EXISTS ${dir})
|
|
|
|
link_directories(${dir})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
2024-06-14 21:37:46 +00:00
|
|
|
if(NOT BOOST_USE_STATIC AND NOT FETCH_CONTENT_BOOST_USED)
|
|
|
|
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
|
|
|
endif()
|
2023-09-05 00:16:30 +00:00
|
|
|
|
|
|
|
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
2024-04-22 18:16:26 +00:00
|
|
|
${APP_KIT_LIBRARY}
|
2023-09-05 00:16:30 +00:00
|
|
|
${APP_SERVICES_LIBRARY}
|
|
|
|
${AV_FOUNDATION_LIBRARY}
|
|
|
|
${CORE_MEDIA_LIBRARY}
|
|
|
|
${CORE_VIDEO_LIBRARY}
|
2024-04-22 18:16:26 +00:00
|
|
|
${FOUNDATION_LIBRARY}
|
|
|
|
${VIDEO_TOOLBOX_LIBRARY})
|
2023-09-05 00:16:30 +00:00
|
|
|
|
2024-02-03 20:29:09 +00:00
|
|
|
set(APPLE_PLIST_FILE "${SUNSHINE_SOURCE_ASSETS_DIR}/macos/assets/Info.plist")
|
2023-09-05 00:16:30 +00:00
|
|
|
|
|
|
|
# todo - tray is not working on macos
|
|
|
|
set(SUNSHINE_TRAY 0)
|
|
|
|
|
|
|
|
set(PLATFORM_TARGET_FILES
|
2024-02-03 20:29:09 +00:00
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.h"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_audio.m"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_img_t.h"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.h"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/av_video.m"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/display.mm"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/input.cpp"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/microphone.mm"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.mm"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/misc.h"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.cpp"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/nv12_zero_device.h"
|
|
|
|
"${CMAKE_SOURCE_DIR}/src/platform/macos/publish.cpp"
|
|
|
|
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.c"
|
|
|
|
"${CMAKE_SOURCE_DIR}/third-party/TPCircularBuffer/TPCircularBuffer.h"
|
2023-09-05 00:16:30 +00:00
|
|
|
${APPLE_PLIST_FILE})
|
|
|
|
|
|
|
|
if(SUNSHINE_ENABLE_TRAY)
|
|
|
|
list(APPEND SUNSHINE_EXTERNAL_LIBRARIES
|
|
|
|
${COCOA})
|
|
|
|
list(APPEND PLATFORM_TARGET_FILES
|
2024-05-14 01:59:25 +00:00
|
|
|
"${CMAKE_SOURCE_DIR}/third-party/tray/src/tray_darwin.m")
|
2023-09-05 00:16:30 +00:00
|
|
|
endif()
|