Open
Description
This page says that you can add the line
find_package(glfw3 3.2 REQUIRED)
to your CMakeLists.txt
, and be able to build the project using CMake.
It does nothing to explain where to put the glfw3 binaries, and does not provide a Findglfw3.cmake
, glfw3Config.cmake
, or a glfw3-config.cmake
file, which CMake needs to evaluate the find_package
macro. The precompiled binaries from here do not provide them either.
Simply adding the above find_package
line to a simple CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(Test)
add_executable(test main.cc)
find_package(glfw3 3.2 REQUIRED)
yields this error:
CMake Error at CMakeLists.txt:6 (find_package):
By not providing "Findglfw3.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "glfw3", but
CMake did not find one.
Could not find a package configuration file provided by "glfw3" (requested
version 3.2) with any of the following names:
glfw3Config.cmake
glfw3-config.cmake
Add the installation prefix of "glfw3" to CMAKE_PREFIX_PATH or set
"glfw3_DIR" to a directory containing one of the above files. If "glfw3"
provides a separate development package or SDK, be sure it has been
installed.
Is there an example Findglfw3.cmake
, glfw3Config.cmake
, or glfw3-config.cmake
file somewhere?