From 6297f916a6277682608de7d65996f313d146b512 Mon Sep 17 00:00:00 2001 From: Nicholas Vitovitch Date: Wed, 11 Mar 2015 17:56:40 -0400 Subject: [PATCH] Removes an absolute path from glfwTargets.cmake Invokes target_include_directories using generator expressions. The cmake package can now be relocated w/o error. --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c7375c021..311ae1b59 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -59,6 +59,8 @@ endif() add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS}) target_link_libraries(glfw ${glfw_LIBRARIES}) +target_include_directories(glfw PUBLIC $) + set_target_properties(glfw PROPERTIES OUTPUT_NAME "${GLFW_LIB_NAME}" VERSION ${GLFW_VERSION} @@ -90,7 +92,6 @@ if (BUILD_SHARED_LIBS) endif() if (GLFW_INSTALL) - target_include_directories(glfw PUBLIC ${CMAKE_INSTALL_PREFIX}/include) install(TARGETS glfw EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}) endif()