skip to Main Content

Modern CMake Cross Compiling to AArch64 with Sysroots – Ubuntu

Consider the following example project_(CMakeLists.txt): cmake_minimum_required(VERSION 3.1) project(CCL LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) find_package(PkgConfig REQUIRED) find_package(ZLIB) find_package(PNG) find_library(MATH_LIBRARY m) pkg_search_module(OpenEXR OpenEXR) add_executable(main main.cpp) if (MATH_LIBRARY) target_link_libraries(main PUBLIC ${MATH_LIBRARIES}) endif() Main.cpp: #include <iostream> #include <cmath>…

VIEW QUESTION
Back To Top
Search