Skip to content

Commit 4498714

Browse files
committed
Fix Windows clang build with newest cmake
1 parent d2ddf82 commit 4498714

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmake/pcre.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ MACRO(BUNDLE_PCRE2)
1414
IF(WIN32)
1515
# Debug libary name.
1616
# Same condition as in pcre2 CMakeLists.txt that adds "d"
17-
SET(file ${dir}/src/pcre2-build/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
18-
SET(file_d ${dir}/src/pcre2-build/${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}d${CMAKE_STATIC_LIBRARY_SUFFIX})
17+
IF(GENERATOR_IS_MULTI_CONFIG)
18+
SET(intdir "${CMAKE_CFG_INTDIR}/")
19+
ELSE()
20+
SET(intdir)
21+
ENDIF()
22+
23+
SET(file ${dir}/src/pcre2-build${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
24+
SET(file_d ${dir}/src/pcre2-build${intdir}${CMAKE_STATIC_LIBRARY_PREFIX}${lib}d${CMAKE_STATIC_LIBRARY_SUFFIX})
1925
SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION_DEBUG ${file_d})
2026
ELSE()
2127
SET(file ${dir}/src/pcre2-build/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX})

0 commit comments

Comments
 (0)