Julian Hall | 07679f2 | 2020-11-23 17:45:16 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # Environment file for shared library deployments to linux-pc. |
| 10 | #------------------------------------------------------------------------------- |
| 11 | set(TS_ENV "arm-linux" CACHE STRING "Environment identifier") |
| 12 | |
| 13 | if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") |
| 14 | message(FATAL_ERROR "Building shared libraries is not yet working on Windows. Sorry!") |
| 15 | endif() |
| 16 | |
| 17 | include(${CMAKE_CURRENT_LIST_DIR}/link_options.cmake) |
| 18 | |
| 19 | # Default to using the base toolcahin file for the enviroment |
| 20 | set(TS_BASE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/default_toolchain_file.cmake" CACHE STRING "Base toolchainfile") |
| 21 | |
| 22 | # Replicate in environment variable for access from child cmake contexts |
| 23 | set(ENV{TS_BASE_TOOLCHAIN_FILE} "${TS_BASE_TOOLCHAIN_FILE}") |
| 24 | |
| 25 | # Set toolchain files to use |
| 26 | set(CMAKE_TOOLCHAIN_FILE "${TS_ROOT}/tools/cmake/compiler/shared_lib_toolchain_file.cmake" CACHE STRING "Toolchain file") |
| 27 | set(TS_EXTERNAL_LIB_TOOLCHAIN_FILE "${TS_ROOT}/tools/cmake/compiler/static_lib_toolchain_file.cmake" CACHE STRING "External lib Toolchain file") |