Skip to content

Commit 1bbdd68

Browse files
committed
Merge branch 'master' of github.com:doxygen/doxygen
2 parents 825c0c6 + c0a7226 commit 1bbdd68

4 files changed

Lines changed: 40 additions & 0 deletions

File tree

addon/doxywizard/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ else()
171171
apply_editbin(doxywizard windows)
172172
endif()
173173

174+
include(ApplyManifest)
175+
apply_manifest(doxywizard)
176+
174177
if(Qt5Core_FOUND)
175178
target_link_libraries(doxywizard Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml doxygen_version)
176179
elseif(Qt6Core_FOUND)

cmake/ApplyManifest.cmake

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# helper script for Windows to run mt.exe on a generated executable to update its manifest
2+
# Usage: apply_manifest(<target> [<manifest_file>])
3+
# If manifest_file is omitted, defaults to ${PROJECT_SOURCE_DIR}/cmake/doxygen.manifest
4+
function(apply_manifest target_name)
5+
if (WIN32 AND MSVC)
6+
if (ARGC GREATER 1)
7+
set(MANIFEST_FILE "${ARGV1}")
8+
else()
9+
set(MANIFEST_FILE "${PROJECT_SOURCE_DIR}/cmake/doxygen.manifest")
10+
endif()
11+
if (CMAKE_MT)
12+
set(MT_EXECUTABLE "${CMAKE_MT}")
13+
else()
14+
find_program(MT_EXECUTABLE mt)
15+
endif()
16+
if(MT_EXECUTABLE)
17+
add_custom_command(
18+
TARGET ${target_name}
19+
POST_BUILD
20+
COMMAND "${MT_EXECUTABLE}" -nologo -manifest "${MANIFEST_FILE}" "-updateresource:$<TARGET_FILE:${target_name}>$<SEMICOLON>1"
21+
VERBATIM)
22+
else()
23+
message(WARNING "mt.exe not found, manifest will not be applied to ${target_name}")
24+
endif()
25+
endif()
26+
endfunction()

cmake/doxygen.manifest

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
4+
<windowsSettings>
5+
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
6+
</windowsSettings>
7+
</application>
8+
</assembly>

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ add_executable(doxygen
350350
include(ApplyEditbin)
351351
apply_editbin(doxygen console)
352352

353+
include(ApplyManifest)
354+
apply_manifest(doxygen)
355+
353356
add_sanitizers(doxygen)
354357

355358
if (use_libclang)

0 commit comments

Comments
 (0)