From ab72df90670d2bbcce485cf2552014132d4f9561 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Thu, 24 Nov 2016 23:15:34 +0000 Subject: [PATCH] fix: Ensure installation path uses forward slashes --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 898ac9f..15582cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,10 @@ endif () # prefix for package variables in CMake configuration file string (TOUPPER "${PACKAGE_NAME}" PACKAGE_PREFIX) +# convert file path on Windows with back slashes to path with forward slashes +# otherwise this causes an issue with the cmake_install.cmake script +file (TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX) + # ---------------------------------------------------------------------------- # options @@ -196,6 +200,7 @@ endif () gflags_define (STRING INCLUDE_DIR "Name of include directory of installed header files relative to CMAKE_INSTALL_PREFIX/include/" "${PACKAGE_NAME}") gflags_property (INCLUDE_DIR ADVANCED TRUE) +file (TO_CMAKE_PATH "${INCLUDE_DIR}" INCLUDE_DIR) if (IS_ABSOLUTE INCLUDE_DIR) message (FATAL_ERROR "[GFLAGS_]INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include/") endif ()