Running C:\Program Files\CMake\bin\cmake.exe -S C:/Projects/ASIO_Client -B C:/Projects/Projects/build-ASIO_Client-Desktop_Qt_6_4_1_MSVC2022_64bit-Debug "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DQT_QMAKE_EXECUTABLE:FILEPATH=C:/Qt/6.4.1/msvc2019_64/bin/qmake.exe" "-DCMAKE_PREFIX_PATH:PATH=C:/Qt/6.4.1/msvc2019_64" "-DCMAKE_C_COMPILER:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/9/bin/HostX64/圆4/cl.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/9/bin/HostX64/圆4/cl.exe" "-DCMAKE_CXX_FLAGS_INIT:STRING=" in C:\Projects\build-ASIO_Client-Desktop_Qt_6_4_1_MSVC2022_64bit-Debug. It's possible that I'm remembering wrong, but my recollection is that QtCreator would work with VCPKG by pulling CMAKE_TOOLCHAIN_FILE from the system environment. I'm not a fan of this because I'd have to instruct our team to do this for every project which will increase friction of using QtCreator more. Then I have to click "Re- configure with Initial Parameters". I found that I can make it work in QtCreator by explicitly setting "-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake" in the "Additional CMake options in the initial configuration tab of the Project Build settings. If I run CMake from a developer shell it works fine. Opened the cmake project selected the same kit and now CMake can't find boost and doesn't seem to know about VCPKG at all. I updated to QtCreator 9.0.0 and deleted my build output folder and the file. It used to work with vcpkg configuration through setting the CMAKE_TOOLCHAIN_FILE in the system environment. Target_link_libraries(main PRIVATE spdlog::spdlog spdlog::spdlog_header_only)I have a Qt Project that uses CMake and VCPKG. The package spdlog provides CMake targets: Target_link_libraries(main PRIVATE pugixml pugixml::static pugixml::pugixml) The package pugixml provides CMake targets: Target_link_libraries(main PRIVATE unofficial::libmariadb) The package libmariadb provides CMake targets:įind_package(unofficial-libmariadb CONFIG REQUIRED) Target_link_libraries(main PRIVATE jsoncpp_object jsoncpp_static JsonCpp::JsonCpp) The package jsoncpp provides CMake targets: Target_link_libraries(main PRIVATE CURL::libcurl) Target_link_libraries(main PRIVATE cryptopp-static) The package cryptopp provides CMake targets: Target_link_libraries(main PRIVATE Boost::boost Boost:: Boost. The package boost is compatible with built-in CMake targets:įind_package(Boost REQUIRED ) bootstrap-vcpkg.sh too.ĮDIT: My PR was accepted and now the typical instructions will work again. You'll need to use the git checkout f33d743a757fc50da77a2bd3a4cf5d55c4f5e02f line from my instructions while you are inside the vcpkg folder to fix this for now. Gesior's instructions will also likely fail to compile due to the recent vcpkg libmariadb changes, unless/until otservbr patch their cmake to include the libmariadb-client option. I have not reviewed the rest of what Gesior's instructions are doing, but a quick glance seems it does essentially exactly the same but with less cmake/vcpkg automation. If you want to try and use Gesior's instructions instead, you can change the line that says git checkout develop to git checkout main You can see this reflected in my instructions. The correct "branch" is no longer called develop but is instead called main. Regarding Gesior's instructions and your error: If you follow the instructions carefully, they ensure you are in the right folder when you use the command. When you run the cmake command, you need to be inside the build folder, not inside the otservbr-global folder. Regarding my instructions and your error: You seem to not be following my instructions quite in order and Gesior's instructions are a little outdated. Note: The cmake step will take a long time to complete as it will handle all remaining dependencies automatically. $ cmake -DCMAKE_TOOLCHAIN_FILE=././vcpkg/scripts/buildsystems/vcpkg.cmake. $ sudo apt-get install git cmake build-essential libluajit-5.1-dev ca-certificates curl zip unzip tar pkg-config If you have done a whole lot of stuff that you don't really understand and won't be able to explain to anybody, I suggest you start from a fresh install of Ubuntu 20.04 and follow the steps below exactly.Ĭompiling otservbr-global on Ubuntu 20.04 as at 32df826 UPDATE3: My PR fixing the libmariadb issue has been accepted - I've updated the instructions below to match UPDATE2: These instructions are correct, but it seems you also need to get this package - to do this run sudo apt install libcrypto -dev UPDATE: Updated to temp-fix issue with vcpkg update to libmariadb
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |