Skip to content

Commit

Permalink
Merge pull request #59 from christopho/fix_windows_build
Browse files Browse the repository at this point in the history
Fix windows build in case of empty CMAKE_PREFIX_PATH
  • Loading branch information
oclero authored Sep 3, 2024
2 parents fb09a08 + 22268b0 commit 03573b5
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 03573b5

Please sign in to comment.