47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
#import "Basic";
|
|
#import "Compiler";
|
|
#import "BuildCpp";
|
|
#import "Check";
|
|
#import "Bindings_Generator";
|
|
#import "File";
|
|
|
|
#run {
|
|
set_build_options_dc(.{do_output=false});
|
|
if !generate_bindings() {
|
|
compiler_set_workspace_status(.FAILED);
|
|
}
|
|
}
|
|
|
|
generate_bindings :: () -> bool {
|
|
output_filename: string;
|
|
opts: Generate_Bindings_Options;
|
|
{
|
|
using opts;
|
|
|
|
//#if OS == .WINDOWS {
|
|
output_filename = "module.jai";
|
|
//} else #if OS == .LINUX {
|
|
// output_filename = "linux.jai";
|
|
//} else #if OS == .MACOS {
|
|
// // @ToDo: Determine dynamically? Customize?
|
|
// array_add(*system_include_paths, "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include");
|
|
// output_filename = "macos.jai";
|
|
//} else {
|
|
// assert(false);
|
|
//}
|
|
|
|
array_add(*libpaths, "lib/x64");
|
|
array_add(*libnames, "fmod");
|
|
array_add(*libnames, "fmodstudio");
|
|
array_add(*system_include_paths, GENERATOR_DEFAULT_SYSTEM_INCLUDE_PATH);
|
|
array_add(*source_files, "inc/fmod.h");
|
|
array_add(*source_files, "inc/fmod_studio.h");
|
|
array_add(*extra_clang_arguments, "-x", "c");
|
|
//strip_flags = 0;
|
|
generate_compile_time_struct_checks = false;
|
|
// strip_flags &= ~(Strip_Flags.CONSTRUCTORS | .DESTRUCTORS);
|
|
}
|
|
|
|
return generate_bindings(opts, output_filename);
|
|
}
|