Skip to content

Prebuilt library handling

m!m edited this page Oct 2, 2016 · 1 revision

If you want to include a prebuilt library you have to do this via the scp-prebuilt repository. That contains the libraries we currently use for the various platforms and automatically creates zip packages when a new version of a library is pushed. The CMake setup of FSO then downloads these packages and uses them in the build. In order to include a new prebuilt library you have to follow a few steps:

  1. Submit a pull request to the scp-prebuilt repository with the new libraries
  2. Once merged, determine the name of the package. The packages are uploaded to the build-deps repository on BinTray. Copy the name of the latest version (e.g. 0b6ed006c234395f40008f4cdeb30a6e6571d08c and use that version in lib/prebuilt.cmake as the value for PREBUILT_VERSION_NAME.
  3. Your libraries are now automatically downloaded the next time you configure with CMake. You can now add CMake rules for finding the libraries. The function get_prebuilt_path is available in the lib folder which will return the path to the correct libraries. You can use that with find_library to find the library.
  4. Done! Your libraries are now included. If they are dynamically linked, make sure that you use add_target_copy_files to copy the files to the binary when the compilation is done and to setup install rules so that they are included in nightly and release builds.