minecraft-pi-docker/cmake/base-toolchain.cmake

12 lines
452 B
CMake
Raw Permalink Normal View History

2021-09-14 22:10:32 +00:00
# Setup Toolchain
macro(setup_toolchain target)
# Use ARM Cross-Compiler
set(CMAKE_C_COMPILER "${target}-gcc")
set(CMAKE_CXX_COMPILER "${target}-g++")
2021-09-14 22:10:32 +00:00
set(CMAKE_FIND_ROOT_PATH "/usr/${target}" "/usr/lib/${target}")
# Extra
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
2022-03-11 05:00:13 +00:00
# pkg-config
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/${target}/pkgconfig:/usr/${target}/lib/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig")
2021-09-14 22:10:32 +00:00
endmacro()