Search code examples
cmakevcpkg

Could not find a configuration file for glfw 3.3.8


Debug console show this

Could not find a configuration file for package "glfw3" that is compatible with requested version "3.3.8".
The following configuration files were considered but not accepted:
 
glfw3/glfw3Config.cmake, version: 3.3.8 (64bit)

Here is my cmakelist file:

cmake_minimum_required(VERSION 3.26)
set(CMAKE_TOOLCHAIN_FILE "my path is correct")
project(project)

set(CMAKE_CXX_STANDARD 23)
add_executable(project main.cpp)

find_package(glfw3 3.3.8 CONFIG REQUIRED PATHS "vcpkg_installed/x64-windows/share")
find_package(glad CONFIG REQUIRED PATHS "vcpkg_installed/x64-windows/share")
target_link_libraries(project PRIVATE glfw)

The current cmake version is 3.27.0 Thank in advance


Solution

  • I change mingw32 to mingw64 to use 64-bit lib