From a2fa3369de4df462af680e9ced3d54c7a36fc1e3 Mon Sep 17 00:00:00 2001 From: Zbigniew Mandziejewicz Date: Sun, 8 Mar 2015 23:59:06 +0800 Subject: [PATCH] Fix installation path of CMake package files --- CMakeLists.txt | 4 ++-- src/glfw3Config.cmake.in | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f0d66509..ed93fbb23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,7 +479,7 @@ endif() include(CMakePackageConfigHelpers) if (UNIX) - set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/glfw3/") + set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/cmake/glfw3/") else() set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/") endif() @@ -532,7 +532,7 @@ if (GLFW_INSTALL) install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake" "${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake" - DESTINATION lib${LIB_SUFFIX}/cmake/glfw) + DESTINATION ${GLFW_CONFIG_PATH}) install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw) install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc" diff --git a/src/glfw3Config.cmake.in b/src/glfw3Config.cmake.in index d34df06f3..8e148a159 100644 --- a/src/glfw3Config.cmake.in +++ b/src/glfw3Config.cmake.in @@ -13,3 +13,4 @@ set_and_check(GLFW3_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@" find_library(GLFW3_LIBRARY "@GLFW_LIB_NAME@" HINTS ${GLFW3_LIBRARY_DIR}) +set(GLFW3_LIBRARIES "@GLFW_LIBRARIES@")