mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
Fix including and linking Velopack on macOS when it isn't being used
This commit is contained in:
+31
-32
@@ -7,7 +7,7 @@ include_guard()
|
||||
# USE_VELOPACK controls whether to use Velopack for installer packaging (instead of NSIS/DMG)
|
||||
option(USE_VELOPACK "Use Velopack for installer packaging" OFF)
|
||||
|
||||
if (USE_VELOPACK)
|
||||
if (USE_VELOPACK) # <FS:TJ/> Only include and link Velopack if it is being used
|
||||
if (WINDOWS)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(velopack)
|
||||
@@ -35,36 +35,35 @@ if (USE_VELOPACK)
|
||||
ntdll
|
||||
)
|
||||
|
||||
target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1)
|
||||
|
||||
elseif (DARWIN)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(velopack)
|
||||
|
||||
add_library(ll::velopack INTERFACE IMPORTED)
|
||||
|
||||
target_include_directories(ll::velopack SYSTEM INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/include/velopack
|
||||
)
|
||||
|
||||
target_link_libraries(ll::velopack INTERFACE
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libvelopack_libc.a
|
||||
)
|
||||
|
||||
# macOS system frameworks required by Velopack (Rust static library dependencies)
|
||||
target_link_libraries(ll::velopack INTERFACE
|
||||
"-framework Foundation"
|
||||
"-framework Security"
|
||||
"-framework SystemConfiguration"
|
||||
"-framework AppKit"
|
||||
"-framework CoreFoundation"
|
||||
"-framework CoreServices"
|
||||
"-framework IOKit"
|
||||
"-liconv"
|
||||
"-lresolv"
|
||||
)
|
||||
|
||||
target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1)
|
||||
endif()
|
||||
|
||||
elseif (DARWIN)
|
||||
include(Prebuilt)
|
||||
use_prebuilt_binary(velopack)
|
||||
|
||||
add_library(ll::velopack INTERFACE IMPORTED)
|
||||
|
||||
target_include_directories(ll::velopack SYSTEM INTERFACE
|
||||
${LIBS_PREBUILT_DIR}/include/velopack
|
||||
)
|
||||
|
||||
target_link_libraries(ll::velopack INTERFACE
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/libvelopack_libc.a
|
||||
)
|
||||
|
||||
# macOS system frameworks required by Velopack (Rust static library dependencies)
|
||||
target_link_libraries(ll::velopack INTERFACE
|
||||
"-framework Foundation"
|
||||
"-framework Security"
|
||||
"-framework SystemConfiguration"
|
||||
"-framework AppKit"
|
||||
"-framework CoreFoundation"
|
||||
"-framework CoreServices"
|
||||
"-framework IOKit"
|
||||
"-liconv"
|
||||
"-lresolv"
|
||||
)
|
||||
|
||||
target_compile_definitions(ll::velopack INTERFACE LL_VELOPACK=1)
|
||||
|
||||
endif()
|
||||
endif() # <FS:TJ/> Only include and link Velopack if it is being used
|
||||
|
||||
Reference in New Issue
Block a user