#zig cc & CMake Windows Cross-Compile

1 messages · Page 1 of 1 (latest)

soft yacht
#

Having an issue with a CMake project on Linux and using zig cc -target=x86_64-windowswhere CMake says it cannot find the Thread library. Does anybody know how to either a.) Fix the issue or b.) Suppress it? Note that this project compiles in CMake with zig cc target linux and mac

swift gazelle
#

Thread library?

soft yacht
swift gazelle
#

what does the exact error look like?

soft yacht
# swift gazelle what does the exact error look like?
export CC="zig cc -target=x86_64-windows"
export CXX="zig cxx -target=x86_64-windows"
cmake ..

Error:
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindThreads.cmake:238 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  ext/Stardust-Celeste/ext/glfw/CMakeLists.txt:64 (find_package)
soft yacht
#

Seems like this then changed the FindPackage stuff. That's not too hard to fix though