Somebody interested in porting mingw manifest support into cmake ?
Stephen Kelly
steveire at gmail.com
Sat Mar 30 15:47:39 UTC 2013
Ralf Habacker wrote:
> cmake seems to have some kind of command hooks see
>
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/MacroTest/CMakeLists.txt;h=02bb31f208e661cd0fe0c879d4a2ea14cd1c425a;hb=HEAD#l45
>
That's not really a command hook. It's more like an override. Any command,
function or macro can be overridden and the original is made available with
an underscore.
> This means with
> - the mt binary
> - a macro added to ${CMAKE_ROOT}/Modules/Platform/Windows-GNU.cmake
> - and the manifest template at ${CMAKE_ROOT}/Templates/Win32.Manifest.in
> is only required.
>
> if (MINGW)
> set (MT_EXECUTABLE ${CMAKE_ROOT}/Binaries/mt.exe)
> endif
> if (MINGW AND MT_EXECUTABLE)
>
> macro(ADD_EXECUTABLE _target)
> _add_executable( ${_target} ${ARGN} )
> get_target_property(_executable ${_target} LOCATION )
>
> set(_manifest ${CMAKE_ROOT}/Templates/Win32.Manifest.in)
> add_custom_command(TARGET ${_target}
> POST_BUILD
> COMMAND ${MT_EXECUTABLE}
> ARGS -manifest
> ${_manifest}-updateresource:${_executable} COMMENT
> "adding vista trustInfo manifest")
>
> endmacro()
>
> endif()
>
> Does anyone see any problems with this approach ?
This discussion should be on the cmake mailing list. That's where you'll
reach the right people.
Thanks,
Steve.
More information about the Kde-frameworks-devel
mailing list