Could not find Boost

#33 · closed · 5 comments

View on GitHub ↗

xgdgsc

I'm trying arm64 build of syncthingtray after installing boost with vcpkg and adding ```cmake include_directories("C:/Users/ASUS/Documents/Github/vcpkg/installed/arm64-windows/include") link_directories("C:/Users/ASUS/Documents/Github/vcpkg/installed/arm64-windows/lib") # find required 3rd party libraries ``` I still get ![image](https://github.com/user-attachments/assets/6ce014fd-b326-4363-bffb-69891f60368a) Any tips?

Comments

xgdgsc

Figured out with list(APPEND CMAKE_PREFIX_PATH

Martchus

Note that I recommend using MSYS2 in the README for a reason. Unless you want to cross-compile this is probably the way to go - also when targeting aarch64. Note that `USE_ICONV=OFF` has only been introduced recently for the sake of reducing dependencies for Android builds. I haven't tested that at all for Windows builds so don't be surprised if that fails. I'm currently setting up a cross-toolchain to build for aarch64-w64-mingw32 on GNU/Linux. When I'm done with that it would be helpful if you could test my builds (as I don't have aarch64 hardware and would only test it via WINE myself).

Martchus

Oh, and you probably don't want to modify my code to add `list(APPEND CMAKE_PREFIX_PATH …` somewhere. You can simply specify additional prefixes via CLI arguments, e.g. `-DCMAKE_PREFIX_PATH=…`. You can also take my CMakePresets as inspiration, e.g. have a look at: https://github.com/Martchus/cpp-utilities/blob/6c5c6ea7683d16cc6be9c19cf16a78bb9f074768/CMakePresets.json#L466. If you can come up with an additional CMakePreset that is generic enough to be generally useful (as it uses environment variables instead of hardcoding paths), feel free to propose this in a PR.

Martchus

I was able to cross-compile Syncthing Tray successfully for Windows on ARM. It also works - as far as I can tell from running it via WINE emulating aarch64 on a x86_64 machine. So the next release will contain an ARM build for Windows when I'll manage to update my build/release scripts in time. The only caveat is that I had to configure it with `-DUSE_BOOST_PROCESS:BOOL=OFF` because Boot.Process is not supported by LLVM/Clang/mingw-w64 for the `aarch64-w64-mingw32` target yet.

xgdgsc

Great. Thanks!