New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RDY] CMake deps handling - continuation of pr #1261 #1274
Conversation
18b4b26
to
8ee98c5
Compare
CMake/CopyVcpkgDlls.cmake
Outdated
@@ -0,0 +1,19 @@ | |||
# Add an extra step to copy built DLLs on MSVC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do this automatically in Vcpkg!
Could you let me know what specifically isn't working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, I see below that you're not using the toolchain file.
I'd like to help you use the toolchain file if possible! Note that if(NOT CMAKE_TOOLCHAIN_FILE)
# download stuff here
set(CMAKE_TOOLCHAIN_FILE /downloaded/path/to/vcpkg.cmake CACHE STRING "")
endif()
cmake_minimum_required(VERSION 3.8)
project(foo CXX)
message(STATUS "VCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET}") Also, the architecture of the Visual Studio generator can be controlled with |
b9a5b89
to
43728a5
Compare
@ras0219-msft I played for awhile tonight trying to use the CMAKE_TOOLCHAIN_FILE like you suggest, but so far haven't been able to turn it into a good experience. I'll try again tomorrow, and document what I'm seeing then if I still can't get it to work. |
@ras0219-msft The first problem I run into with that approach is that MSVC isn't set before PROJECT, so I don't know if we are in an appropriate environment to use VCPKG. |
@ras0219-msft Disregard the above - I've gotten considerably closer. Now the issue I run into when I use the vcpkg toolchain is:
Compared to the code I just committed, this was my changes:
|
It looks like SDL2 doesn't provide a There are a few floating around that might be interesting: https://github.com/search?utf8=%E2%9C%93&q=filename%3Afindsdl2.cmake&type=Code |
It turned out that the VCPKG_TRIPLET was ending up as just in vcpkg.cmake, if VCPKG_TARGET_TRIPLET is specified it skips setting By avoiding setting VCPKG_TARGET_TRIPLET, it lets the toolchain detect it and set it properly. |
AppVeyor is broken because I haven't put |
At @Alberth289346's request I've made the indentation for the two new CMake files internally consistent. If no one else has anything to add, I'll squash these up and move this PR back to RDY tomorrow. |
Our TravisCI environment is using 3.2, so we are not actively testing on any older version.
This commit adds a new module which clones and automatically sets the include and library paths for the precompiled dependencies. Linux users can opt in however they must choose the final arch (i.e. x86 or x64) they intend to compile against.
This commit adds a new script which can be executed on a Windows machine to build and package the libraries for CorsixTH. A new folder called vcpkg will be created in the same folder as the script. The script is integrated into CMake and run by default when targetting MSVC.
4e92c83
to
031640f
Compare
All squished up and ready to go. |
Compared to #1261 this PR:
vcpkg/installed/**/share/lua/*
directory