2.3 KiB
GRBC functions
See datatypes.md for data types/structures
[X] grbc_get_config() -> GlobalConfig
Get the config
[X] grbc_want_version(version: String) -> Void
Assure grbc is running on version
[X] grbc_log(message: String) -> Void
Log message
to the console
grbc_is_win32() -> Boolean
Check if we are targeting win32
grbc_is_linux() -> Boolean
Check if we are targeting a Linux system
grbc_get_platform() -> PlatformType
Return the current platform
grbc_is_64bit() -> Boolean
Check if we are targeting a 64bit system
grbc_is_32bit() -> Boolean
Check if we are targeting a 32bit system
[X] grbc_executable(executable_config: ExecutableConfig) -> TargetInfo
Create a new executable and add it to the build list
grbc_library(library_config: LibraryConfig) -> TargetInfo
Create a new library and add it to the build list
[X] grbc_create_package(package_config: PackageConfig) -> Package
Create a new package
[X] grbc_file(file_path: String) -> Path
Used when listing source files, should perform pre-checks on the file and return its path
grbc_file_optional(file_type: OptionalFileType, file_path: String) -> Path
If file_type is true then file_path is returned, otherwise a blank string
grbc_has_ext(extension_name: String) -> Boolean
Check if the given extension is supported
grbc_ext(extension_name: String) -> Void
Load the given extension into the script
[X] grbc_exception(exception_string: String) -> Void
Throw an exception
[X] grbc_set_platform(current_platform: Platform) -> Void
Set the current platform
[X] grbc_load_platform(file_path: String) -> Void
Load a platform config file from file_path
[X] grbc_find_compiler(compiler_name: String) -> String
Find the given executable in the users PATH, and return the full path
[X] grbc_build(generator_id: String) -> Void
Output the final build script, using the given generator. "ninja" is the one provided by default
[X] grbc_object_file(file_path: String) -> String
Convert the given file path to an object file path
[X] grbc_replace_string(string: String, substring: Char, replacement: Char) -> String
Replace substring in string with replacement
[X] grbc_include_dirs_to_cflags(include_dirs: Array) -> String
Generate compiler flags to include the given directories