Fix installation path of CMake package files

This commit is contained in:
Zbigniew Mandziejewicz 2015-03-08 23:59:06 +08:00
parent 842aeb8c47
commit a2fa3369de
2 changed files with 3 additions and 2 deletions

View File

@ -479,7 +479,7 @@ endif()
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
if (UNIX) 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() else()
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/") set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/")
endif() endif()
@ -532,7 +532,7 @@ if (GLFW_INSTALL)
install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake" install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
"${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.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(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc" install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"

View File

@ -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}) find_library(GLFW3_LIBRARY "@GLFW_LIB_NAME@" HINTS ${GLFW3_LIBRARY_DIR})
set(GLFW3_LIBRARIES "@GLFW_LIBRARIES@")