package/fbterm: fix download site
[buildroot-gz.git] / support / misc / toolchainfile.cmake.in
blob649b52d72ae5467245fb0d2a0331e6896efcf046
2 # Automatically generated file; DO NOT EDIT.
3 # CMake toolchain file for Buildroot
6 # In order to allow the toolchain to be relocated, we calculate the
7 # HOST_DIR based on this file's location: $(HOST_DIR)/usr/share/buildroot
8 # and store it in RELOCATED_HOST_DIR.
9 # All the other variables that need to refer to HOST_DIR will use the
10 # RELOCATED_HOST_DIR variable.
11 string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
13 set(CMAKE_SYSTEM_NAME Linux)
14 set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@)
16 set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS")
17 set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS")
18 set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")
19 set(CMAKE_INSTALL_SO_NO_EXE 0)
21 set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
22 set(CMAKE_SYSROOT "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
23 set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
24 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
25 set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
26 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
27 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
28 set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
30 # This toolchain file can be used both inside and outside Buildroot.
31 set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@")
32 set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@")
33 if(@@TOOLCHAIN_HAS_FORTRAN@@)
34   set(CMAKE_Fortran_FLAGS "@@TARGET_FCFLAGS@@ ${CMAKE_Fortran_FLAGS}" CACHE STRING "Buildroot FCFLAGS")
35   set(CMAKE_Fortran_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_FC@@")
36 endif()