From 47dbea1bb4915a4c5312c72a6606c56f3f257e1c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 26 Oct 2017 01:59:05 +0200 Subject: [PATCH] cmake: make glm an imported target --- cmake/modules/FindGLM.cmake | 7 +++++++ rwengine/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/cmake/modules/FindGLM.cmake b/cmake/modules/FindGLM.cmake index 73fdc0bd..964d46e8 100644 --- a/cmake/modules/FindGLM.cmake +++ b/cmake/modules/FindGLM.cmake @@ -63,3 +63,10 @@ IF(GLM_FOUND) MESSAGE(STATUS "GLM_INCLUDE_DIR = ${GLM_INCLUDE_DIR}") ENDIF(NOT GLM_FIND_QUIETLY) ENDIF(GLM_FOUND) + +if(GLM_FOUND) + add_library(glm::glm INTERFACE IMPORTED) + set_target_properties(glm::glm PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GLM_INCLUDE_DIR}" + ) +endif() diff --git a/rwengine/CMakeLists.txt b/rwengine/CMakeLists.txt index 8ee2cc07..8d1e45dd 100644 --- a/rwengine/CMakeLists.txt +++ b/rwengine/CMakeLists.txt @@ -148,6 +148,7 @@ add_library(rwengine target_link_libraries(rwengine PUBLIC rwlib + glm::glm PRIVATE ${FFMPEG_LIBRARIES} ${OPENAL_LIBRARY}