From 22268b04d4d1a9a67927b886db0e9f475c1c41ad Mon Sep 17 00:00:00 2001 From: Christopho Date: Mon, 2 Sep 2024 10:36:41 +0200 Subject: [PATCH] Fix windows build in case of empty CMAKE_PREFIX_PATH --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index da9d176..0c3e97f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,9 +19,9 @@ set(PROJECT_NAMESPACE "oclero") # With Qt5, it was "path/to/Qt/6.7.0/msvc2019_64/lib/cmake/Qt6", # but with Qt6, it is now "path/to/Qt/6.7.0/msvc2019_64". if(WIN32) - string(FIND ${CMAKE_PREFIX_PATH} "/lib/cmake/Qt6" USING_Qt6_INDEX) + string(FIND "${CMAKE_PREFIX_PATH}" "/lib/cmake/Qt6" USING_Qt6_INDEX) if(NOT ${USING_Qt6_INDEX} EQUAL -1) - string(REPLACE "/lib/cmake/Qt6" "" ${CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH}) + string(REPLACE "/lib/cmake/Qt6" "" "${CMAKE_PREFIX_PATH}" "${CMAKE_PREFIX_PATH}") endif() endif()