Gyorgy Szing | d7360db | 2022-01-14 20:35:53 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2022, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | cmake_minimum_required(VERSION 3.14) |
| 8 | include(../../deployment.cmake REQUIRED) |
| 9 | |
| 10 | #------------------------------------------------------------------------------- |
| 11 | # The CMakeLists.txt for building the newlib deployment for opteesp |
| 12 | # |
| 13 | # Can be used to build the newlib library, which can be used to build SPs. |
| 14 | #------------------------------------------------------------------------------- |
| 15 | include(${TS_ROOT}/environments/opteesp/env.cmake) |
| 16 | |
| 17 | project(newlib C) |
| 18 | |
| 19 | # This is a dummy library not intended to be compiled ever. |
| 20 | add_library(dummy EXCLUDE_FROM_ALL) |
| 21 | set(TGT dummy) |
| 22 | # Build newlib as an external component. |
| 23 | include(${TS_ROOT}/external/newlib/newlib.cmake) |
| 24 | |
| 25 | ######################################## install |
| 26 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 27 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 28 | endif() |
| 29 | |
| 30 | # export the newlib install content from CMAKE_BINARY_DIR. |
| 31 | install(DIRECTORY ${NEWLIB_INSTALL_DIR}/ DESTINATION ${TS_ENV}/newlib) |