mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-16 23:10:13 +00:00
feat: basic OSX .app generation
added default brew link libraries path
This commit is contained in:
parent
2ea414d1d4
commit
ffdcf0fea8
@ -127,8 +127,8 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
add_compile_definitions(SUNSHINE_PLATFORM="macos")
|
||||
list(APPEND SUNSHINE_DEFINITIONS APPS_JSON="apps_mac.json")
|
||||
link_directories(/opt/homebrew/lib/) # Default brew lib location
|
||||
link_directories(/opt/local/lib)
|
||||
link_directories(/usr/local/lib)
|
||||
ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
|
||||
|
||||
find_package(FFmpeg REQUIRED)
|
||||
@ -452,21 +452,35 @@ target_compile_options(sunshine PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${SUNSHINE_COM
|
||||
####
|
||||
|
||||
# Add all assets dependencies
|
||||
install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION ".")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION ".")
|
||||
if(WIN32) # TODO: test
|
||||
install(TARGETS sunshine RUNTIME DESTINATION ".")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION ".")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION ".")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/apps_windows.json" DESTINATION ".")
|
||||
install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/shaders/directx" DESTINATION "shaders")
|
||||
endif()
|
||||
if(APPLE) # TODO: test
|
||||
install(TARGETS sunshine RUNTIME DESTINATION ".")
|
||||
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/apps_mac.json" DESTINATION ".")
|
||||
# TODO: info.plist ??
|
||||
set(prefix "${CMAKE_PROJECT_NAME}.app/Contents")
|
||||
set(INSTALL_RUNTIME_DIR "${prefix}/MacOS")
|
||||
|
||||
install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION "${INSTALL_RUNTIME_DIR}")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION "${INSTALL_RUNTIME_DIR}")
|
||||
|
||||
install(TARGETS sunshine
|
||||
BUNDLE DESTINATION . COMPONENT Runtime
|
||||
RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT Runtime)
|
||||
|
||||
# TODO: bundle doesn't produce a valid .app use cpack -G DragNDrop
|
||||
# set(CPACK_BUNDLE_NAME "Sunshine")
|
||||
# set(CPACK_BUNDLE_PLIST "${SUNSHINE_ASSETS_DIR}/info.plist")
|
||||
# set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/sunshine.icns")
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(DIRECTORY "${SUNSHINE_ASSETS_DIR}/web" DESTINATION ".")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/sunshine.conf" DESTINATION ".")
|
||||
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/apps_linux.json" DESTINATION ".")
|
||||
install(FILES "${SUNSHINE_ASSETS_DIR}/85-sunshine-rules.rules" DESTINATION "/etc/udev/rules.d")
|
||||
install(TARGETS sunshine RUNTIME DESTINATION "/usr/bin")
|
||||
@ -499,10 +513,8 @@ set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${VERSION}_${CPACK_DEBIAN_PAC
|
||||
set(CPACK_STRIP_FILES YES)
|
||||
|
||||
# Installation destination dir
|
||||
if(NOT WIN32)
|
||||
set(CPACK_SET_DESTDIR true)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(CPACK_SET_DESTDIR true)
|
||||
set(CMAKE_INSTALL_PREFIX "/etc/sunshine")
|
||||
endif()
|
||||
|
||||
|
BIN
sunshine.icns
Normal file
BIN
sunshine.icns
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user