aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
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! ####