+
Skip to content

Conversation

HunterZ
Copy link
Contributor

@HunterZ HunterZ commented Aug 12, 2025

  • CMakeLists.txt:
    • Define WIN32_LEAN_AND_MEAN on Windows (MinGW build fix, and may reduce library size)
    • Only set CMAKE_MSVC_RUNTIME_LIBRARY if not already defined by an upstream project (fixes MSVC debug builds)
    • Move add_compile_options("/EHa") to MSVC-only section, but also comment it out because it seems dangerous
    • Set include directory property on library target when included in a higher-level project (partial alternative to the FILE_SET HEADERS stuff)
  • ServMain.cpp, SrvCtrl.cpp:
    • Include shellapi.h (MinGW build fix)

- CMakeLists.txt:
  - define WIN32_LEAN_AND_MEAN (fixes mingw build)
- ServMain.cpp, SrvCtrl.cpp:
  - include shellapi.h (fixes mingw build)
- defer to preexisting CMAKE_MSVC_RUNTIME_LIBRARY value when defined
- don't specify "/EHa" compile option
@HunterZ
Copy link
Contributor Author

HunterZ commented Aug 12, 2025

The Codacy findings are false positives. shellapi.h is a standard Windows header: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/

Without this, MinGW builds will not succeed.

@Tomenz Tomenz merged commit 4b7c329 into Tomenz:master Aug 12, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载