mirror of
https://github.com/encounter/nod.git
synced 2026-07-10 12:18:48 -07:00
Restore CRATE_TYPES staticlib for embedded Apple platforms
BUILD_SHARED_LIBS=OFF only changes which variant Corrosion's interface target links, but Corrosion still builds both crate types and tries to copy the cdylib output. CRATE_TYPES staticlib is the correct way to prevent building cdylib on platforms that don't support dynamic libraries.
This commit is contained in:
@@ -41,6 +41,10 @@ set(NOD_IMPORT_ARGS NO_DEFAULT_FEATURES)
|
||||
if (NOD_FEATURES)
|
||||
list(APPEND NOD_IMPORT_ARGS FEATURES ${NOD_FEATURES})
|
||||
endif()
|
||||
# Embedded Apple platforms don't support dynamic libraries
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "^(iOS|tvOS|watchOS|visionOS)$")
|
||||
list(APPEND NOD_IMPORT_ARGS CRATE_TYPES staticlib)
|
||||
endif()
|
||||
# Import the nod-ffi crate using Corrosion.
|
||||
corrosion_import_crate(
|
||||
MANIFEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/nod-ffi/Cargo.toml"
|
||||
|
||||
Reference in New Issue
Block a user