Closed ricosolana closed 1 month ago
Hey, I tried to reproduce it, but I am able to use it via vcpkg.
i used the recommended cmake lines from vcpkg in a new vs project and it worked
quill is header-only and can be used from CMake via:
find_path(QUILL_INCLUDE_DIRS "quill/Backend.h")
target_include_directories(main PRIVATE ${QUILL_INCLUDE_DIRS})
Here is the commands i ran and the output on my windows machine
PS C:\Users\odygr> git clone https://github.com/microsoft/vcpkg
Cloning into 'vcpkg'...
remote: Enumerating objects: 241203, done.
remote: Counting objects: 100% (412/412), done.
remote: Compressing objects: 100% (294/294), done.
remote: Total 241203 (delta 204), reused 260 (delta 118), pack-reused 240791
Receiving objects: 100% (241203/241203), 71.70 MiB | 32.69 MiB/s, done.
Resolving deltas: 100% (160569/160569), done.
Updating files: 100% (11527/11527), done.
PS C:\Users\odygr> cd .\vcpkg\
PS C:\Users\odygr\vcpkg> ls
Directory: C:\Users\odygr\vcpkg
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 21/07/2024 23:02 .github
d----- 21/07/2024 23:02 docs
d----- 21/07/2024 23:02 ports
d----- 21/07/2024 23:02 scripts
d----- 21/07/2024 23:02 toolsrc
d----- 21/07/2024 23:02 triplets
d----- 21/07/2024 23:02 versions
-a---- 21/07/2024 23:02 141 .gitattributes
-a---- 21/07/2024 23:02 5590 .gitignore
-a---- 21/07/2024 23:02 0 .vcpkg-root
-a---- 21/07/2024 23:02 102 bootstrap-vcpkg.bat
-a---- 21/07/2024 23:02 109 bootstrap-vcpkg.sh
-a---- 21/07/2024 23:02 2432 CONTRIBUTING.md
-a---- 21/07/2024 23:02 2785 CONTRIBUTING_pt.md
-a---- 21/07/2024 23:02 2186 CONTRIBUTING_zh.md
-a---- 21/07/2024 23:02 1073 LICENSE.txt
-a---- 21/07/2024 23:02 2334 NOTICE.txt
-a---- 21/07/2024 23:02 2538 NOTICE_pt.txt
-a---- 21/07/2024 23:02 6922 README.md
-a---- 21/07/2024 23:02 2757 SECURITY.md
-a---- 21/07/2024 23:02 923 shell.nix
PS C:\Users\odygr\vcpkg> .\bootstrap-vcpkg.bat
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2024-07-10/vcpkg.exe -> C:\Users\odygr\vcpkg\vcpkg.exe... done.
Validating signature... done.
vcpkg package management program version 2024-07-10-d2dfc73769081bdd9b782d08d27794780b7a99b9
See LICENSE.txt for license information.
Telemetry
---------
vcpkg collects usage data in order to help us improve your experience.
The data collected by Microsoft is anonymous.
You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.
Read more about vcpkg telemetry at docs/about/privacy.md
PS C:\Users\odygr\vcpkg> .\vcpkg.exe integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/Users/odygr/vcpkg/scripts/buildsystems/vcpkg.cmake"
All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.
PS C:\Users\odygr\vcpkg> .\vcpkg.exe list
No packages are installed. Did you mean `search`?
PS C:\Users\odygr\vcpkg> .\vcpkg.exe install quill
Computing installation plan...
A suitable version of cmake was not found (required v3.29.2).
Downloading https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-windows-i386.zip
Extracting cmake...
The following packages will be built and installed:
quill:x64-windows@5.0.0
Detecting compiler hash for triplet x64-windows...
A suitable version of powershell-core was not found (required v7.2.21).
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.21/PowerShell-7.2.21-win-x64.zip
Extracting powershell-core...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe
A suitable version of 7zip was not found (required v24.6.0).
Downloading https://github.com/ip7z/7zip/releases/download/24.06/7z2406-extra.7z
Extracting 7zip...
Restored 0 package(s) from C:\Users\odygr\AppData\Local\vcpkg\archives in 246 us. Use --debug to see more details.
Installing 1/1 quill:x64-windows@5.0.0...
Building quill:x64-windows@5.0.0...
-- Downloading https://github.com/odygrd/quill/archive/v5.0.0.tar.gz -> odygrd-quill-v5.0.0.tar.gz...
-- Extracting source C:/Users/odygr/vcpkg/downloads/odygrd-quill-v5.0.0.tar.gz
-- Using source at C:/Users/odygr/vcpkg/buildtrees/quill/src/v5.0.0-93905edf62.clean
-- Installing: C:/Users/odygr/vcpkg/packages/quill_x64-windows/share/quill/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 73.4 ms.
Elapsed time to handle quill:x64-windows: 1.6 s
quill:x64-windows package ABI: 2d00975e59ec47390f099fe6d5f72027ac3f8ec40f47d7e83839ffcfc46c2ddd
Total install time: 1.6 s
quill is header-only and can be used from CMake via:
find_path(QUILL_INCLUDE_DIRS "quill/Backend.h")
target_include_directories(main PRIVATE ${QUILL_INCLUDE_DIRS})
The vcpkg port is simply copying the headers so you won’t be able to use find_package in cmake when installed from vcpkg.
This might be related to Vcpkg policy for header only libraries @RT2Code might know the reason :)
The make install command from the repo is different and also adds the quill-config file which allows you to call find_package
The vcpkg port has changed in version 6.1.2 and now should be able to find the package with cmake native support
I was going to post this to the vcpkg issue git, but then it seems to fit here better.
Describe the bug Installing quill with
vcpkg install quill
and running a simple cmake project in Visual Studio fails to locate quill.Environment
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/microsoft/vcpkg
cd vcpkg && bootstrap-vcpkg.bat -disableMetrics && vcpkg.exe integrate install
vcpkg.exe install quill
add_executable
in the CMakeLists.txt add this:find_package(quill CONFIG REQUIRED)
and save; it should start the cmake setup.The error appears.
Expected behavior The cmake setup succeeds without issue.
Failure logs
Additional context Possibly related, this same error also occurs when using building a different project using quill on Linux, also using the latest vcpkg. I got around this by manually building quill with make (
git clone https://github.com/odygrd/quill.git && cd quill && cmake . && make install
).