Hi,
I am running into a strange issue building my project using CMake. The project depends on curl and libuv, and it works perfectly good on Linux once I install them both manually. On windows however, I use vcpkg together with CMake, and this gives me a problem. For some reason, CMake is able to find and load Curl just fine, but it is unable to find vcpkg.
Below is a snippet of the code I am using in my CMakesLists.txt file
if (MSVC)
find_package(CURL CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
target_link_libraries(${PROJECT_NAME} PRIVATE uv)
else ()
find_package(CURL REQUIRED)
target_link_libraries(${PROJECT_NAME} CURL::libcurl)
target_link_libraries(${PROJECT_NAME} uv)
endif()
Yeah I am aware that find_package command does not work for libuv, though strangely enough this issue only emerged recently. Everything was working fine a year ago, suddenly CMake and vcpkg do not seem to work together to find libuv. Can someone please help? Also if there is a way to install packages on Windows without vcpkg, plz lemme know too.