Files
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

105 lines
2.4 KiB
CMake

# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# FindArmral
# -------
#
# Finds the armral library.
# the version is currently hardcoded to 25.01
#
# Optional options
# ^^^^^^^^^^^^^^^^
#
# ``armral_LOCATION``
# The location of the library.
#
# Imported Targets
# ^^^^^^^^^^^^^^^^
#
# This module provides the following imported targets, if found:
#
# ``armral``
# The armral library
#
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# This will define the following variables:
#
# ``armral_FOUND``
# True if the system has the armral library.
# ``armral_VERSION``
# The version of the armral library which was found.
# ``armral_INCLUDE_DIRS``
# Include directories needed to use armral.
# ``armral_LIBRARIES``
# Libraries needed to link to armral.
#
# Cache Variables
# ^^^^^^^^^^^^^^^
#
# The following cache variables may also be set:
#
# ``armral_INCLUDE_DIR``
# The directory containing ``armral.h``.
# ``armral_LIBRARY``
# The path to the armral library.
option(armral_LOCATION "directory of ArmRAL library" "")
if (NOT armral_LOCATION)
set(armral_LOCATION "/usr/local")
endif()
if (NOT EXISTS ${armral_LOCATION})
message(FATAL_ERROR "no such directory: ${armral_LOCATION}")
endif()
find_path(armral_INCLUDE_DIR
NAMES
armral.h
HINTS ${armral_LOCATION}
PATH_SUFFIXES include
NO_DEFAULT_PATH
)
if (NOT armral_INCLUDE_DIR)
message(FATAL_ERROR "could not detect armral header at ${armral_LOCATION}/include")
endif()
find_library(armral_LIBRARY
NAMES armral
HINTS ${armral_LOCATION}
PATH_SUFFIXES lib build
NO_DEFAULT_PATH
)
if (NOT armral_LIBRARY)
message(FATAL_ERROR "could not detect armral build artifacts at neither ${armral_LOCATION}/lib nor ${armral_LOCATION}/build")
endif()
# No way to retrieve the version from header or library
set(armral_VERSION 25.01)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(armral
FOUND_VAR armral_FOUND
REQUIRED_VARS
armral_LIBRARY
armral_INCLUDE_DIR
VERSION_VAR armral_VERSION
)
if(armral_FOUND)
set(armral_LIBRARIES ${armral_LIBRARY})
set(armral_INCLUDE_DIRS ${armral_INCLUDE_DIR})
endif()
if(armral_FOUND AND NOT TARGET armral)
add_library(armral UNKNOWN IMPORTED)
set_target_properties(armral PROPERTIES
IMPORTED_LOCATION "${armral_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${armral_INCLUDE_DIRS}"
)
endif()
mark_as_advanced(
armral_INCLUDE_DIR
armral_LIBRARY
)