FindGLM.cmake is not in glm 0.9.7, is this an obsolete way to find libraries in CMAKE?

Thus, while browsing the latest version of GLM 0.9.7, I cannot see the FindGLM.cmake file anywhere that easily includes GLM in CMAKE. I could always use the old version found on the Internet, but the following commit made me dunk:

https://github.com/g-truc/glm/commit/62a7daddcf082f754000fc5e42d7bcdf93c895f7

Fixed message: "Deprecated FindGLM removed." So, did the developer just dump it or is there really a new way to find libraries in CMAKE?

+5
source share
1 answer

Yes, CMake Find modules ( FindXyz.cmake files) are deprecated in favor of package configuration files (usually called XyzConfig.cmake ). The initial philosophy is that Find files are supplied and supported by CMake, and package configuration files are sent and supported by the package that they must find.

The CMake find_package actually has two modes: module mode (deprecated, using search modules) and configuration mode (preferably using the package configuration files).

For the client consuming the package, little needs to be changed (unless you need more settings, which is offered in find_package configuration find_package ).

Note that the commit itself to which you are attached is not only FindGLM.cmake , but also adds the glmConfig.cmake file.

+5
source

Source: https://habr.com/ru/post/1239998/


All Articles