From 5cb78a997fd580a4f79114fb938c488fb8381894 Mon Sep 17 00:00:00 2001
From: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Date: Wed, 11 Sep 2024 12:14:30 +0200
Subject: Toolchain-Crossbuild32: Hack to build for 32 bit on linux64 and maybe
 others

- Exclude ftdi-eeprom for the crossbuild, as libconfuse requirement is hard to fullfill!
- FindLibUSB.cmake does not search for 32 bit and include and library pathes are hard coded
---
 cmake/Toolchain-Crossbuild32.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/Toolchain-Crossbuild32.cmake b/cmake/Toolchain-Crossbuild32.cmake
index 3c80dd8..d7e5e8e 100644
--- a/cmake/Toolchain-Crossbuild32.cmake
+++ b/cmake/Toolchain-Crossbuild32.cmake
@@ -2,3 +2,6 @@ set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_C_COMPILER gcc -m32)
 set(CMAKE_CXX_COMPILER g++ -m32)
 set(CMAKE_FIND_ROOT_PATH /usr/lib)
+set(LIBUSB_INCLUDE_DIR /usr/include/libusb-1.0/)
+set(LIBUSB_LIBRARIES /usr/lib/libusb-1.0.so)
+#run like "cmake -DFTDI_EEPROM=off -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_TOOLCHAIN_FILE="../cmake/Toolchain-Crossbuild32.cmake" .."
-- 
2.43.0

