-
Notifications
You must be signed in to change notification settings - Fork 1
Adding a New Supported Platform
Supporting a new platform will require the creation of a new toolchain or platform specific include file. These files live in the cmake
top level directory.
This file contains platform specific configuration logic such as setting toolchain files or including other platform specific CMake file. This file is automatically included before any project
call is made. Add a new entry here which will
This file is the main hook for configuring static libraries and games to be built for each specific platform. It can be used to set global CMake settings and must define two functions:
This function should perform all platform specific configuration of the framework64 library. This is a good place to set options that all games will inherit as part of their build process.
This function should perform the following tasks:
- Ensure that the asset include directory is set on the framework64 target via
target_include_directories
- Define the
FW64_PLATFORM_IS_64_BIT
if applicable.
This function performs all of the platform specific work to configure the creation of an individual game. In its implementation it should perform a target_link_libraries
call to (at a minimum) the framework64 target. Additional platform specific pre and post build steps should be configured in this function.
This function should ensure that the platform specific main file is compiled into the game.
This function should accept the following Parameters:
Name | Type | Description |
---|---|---|
ALL_WARNINGS_AS_ERRORS | Option | Enables all warnings and treats them as errors |
EXTRA_LIBS | Multi Value | additional libraries to link with the game |
GAME_HEADER_PATH | Single Value | path to the header file which contains the Game struct. If not specified, "game.h" is used |
SAVE_FILE_TYPE | Single Value | The type of save data to use for this game |
SOURCES | Multi Value | All the game specific sources for the game |
TARGET | Single Value | The name of the game to create |
Add a new entry to the array of configurations. In most cases this should be a straightforward copy/paste of other entries
Add a new entry to the "platform" object. In most cases this should be a straightforward copy/paste of other entries, however if there are any platform dependent CMake arguments that need to be passed in, they can be added here.
This directory contains the configuration files for each supported platform. Create a new directory here with the platform name.
Place the .devcontainer.json
file for the platform should live here.
Add the new function for the platform to the scripts/ConfigureEnvironment.js
script. This function should install the devcontainer.json file
into the repo's root directory.
Platform specific files should be placed in a new directory of the pipeline
folder.
Add an entry in this function for your platform which sets the buildInfo.target
property. If it is a 64 bit platform, then add the target to the x64Targets
array.
Add a call to the function defined above here.
Add an entry to the switch statement that loads the top level processing function from the platform specific pipeline files.
Update VS code code folder with new entries for c_cpp_properties.json
and cmake-variants.json