meta: build system for fxSDK 2.9 with sysroot

This commit is contained in:
Lephenixnoir 2022-08-20 11:48:42 +02:00
parent 1d8851cbf5
commit 5ccd674795
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
3 changed files with 8 additions and 14 deletions

View File

@ -74,17 +74,10 @@ if(AZUR_PLATFORM STREQUAL gint)
find_package(LibProf 2.4 REQUIRED)
link_libraries(LibProf::LibProf Gint::Gint)
# Default to the fxSDK install path
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${FXSDK_COMPILER_INSTALL}" CACHE PATH "..." FORCE)
endif()
# The fxSDK install path has a slightly different structure
if(CMAKE_INSTALL_PREFIX STREQUAL "${FXSDK_COMPILER_INSTALL}")
set(LIBDIR ".")
set(INCDIR "include")
set(MODPATH "${FXSDK_CMAKE_MODULE_PATH}")
endif()
# Install in the fxSDK sysroot
set(LIBDIR "${FXSDK_LIB}")
set(INCDIR "${FXSDK_INCLUDE}")
set(MODPATH "${FXSDK_CMAKE_MODULE_PATH}")
endif()
if(AZUR_PLATFORM STREQUAL linux)

View File

@ -4,9 +4,9 @@ set(AZUR_PATH "$ENV{AZUR_PATH_${AZUR_PLATFORM}}")
if(NOT "${FXSDK_PLATFORM_LONG}" STREQUAL "")
set(AZUR_PLATFORM gint)
set(AZUR_PATH "${FXSDK_COMPILER_INSTALL}")
set(AZUR_PATH "${FXSDK_LIB}")
set(AZUR_LIB "${AZUR_PATH}/libazur_${AZUR_PLATFORM}.a")
set(AZUR_INCLUDE "${AZUR_PATH}/include")
set(AZUR_INCLUDE "${FXSDK_INCLUDE}")
message("(Azur) Using the fxSDK compiler path: ${AZUR_LIB}")
message("(Azur) Will take includes from: ${AZUR_INCLUDE}")
@ -52,6 +52,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)
message("(Azur) Library version found in header: ${AZUR_VERSION}")
# TODO: ${AZUR_PATH}/lib will not work with the fxSDK sysroot
set(AZUR_3RDPARTY "")
set(AZUR_LIB_GL3W "${AZUR_PATH}/lib/libazur_${AZUR_PLATFORM}_gl3w.a")
set(AZUR_LIB_IMGUI "${AZUR_PATH}/lib/libazur_${AZUR_PLATFORM}_imgui.a")

View File

@ -33,7 +33,7 @@ You *must* install into a different folder for each platform, as the headers wou
**Building for fx-CG**
Use the [fxSDK toolchain](https://gitea.planet-casio.com/Lephenixnoir/fxsdk). When building with the fxSDK, `AZUR_PLATFORM=gint` is assumed and the compiler's data folder is used to install the library.
Use the [fxSDK toolchain](https://gitea.planet-casio.com/Lephenixnoir/fxsdk). When building with the fxSDK, `AZUR_PLATFORM=gint` is assumed and the fxSDK sysroot is used to install the library.
```
% fxsdk build-cg install