drogonframework / drogonframework/drogon

不能通过vcpkg整合到cmake项目中

Open
#2,355 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

在cmake配置时出现以下错误:
[cmake] CMake Error at build/vcpkg_installed/x64-windows-static/share/drogon/FindBrotli.cmake:45 (set_target_properties):
[cmake] Property INTERFACE_LINK_LIBRARIES may not contain link-type keyword
[cmake] "optimized". The INTERFACE_LINK_LIBRARIES property may contain
[cmake] configuration-sensitive generator-expressions which may be used to specify
[cmake] per-configuration rules.
[cmake] Call Stack (most recent call first):
[cmake] D:/github/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (_find_package)
[cmake] D:/Programs/Perl/c/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
[cmake] build/vcpkg_installed/x64-windows-static/share/drogon/DrogonConfig.cmake:55 (find_dependency)
[cmake] D:/github/vcpkg/scripts/buildsystems/vcpkg.cmake:893 (_find_package)
[cmake] CMakeLists.txt:80 (find_package)

我用的CMakePresets如下:
{
"name": "x64-windows",
"description": "Generated by VS",
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "D:/github/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_TARGET_TRIPLET": "x64-windows-static",
"CMAKE_CONFIGURATION_TYPES": "Debug;RelWithDebInfo",
"CMAKE_CXX_COMPILER": "cl.exe",
"MSVC_TOOLSET_VERSION": "141",
"VCPKG_MANIFEST_MODE": "ON"
}
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.