Skip to content

Commit

Permalink
Fix mingw build error
Browse files Browse the repository at this point in the history
  • Loading branch information
lanthora committed Jul 1, 2024
1 parent fe8d637 commit 81557c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ write_basic_package_version_file(
# Set config script install location in a location that find_package() will
# look for, which is different on MS Windows than for UNIX
# Note: also set in POCO_GENERATE_PACKAGE macro in cmake/PocoMacros.cmake
if(WIN32)
if(MSVC)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
Expand Down
9 changes: 7 additions & 2 deletions cmake/PocoMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ if(WIN32)
endforeach()
endif(X64)
endif()
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
if(MINGW)
find_program(CMAKE_MC_COMPILER windmc.exe HINTS "${sdk_bindir}" "${kit_bindir}"
DOC "path to message compiler")
else()
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" ${kit10_bindir}
endif()
DOC "path to message compiler")
if(NOT CMAKE_MC_COMPILER)
message(FATAL_ERROR "message compiler not found: required to build")
Expand Down Expand Up @@ -237,7 +242,7 @@ endif()
# Set config script install location in a location that find_package() will
# look for, which is different on MS Windows than for UNIX
# Note: also set in root CMakeLists.txt
if(WIN32)
if(MSVC)
set(PocoConfigPackageLocation "cmake")
else()
set(PocoConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
Expand Down

0 comments on commit 81557c5

Please sign in to comment.