Somebody interested in porting mingw manifest support into cmake ?
Ralf Habacker
ralf.habacker at gmail.com
Sat Mar 30 15:01:22 UTC 2013
Am 26.03.2013 08:57, schrieb Ralf Habacker:
> Am 26.03.2013 08:42, schrieb Stephen Kelly:
>> Ralf Habacker wrote:
>>
>>> Am 24.03.2013 16:19, schrieb Alexander Neundorf:
>>>> Hi,
>>>>
>>>> in kdelibs in the frameworks branch, we are trying to get rid of
>>>> KDE-specific extensions, both for Qt and for cmake.
>>>> This means also no longer kde4_add_executable(), but plain cmake
>>>> add_executable() instead.
>>> kde_add_executable is a hook to extend basic cmake commands, which may
>>> still be required in the future for kde and/or other projects.
>> Without a concrete example, it's hard to know why that would be
>> required?
>>
>> I don't see the mingw manifest support as a good concrete example,
>> because
>> clearly it is something that should be in cmake.
> see
> http://public.kitware.com/pipermail/cmake-developers/2013-February/006561.html
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
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 ?
Regards
Ralf
More information about the Kde-frameworks-devel
mailing list