File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -77,20 +77,23 @@ c_gdnative_ptrs = custom_target(
7777
7878if host_platform.startswith(' linux' )
7979 gdnative_ptrs_rpath = ' $ORIGIN/../../../..'
80+ # LoadedGDExtensionInterface's initialization code uses
81+ # `pythonscript_gdextension_get_proc_address` which provide opaque function pointers,
82+ # which we must then cast to the correct type before using them.
83+ gdnative_ptrs_c_args = [' -Wno-cast-function-type' ]
8084elif host_platform.startswith(' macos' )
8185 gdnative_ptrs_rpath = ' @loader_path/../../../..'
86+ gdnative_ptrs_c_args = [' -Wno-cast-function-type' ]
8287else
8388 gdnative_ptrs_rpath = ''
89+ gdnative_ptrs_c_args = []
8490endif
8591
8692
8793shared_library (
8894 ' gdnative_ptrs' ,
8995 c_gdnative_ptrs,
90- # LoadedGDExtensionInterface's initialization code uses
91- # `pythonscript_gdextension_get_proc_address` which provide opaque function pointers,
92- # which we must then cast to the correct type before using them.
93- c_args : [' -Wno-cast-function-type' ],
96+ c_args : gdnative_ptrs_c_args,
9497 dependencies : [dep_godot, dep_python, dep_pythonscript],
9598 install_rpath : gdnative_ptrs_rpath, # To find libpython
9699 name_prefix : python_native_module_name_prefix,
You can’t perform that action at this time.
0 commit comments