aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorKenneth Chew <kenneth.c0@protonmail.com>2022-05-15 13:56:58 -0400
committerKenneth Chew <kenneth.c0@protonmail.com>2022-05-19 15:16:37 -0400
commit92b913ca3740ea1aa799a69d65dc13d0c3612b87 (patch)
tree1d81e20612ca0663e306900a378074690aed3c13 /launcher
parent3806f23b02a4b5c1d3dc7f6a8e84ff2ebee06cd7 (diff)
downloadPrismLauncher-92b913ca3740ea1aa799a69d65dc13d0c3612b87.tar.gz
PrismLauncher-92b913ca3740ea1aa799a69d65dc13d0c3612b87.tar.bz2
PrismLauncher-92b913ca3740ea1aa799a69d65dc13d0c3612b87.zip
Add Sparkle Updater framework to macOS build
Diffstat (limited to 'launcher')
-rw-r--r--launcher/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 8e75be20..87ce3b68 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -501,7 +501,7 @@ set(API_SOURCES
modplatform/flame/FlameAPI.h
modplatform/modrinth/ModrinthAPI.h
-
+
modplatform/helpers/NetworkModAPI.h
modplatform/helpers/NetworkModAPI.cpp
)
@@ -984,6 +984,22 @@ target_link_libraries(Launcher_logic
LocalPeer
Launcher_rainbow
)
+if(APPLE)
+ set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks/")
+
+ file(DOWNLOAD ${MACOSX_SPARKLE_DOWNLOAD_URL} ${CMAKE_BINARY_DIR}/Sparkle.tar.xz EXPECTED_HASH SHA256=${MACOSX_SPARKLE_SHA256})
+ file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/Sparkle.tar.xz DESTINATION ${CMAKE_BINARY_DIR}/frameworks/Sparkle)
+
+ find_library(SPARKLE_FRAMEWORK Sparkle "${CMAKE_BINARY_DIR}/frameworks/Sparkle")
+ target_link_libraries(Launcher_logic
+ "-framework AppKit"
+ "-framework Carbon"
+ "-framework Foundation"
+ "-framework ApplicationServices"
+ )
+ target_link_libraries(Launcher_logic ${SPARKLE_FRAMEWORK})
+endif()
target_link_libraries(Launcher_logic)
@@ -1006,6 +1022,7 @@ install(TARGETS ${Launcher_Name}
BUNDLE DESTINATION "." COMPONENT Runtime
LIBRARY DESTINATION ${LIBRARY_DEST_DIR} COMPONENT Runtime
RUNTIME DESTINATION ${BINARY_DEST_DIR} COMPONENT Runtime
+ FRAMEWORK DESTINATION ${FRAMEWORK_DEST_DIR} COMPONENT Runtime
)
#### The bundle mess! ####