cginternals / globjects

C++ library strictly wrapping OpenGL objects.
https://globjects.org
MIT License
539 stars 59 forks source link

GLM Path in globjects-export.cmake #327

Closed Silberling closed 6 years ago

Silberling commented 7 years ago

I am using the -dev.zip

if(WIN32)
    set(GLM_ROOT_DIR C:/Libraries/glm)
endif()
find_package(GLM REQUIRED)

with a FindGLM.cmake setting GLM_FOUND and GLM_INCLUDE_DIR

Other Find modules use either _INCLUDE_DIR or _INCLUDE_DIRS and have _FOUND set.

I was expecting globjects would find GLM when those variables are set.

When running cmake I get

CMake Error in CMakeLists.txt:
  Imported target "globjects::globjects" includes non-existent path

    "C:/dev/3rdp/glm-0.9.8.2"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

There seems to be a static path set.

Is this me doing something horribly wrong? (I really dislike CMake on Windows and tend to solve things accidently in a stupid way) Or should there be a modification in the cmake files in globjects?

scheibel commented 7 years ago

Seems like we accidentally hard-encoded the used GLM path into the dev-bundle. We'll have a look at possible solutions and intended behavior. I'm currently not sure if the GLM is to be publicly exported by cmake or if we just want to export it for local development.

scheibel commented 6 years ago

We switched from glm find scripts to the cmake config script of glm itself and bypass this problem.

Silberling commented 6 years ago

Thank you for your help