Skip to content

Commit 81557c5

Browse files
committed
Fix mingw build error
1 parent fe8d637 commit 81557c5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ write_basic_package_version_file(
531531
# Set config script install location in a location that find_package() will
532532
# look for, which is different on MS Windows than for UNIX
533533
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
534-
if(WIN32)
534+
if(MSVC)
535535
set(PocoConfigPackageLocation "cmake")
536536
else()
537537
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

cmake/PocoMacros.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ if(WIN32)
4040
endforeach()
4141
endif(X64)
4242
endif()
43-
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
43+
if(MINGW)
44+
find_program(CMAKE_MC_COMPILER windmc.exe HINTS "${sdk_bindir}" "${kit_bindir}"
45+
DOC "path to message compiler")
46+
else()
47+
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
48+
endif()
4449
DOC "path to message compiler")
4550
if(NOT CMAKE_MC_COMPILER)
4651
message(FATAL_ERROR "message compiler not found: required to build")
@@ -237,7 +242,7 @@ endif()
237242
# Set config script install location in a location that find_package() will
238243
# look for, which is different on MS Windows than for UNIX
239244
# Note: also set in root CMakeLists.txt
240-
if(WIN32)
245+
if(MSVC)
241246
set(PocoConfigPackageLocation "cmake")
242247
else()
243248
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

0 commit comments

Comments
 (0)