Source: opencpn
Version: 1:5.12.4+dfsg-1
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
opencpn fails to cross build from source, because it builds libdnet as
an ExternalProject without forwarding the detected compiler. Therefore,
libdnet is built for the build architecture and linking it goes bad. I'm
attaching a patch that forwards the compiler. Please consider applying
it and also forwarding it upstream. Once applying it, opencpn becomes
cross buildable again.
Helmut
Index: opencpn-5.12.4+dfsg/libs/libdnet/CMakeLists.txt
===================================================================
--- opencpn-5.12.4+dfsg.orig/libs/libdnet/CMakeLists.txt
+++ opencpn-5.12.4+dfsg/libs/libdnet/CMakeLists.txt
@@ -54,6 +54,8 @@ ExternalProject_Add(
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/PatchFile.cmake
CMAKE_ARGS
-G${CMAKE_GENERATOR}
+ -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/libdnet-src/installed
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_INSTALL_INCLUDEDIR=include