From f64e1e128e3ac14ab428eaee8f5397233673d6f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20S=2E=20Ga=C3=9Fmann?= Date: Mon, 29 May 2023 15:40:06 +0200 Subject: [PATCH] build: Properly escape paths which may contain spaces --- cmake/ftxui_export.cmake | 2 +- cmake/ftxui_find_google_test.cmake | 4 ++-- cmake/ftxui_install.cmake | 20 ++++++++++---------- cmake/iwyu.cmake | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmake/ftxui_export.cmake b/cmake/ftxui_export.cmake index 9df4e7d..ae0fcff 100644 --- a/cmake/ftxui_export.cmake +++ b/cmake/ftxui_export.cmake @@ -4,5 +4,5 @@ add_library(ftxui::component ALIAS component) export( TARGETS screen dom component NAMESPACE ftxui:: - FILE ${PROJECT_BINARY_DIR}/ftxui-targets.cmake + FILE "${PROJECT_BINARY_DIR}/ftxui-targets.cmake" ) diff --git a/cmake/ftxui_find_google_test.cmake b/cmake/ftxui_find_google_test.cmake index 293bd7b..c7941ce 100644 --- a/cmake/ftxui_find_google_test.cmake +++ b/cmake/ftxui_find_google_test.cmake @@ -27,7 +27,7 @@ set(BUILD_GMOCK OFF CACHE INTERNAL "") set(INSTALL_GTEST OFF CACHE INTERNAL "") set(gtest_force_shared_crt ON CACHE INTERNAL "") add_subdirectory( - ${googletest_SOURCE_DIR} - ${googletest_BINARY_DIR} + "${googletest_SOURCE_DIR}" + "${googletest_BINARY_DIR}" EXCLUDE_FROM_ALL ) diff --git a/cmake/ftxui_install.cmake b/cmake/ftxui_install.cmake index 0ad6579..87ca8e8 100644 --- a/cmake/ftxui_install.cmake +++ b/cmake/ftxui_install.cmake @@ -15,7 +15,7 @@ install( install( DIRECTORY include/ftxui - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) # ------------------------------------------------------------------------------ @@ -24,7 +24,7 @@ install( install( EXPORT ftxui-targets NAMESPACE ftxui:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ftxui" ) # ------------------------------------------------------------------------------ @@ -32,21 +32,21 @@ install( # needed to support users of find_package() # ------------------------------------------------------------------------------ configure_package_config_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ftxui-config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config.cmake - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/ftxui/cmake + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ftxui-config.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config.cmake" + INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/ftxui/cmake" PATH_VARS CMAKE_INSTALL_INCLUDEDIR ) write_basic_package_version_file( - ${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config-version.cmake + "${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config-version.cmake" VERSION ${PACKAGE_VERSION} COMPATIBILITY SameMajorVersion ) install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config.cmake - ${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config-version.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui + "${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/cmake/ftxui-config-version.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ftxui" ) # ------------------------------------------------------------------------------ @@ -55,6 +55,6 @@ install( # ------------------------------------------------------------------------------ configure_file(ftxui.pc.in ${CMAKE_CURRENT_BINARY_DIR}/ftxui.pc @ONLY) install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/ftxui.pc + FILES "${CMAKE_CURRENT_BINARY_DIR}/ftxui.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" ) diff --git a/cmake/iwyu.cmake b/cmake/iwyu.cmake index 029c9f6..d7d2a4a 100644 --- a/cmake/iwyu.cmake +++ b/cmake/iwyu.cmake @@ -1,7 +1,7 @@ find_program(iwyu_path NAMES include-what-you-use iwyu) if(iwyu_path) set_property(TARGET ${lib} - PROPERTY ${iwyu_path} -Xiwyu - --mapping_file ${CMAKE_CURRENT_SOURCE_DIR}/iwyu.imp + PROPERTY "${iwyu_path}" -Xiwyu + --mapping_file "${CMAKE_CURRENT_SOURCE_DIR}/iwyu.imp" ) endif()