![]() ![]() It took me way too long going down too many red-herring rabbit holes to discover this. The fix was to install the package with vcpkg -triplet 圆4-windows install. defaulted to 圆4-windows so it couldn't find the the package.Ĭurrently vcpkg defaults to the older x86 target, but modern Visual Studio (as used by githup actions) defaults to 圆4. of the major platforms is no simple task and explains the success of CMake. In my case the package install with vcpkg install defaulted to x86-windows but then invoking cmake with -DCMAKE_TOOLCHAIN_FILE=C:/. On Windows, CMake can generate project files for Microsoft Visual Studio and. The DCMAKE_TOOLCHAIN_FILE sets the various CMAKE_(SYSTEM_)?(PREFIX|LIBRARY|INCLUDE|FRAMEWORK)_PATH variables to enable the find_*() cmake functions to work, but note that these paths include the VCPKG_TARGET_TRIPLET. this didn't work for me until I added -triplet 圆4-windows to the vcpkg install command. Run cmake with -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmakeīut. ![]() I've the following CMakeLists.txt: cmake_minimum_required (VERSION 3.12.0) ![]() I found a FindSDL2. Copy the FindSDL2.cmake module and place it in a new 'cmake' directory within your project. Paste this folder in your C:Program Files (x86) directory. MyMissingFile.cpp) if it is in the project folder. I want to use vcpkg in a CMake project in Windows, because I need boost and xerces that are both handled by this package manager. Extract the zip folder and you should see a folder similar to 'SDL2-2.0.9'. In solution explorer, single click each file with the error, bring up the Properties window (right-click, Properties), and ensure the 'Relative Path' is just the file name (e.g. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |