add link to tutorial and suggest find_simple_library()

This commit is contained in:
Lephenixnoir 2021-01-29 18:31:16 +01:00
parent cac0a9ddbe
commit 6d31401434
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,7 @@ Here's how the files are used:
## The build system
Not a lot to discuss here, this is pretty standard. See the tutorial on Planète Casio (in French) (TODO: link once published) for an introduction to CMake in the context of add-ins. You might be interested in [`configure_file()`](https://cmake.org/cmake/help/latest/command/configure_file.html) and [`install()`](https://cmake.org/cmake/help/latest/command/install.html), which are rarely used in add-ins.
Not a lot to discuss here, this is pretty standard. See the [tutorial on Planète Casio](https://www.planet-casio.com/Fr/forums/topic16647-1-tutoriel-compiler-des-add-ins-avec-cmake-fxsdk.html) (in French) for an introduction to CMake in the context of add-ins. You might be interested in [`configure_file()`](https://cmake.org/cmake/help/latest/command/configure_file.html) and [`install()`](https://cmake.org/cmake/help/latest/command/install.html), which are rarely used in add-ins.
The fxSDK provides two variables to help you install your files:

View File

@ -17,6 +17,13 @@ if(NOT "${EX_PATH}" STREQUAL "libexample.a")
OUTPUT_VARIABLE EX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# The commands above seem common for gint libraries, so the fxSDK provides a
# helper function to get that directly. We simply provide the archive name,
# header file name, macro name, and names for output variables.
# include(FindSimpleLibrary)
# find_simple_library(libexample.a include/example/config.h "EX_VERSION"
# PATH_VAR EX_PATH VERSION_VAR EX_VERSION)
# This CMake utility will handle the version comparisons and other checks. We
# just specify:
# -> Some variables that are defined only if the library is found (so if