From 64630af3627dce0e743109b5ff304f86969585b3 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 14 May 2013 01:03:40 +0200 Subject: [PATCH] CMake config file cleanup. --- CMakeLists.txt | 7 ++++--- src/glfwConfigVersion.cmake.in | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17d26198..da295a6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,10 +397,11 @@ configure_file(${GLFW_SOURCE_DIR}/src/glfwConfigVersion.cmake.in install(FILES ${GLFW_BINARY_DIR}/src/glfwConfig.cmake ${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake - DESTINATION lib${LIB_SUFFIX}/cmake/glfw) + DESTINATION lib${LIB_SUFFIX}/cmake/glfw) -# Install the export set for use with the install-tree -install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw) +if (UNIX) + install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw) +endif() #-------------------------------------------------------------------- # Create and install pkg-config file on supported platforms diff --git a/src/glfwConfigVersion.cmake.in b/src/glfwConfigVersion.cmake.in index cd830661..da8eaf6d 100644 --- a/src/glfwConfigVersion.cmake.in +++ b/src/glfwConfigVersion.cmake.in @@ -1,10 +1,12 @@ + set(PACKAGE_VERSION "@GLFW_VERSION_FULL@") -if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@GLFW_VERSION_MAJOR@") +if ("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL "@GLFW_VERSION_MAJOR@") set(PACKAGE_VERSION_COMPATIBLE TRUE) - if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @GLFW_VERSION_MINOR@) + if ("${PACKAGE_FIND_VERSION_MINOR}" EQUAL @GLFW_VERSION_MINOR@) set(PACKAGE_VERSION_EXACT TRUE) endif() else() set(PACKAGE_VERSION_COMPATIBLE FALSE) endif() +