You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to setup a cross-compile environment to build macosx and windows apps/libraries on an Ubuntu CI/CD docker image.
I'm using clang-cl as a cross compiler for windows and osxcross for macosx.
I'd like to be able to use vcpkg's ports with my CMake projects.
But now that I've set the VCPKG_CHAINLOAD_TOOLCHAIN_FILE , the VCPKG_CRT_LINKAGE doesn't seem to be applied to ports.
I think that might be because of
scripts/cmake/vcpkg_configure_cmake.cmake:
if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE)
if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake")
We can see in that windows.cmake file that it sets the C runtime link type:
My cmake toolchain works and can build cmake projects for windows, macos and linux, I could use it without vcpkg but then I always have to setup and debug any library I want to add. And its even more complex when cross-compiling for example openssl that is already integrated in vcpkg. Thats why I'd like to make it work.
I've included windows.cmake in my toolchain and now it seems to work fine, I'm still testing things: include(/vcpkg/scripts/toolchains/windows.cmake)
Is this the right way to use vcpkg to cross-compile ?
The text was updated successfully, but these errors were encountered:
@Nemirtingas, sorry for no being able to help, and thanks for sharing the docs here!
Np, I understand this isn't the priority of this project. I also prefer native builds but sometimes, you just can't. Thats why I put my HowTo here. Maybe someone will find it usefull.
Hi,
I'm trying to setup a cross-compile environment to build macosx and windows apps/libraries on an Ubuntu CI/CD docker image.
I'm using clang-cl as a cross compiler for windows and osxcross for macosx.
I'd like to be able to use vcpkg's ports with my CMake projects.
I've created a custom triplet to do that:
But now that I've set the VCPKG_CHAINLOAD_TOOLCHAIN_FILE , the VCPKG_CRT_LINKAGE doesn't seem to be applied to ports.
I think that might be because of
scripts/cmake/vcpkg_configure_cmake.cmake:
We can see in that
windows.cmake
file that it sets the C runtime link type:My cmake toolchain works and can build cmake projects for windows, macos and linux, I could use it without vcpkg but then I always have to setup and debug any library I want to add. And its even more complex when cross-compiling for example openssl that is already integrated in vcpkg. Thats why I'd like to make it work.
I've included windows.cmake in my toolchain and now it seems to work fine, I'm still testing things:
include(/vcpkg/scripts/toolchains/windows.cmake)
Is this the right way to use vcpkg to cross-compile ?
The text was updated successfully, but these errors were encountered: