Upgrade from Conan 1.x to 2.x (#4417)

Conan 1.x is no longer supported - upgrade if you used it for dependency management

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-04-02 12:48:22 +02:00
committed by GitHub
parent b209c50b01
commit 281bddb4cf
5 changed files with 79 additions and 35 deletions
+6 -6
View File
@@ -79,16 +79,14 @@ Note: This installation will take about 200 MB of disk space.
### Using CMake
#### Install conan
#### Install conan 2
Install [conan](https://conan.io/downloads.html) and make sure it's in your `PATH` (default setting).
Install [conan 2](https://conan.io/downloads.html) and make sure it's in your `PATH` (default setting).
Then in a terminal, configure conan to use `NMake Makefiles` as its generator:
1. Generate a new profile
`conan profile new --detect --force default`
1. Configure the profile to use `NMake Makefiles` as its generator
`conan profile update conf.tools.cmake.cmaketoolchain:generator="NMake Makefiles" default`
`conan profile detect`
#### Build
@@ -96,10 +94,12 @@ Open up your terminal with the Visual Studio environment variables (e.g. `x64 Na
1. `mkdir build`
1. `cd build`
1. `conan install .. -s build_type=Release --build=missing`
1. `conan install .. -s build_type=Release -c tools.cmake.cmaketoolchain:generator="NMake Makefiles" --build=missing --output-folder=.`
1. `cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_PREFIX_PATH="C:\Qt\5.15.2\msvc2019_64" ..`
1. `nmake`
To build a debug build, you'll also need to add the `-s compiler.runtime_type=Debug` flag to the `conan install` invocation. See [this StackOverflow post](https://stackoverflow.com/questions/59828611/windeployqt-doesnt-deploy-qwindowsd-dll-for-a-debug-application/75607313#75607313)
#### Ensure DLLs are available
Once Chatterino has finished building, to ensure all .dll's are available you can run this from the build directory: