From kde-windows Wed May 13 08:56:11 2009 From: Zeke Connor Date: Wed, 13 May 2009 08:56:11 +0000 To: kde-windows Subject: Re: vista adding manifest problem Message-Id: <200905130356.11883.xzekecomax () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-windows&m=124220863129634 What about adding an option to let the programmer make it require the annoying uac popup or not and not make every KDE application require it? On Wednesday 13 May 2009 04:45:39 Ralf Habacker wrote: > Hi, > > on vista applications need the following manifest to be added > > > > > > > > > > > > > The idea is to add a postbuild task to every executable target by > creating a macro KDE4_ADD_MANIFEST like shown below, which is called in > KDE4_ADD_EXECUTABLE. > > macro (KDE4_ADD_MANIFEST _target_NAME) > get_target_property(_executable ${_target_NAME} LOCATION ) > message(STATUS ${_executable}) > add_custom_command( > TARGET ${_target_NAME} > POST_BUILD > COMMAND ${CMAKE_INSTALL_PREFIX}/bin/mt.exe > ARGS > -manifest ${CMAKE_MODULE_PATH}/Win32.Manifest.in > -updateresource:${_executable} > COMMENT "adding vista trustInfo manifest to ${_target_NAME}" > ) > endmacro(KDE4_ADD_MANIFEST) > > > macro (KDE4_ADD_EXECUTABLE _target_NAME) > .... > add_executable(... > .... > IF (WIN32) > KDE4_ADD_MANIFEST(${_target_NAME}) > ENDIF(WIN32) > > > This works fine except the cases where the output name of a target is > changed after the the call to kde4_add_executable like done in kdelibs/kjs > > # 'kjs_bin' because cmake doesn't like having a lib and app with the > same name > kde4_add_executable(kjs_bin NOGUI ${kjs_SRCS}) > > set_target_properties(kjs_bin PROPERTIES OUTPUT_NAME kjs) > > target_link_libraries(kjs_bin ${KJSLIBNAME}) > > In this case the manifest will be added to the executable named > kjs_bin.exe, which is wrong. > > A solution for this problem would be to call KDE4_ADD_MANIFEST after > set_target_properties and not in kde4_add_executable, say in a kde > specific target_link_libraries but there is no > kde4_target_link_libraries available yet - how to solve this probblem in > a central place ? > > Assumed that there would be a kde4_target_link_libraries macro available > the next point is that KDE4_ADD_MANIFEST should only be called if the > target is an executable target not a shared library target. The only way > I know to detect this case is to check the extension of the target file > name retrieved with get_target_property(_executable ${_target_NAME} > LOCATION ). Is there any other way known ? > > Ralf > > > > > > > _______________________________________________ > Kde-windows mailing list > Kde-windows@kde.org > https://mail.kde.org/mailman/listinfo/kde-windows _______________________________________________ Kde-windows mailing list Kde-windows@kde.org https://mail.kde.org/mailman/listinfo/kde-windows