if (RCARUT STREQUAL "ENABLE") set(appname "openglclustersampleapptest") else()…
- User
if (RCAR_UT STREQUAL "ENABLE") set(app_name "opengl_cluster_sample_app_test") else() set(app_name "opengl_cluster_sample_app") endif()
set(app_version "0.1.3")
cmake_minimum_required(VERSION 3.16.3) project(${app_name})
if(NOT RCAR_UT) # This guard allows to set RCAR_UT externally, e.g. via CMake Commandline during configuration set(RCAR_UT ENABLE DISABLE ) endif()
#check the architecture if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") set(ARCH "x86_64") elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") set(ARCH "aarch64") else() message(FATAL_ERROR "unsupported architecture") endif()
if(ARCH STREQUAL "x86_64" AND NOT(RCAR_SOC STREQUAL "x5h")) set(APP_INC "{CMAKE_CURRENT_SOURCE_DIR}/application/res") set(CONF_DIR "${CMAKE_CURRENT_SOURCE_DIR}/application/conf")
- Assistant
This CMake script defines the build configuration for an application based on the architecture and target system. It checks for the architecture (x86_64 or aarch64) and sets up different configurations and dependencies accordingly.
Here are some key points in the script:
- The script sets up different configurations based on the architecture (x86_64 or aarch64) and the target system (RCAR_SOC). It includes specific libraries and headers for each configuration.
- It includes different source files and headers based on the configuration and sets up different compile definitions and compiler options.
- It sets up linker dependencies and specific link libraries based on the target system and architecture.
- It includes options for configuring doxygen documentation and release notes generation.
- It sets up test configurations and options for running tests with specific arguments and configurations.
- Lastly, it configures the application based on the settings and dependencies provided.
Overall, this script is used to build and configure an OpenGL cluster sample application for different architectures and target systems.