Skip to content

Commit

Permalink
Fix windows build in case of empty CMAKE_PREFIX_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
christopho committed Sep 2, 2024
1 parent fb09a08 commit 22268b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 22268b0

Please sign in to comment.