mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 20:37:24 +02:00
apple: add exports file
This commit is contained in:
committed by
Anonymous Maarten
parent
364c8037f4
commit
085447a56e
@@ -4055,6 +4055,10 @@ if(SDL_SHARED)
|
||||
MACHO_COMPATIBILITY_VERSION "${SDL_DYLIB_COMPAT_VERSION}"
|
||||
MACHO_CURRENT_VERSION "${SDL_DYLIB_CURRENT_VERSION}"
|
||||
)
|
||||
set_property(TARGET SDL3-shared APPEND PROPERTY LINK_DEPENDS
|
||||
"${PROJECT_SOURCE_DIR}/src/dynapi/SDL_dynapi.exports")
|
||||
target_link_options(SDL3-shared PRIVATE
|
||||
"SHELL:-Wl,-exported_symbols_list,${PROJECT_SOURCE_DIR}/src/dynapi/SDL_dynapi.exports")
|
||||
if(SDL_FRAMEWORK)
|
||||
set_target_properties(SDL3-shared PROPERTIES
|
||||
PUBLIC_HEADER "${SDL3_INCLUDE_FILES}"
|
||||
|
||||
@@ -3243,6 +3243,7 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
EXPORTED_SYMBOLS_FILE = "$(SRCROOT)/../../src/dynapi/SDL_dynapi.exports";
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
};
|
||||
@@ -3308,6 +3309,7 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = GLES_SILENCE_DEPRECATION;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
EXPORTED_SYMBOLS_FILE = "$(SRCROOT)/../../src/dynapi/SDL_dynapi.exports";
|
||||
OTHER_LDFLAGS = "-liconv";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
};
|
||||
|
||||
1287
src/dynapi/SDL_dynapi.exports
Normal file
1287
src/dynapi/SDL_dynapi.exports
Normal file
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,7 @@ SDL_ROOT = Path(__file__).resolve().parents[2]
|
||||
SDL_INCLUDE_DIR = SDL_ROOT / "include/SDL3"
|
||||
SDL_DYNAPI_PROCS_H = SDL_ROOT / "src/dynapi/SDL_dynapi_procs.h"
|
||||
SDL_DYNAPI_OVERRIDES_H = SDL_ROOT / "src/dynapi/SDL_dynapi_overrides.h"
|
||||
SDL_DYNAPI_EXPORTS = SDL_ROOT / "src/dynapi/SDL_dynapi.exports"
|
||||
SDL_DYNAPI_SYM = SDL_ROOT / "src/dynapi/SDL_dynapi.sym"
|
||||
|
||||
RE_EXTERN_C = re.compile(r'.*extern[ "]*C[ "].*')
|
||||
@@ -493,9 +494,15 @@ def add_dyn_api(proc: SdlProcedure) -> None:
|
||||
#
|
||||
# Add at last
|
||||
# "#define SDL_DelayNS SDL_DelayNS_REAL
|
||||
f = open(SDL_DYNAPI_OVERRIDES_H, "a", newline="")
|
||||
f.write(f"#define {proc.name} {proc.name}_REAL\n")
|
||||
f.close()
|
||||
with open(SDL_DYNAPI_OVERRIDES_H, "a", newline="") as f:
|
||||
f.write(f"#define {proc.name} {proc.name}_REAL\n")
|
||||
|
||||
# File: SDL_dynapi.exports
|
||||
#
|
||||
# Append to end
|
||||
# "_SDL_DelayNS"
|
||||
with open(SDL_DYNAPI_EXPORTS, "a", newline="") as f:
|
||||
f.write(f"_{proc.name}\n")
|
||||
|
||||
# File: SDL_dynapi.sym
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user