0

For example, I currently have both versions 2 and 3 of the GLFW library installed on my Linux computer, named "libglfw.so.2" and "libglfw.so.3". Is it possible to tell CMake to find a specific version of GLFW (say, version 3), and it would be smart enough to look for "libglfw.so.3" or "libglfw.so.3.*" or "libglfw.so.3.*.*"? (Or something equivalent in Mac and Windows)

Yaron Cohen-Tal
  • 2,005
  • 1
  • 15
  • 26

1 Answers1

1

I found these lines but I haven't tested it

find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3) # or glfw2
Richard Dally
  • 1,432
  • 2
  • 21
  • 38
  • This seems to depend on "pkg-config" (both on the program itself and that the libraries provide ".pc" files). I'd prefer something that doesn't depend on it. – Yaron Cohen-Tal Jul 19 '15 at 06:42