From 7f7ad39e150320c53b3970e906c12f8bd31e1531 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 2 Feb 2016 04:50:50 +0100 Subject: [PATCH] CMake target installation fixes --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 244e51a9..649ee527 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,7 +371,6 @@ set(GLFW_CONFIG_PATH "lib${LIB_SUFFIX}/cmake/glfw3") configure_package_config_file("${GLFW_SOURCE_DIR}/src/glfw3Config.cmake.in" "${GLFW_BINARY_DIR}/src/glfw3Config.cmake" INSTALL_DESTINATION "${GLFW_CONFIG_PATH}" - PATH_VARS CMAKE_INSTALL_PREFIX NO_CHECK_REQUIRED_COMPONENTS_MACRO) write_basic_package_version_file("${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake" @@ -419,6 +418,7 @@ if (GLFW_INSTALL) DESTINATION "${GLFW_CONFIG_PATH}") install(EXPORT glfwTargets FILE glfw3Targets.cmake + EXPORT_LINK_INTERFACE_LIBRARIES DESTINATION "${GLFW_CONFIG_PATH}") install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc" DESTINATION "lib${LIB_SUFFIX}/pkgconfig") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f73daa2c..8f70e37e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -96,7 +96,7 @@ if (BUILD_SHARED_LIBS) target_compile_options(glfw PRIVATE "-fno-common") set_target_properties(glfw PROPERTIES - INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}") + INSTALL_NAME_DIR "lib${LIB_SUFFIX}") elseif (UNIX) # Hide symbols not explicitly tagged for export from the shared library target_compile_options(glfw PRIVATE "-fvisibility=hidden")