refactor swift shim

This commit is contained in:
a_dinosaur committed 2024-08-04 19:18:30 +10:00
1 parent a546bf5772
commit 09c39b59be
10 files changed
+16 -16

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
find_library(SDL3 SDL3 REQUIRED)
add_library(SDLSwift INTERFACE)
set_property(TARGET SDLSwift PROPERTY Swift_MODULE_NAME "SDL3")
target_compile_options(SDLSwift INTERFACE "$<$<COMPILE_LANGUAGE:Swift>:-cxx-interoperability-mode=default>")
target_include_directories(SDLSwift INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries(SDLSwift INTERFACE ${SDL3})
+3
View File
@@ -0,0 +1,3 @@
module SDL3 {
header "shim.h"
}
+3
View File
@@ -0,0 +1,3 @@
#pragma once
#include <SDL3/SDL.h>