-
Notifications
You must be signed in to change notification settings - Fork 163
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:
- Submit a pull request to the scp-prebuilt repository with the new libraries
- 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 inlib/prebuilt.cmake
as the value forPREBUILT_VERSION_NAME
. - 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 thelib
folder which will return the path to the correct libraries. You can use that withfind_library
to find the library. - 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.