Commit 99d251b2 authored by Robert Schmidt's avatar Robert Schmidt Committed by Rúben Soares Silva

Correct pkg-config include path when cross-compiling

Prior to this commit, the include path for some libraries found through
pkg-config when cross compiling is not correct:

    $ grep include CMakeCache.txt
    blas_INCLUDEDIR:INTERNAL=/usr/include/x86_64-linux-gnu
    ...

This is because we did not tell pkg-config to search in the right path.
Since for cross-compilation, we install packages in parallel in the
system, override the primary directory where the .pc files located, in
the cross-compilation toolchain file for cmake.

Closes: #746
parent 57cccd63
......@@ -4,6 +4,8 @@ set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-11)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11)
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/aarch64-linux-gnu/pkgconfig")
set(CROSS_COMPILE 1)
set(bnProc_gen_128_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build)
set(bnProc_gen_avx2_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment