diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2009-05-29 15:55:37 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2009-05-29 15:55:37 +0000 |
commit | 97e20ea060df47c3d6a849026826a32e98375f5b (patch) | |
tree | e4192eb614d1be71fe265f50f59cfde9c3f6ddad /modules | |
parent | 56362390af4fb86fba0771eafdb174ed96224783 (diff) | |
download | extra-cmake-modules-97e20ea060df47c3d6a849026826a32e98375f5b.tar.gz extra-cmake-modules-97e20ea060df47c3d6a849026826a32e98375f5b.tar.bz2 |
made cmake policy conform
svn path=/trunk/KDE/kdelibs/; revision=974523
Diffstat (limited to 'modules')
-rw-r--r-- | modules/FindKDE4Internal.cmake | 18 | ||||
-rw-r--r-- | modules/KDE4Macros.cmake | 16 |
2 files changed, 17 insertions, 17 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index a9997dfa..a99ddd14 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -586,18 +586,16 @@ if (WIN32) find_package(KDEWIN32 REQUIRED) OPTION(KDE4_ENABLE_UAC_MANIFEST "add manifest to make vista uac happy" OFF) if (KDE4_ENABLE_UAC_MANIFEST) - if (NOT MT_EXECUTABLE) - find_program(MT_EXECUTABLE mt - PATHS ${KDEWIN32_INCLUDE_DIR}/../bin - NO_DEFAULT_PATH - ) - endif (NOT MT_EXECUTABLE) - if (MT_EXECUTABLE) - message(STATUS "Found KDE manifest tool at ${MT_EXECUTABLE} ") - else (MT_EXECUTABLE) + find_program(KDE4_MT_EXECUTABLE mt + PATHS ${KDEWIN32_INCLUDE_DIR}/../bin + NO_DEFAULT_PATH + ) + if (KDE4_MT_EXECUTABLE) + message(STATUS "Found KDE manifest tool at ${KDE4_MT_EXECUTABLE} ") + else (KDE4_MT_EXECUTABLE) message(STATUS "KDE manifest tool not found, manifest generating for Windows Vista disabled") set (KDE4_ENABLE_UAC_MANIFEST OFF) - endif (MT_EXECUTABLE) + endif (KDE4_MT_EXECUTABLE) endif (KDE4_ENABLE_UAC_MANIFEST) endif (WIN32) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index abdd01e9..ce293b51 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -790,18 +790,18 @@ macro (KDE4_ADD_UNIT_TEST _test_NAME) endmacro (KDE4_ADD_UNIT_TEST) -# add a manifest file to executables. This macro is used by kde4_add_executable +# add a manifest file to executables. # # There is a henn-egg problem when a target runtime part is renamed using # the OUTPUT_NAME option of cmake's set_target_properties command. # # At now the Makefiles rules creating for manifest adding are performed -# *after* the cmake's add_executable command but *before* an optional +# *after* the cmake's add_executable command but *before* an optional # set_target_properties command. # This means that in KDE4_ADD_MANIFEST the LOCATION property contains # the unchanged runtime part name of the target. :-( # -# The recently used workaround is to specify a variable build off the target name followed +# The recently used workaround is to specify a variable build off the target name followed # by _OUTPUT_NAME before calling kde4_add_executable as shown in the following example: # # set(xyz_OUTPUT_NAME test) @@ -816,7 +816,9 @@ endmacro (KDE4_ADD_UNIT_TEST) # Because yet I found only 2 locations where this problem occurs (kjs, k3b), the workaround # seems to be a pragmatically solution. # -macro (KDE4_ADD_MANIFEST _target_NAME) +# This macro is an internal macro only used by kde4_add_executable +# +macro (_KDE4_ADD_MANIFEST _target_NAME) set(x ${_target_NAME}_OUTPUT_NAME) if (${x}) set (_executable ${_target_NAME}_LOCATION) @@ -835,13 +837,13 @@ macro (KDE4_ADD_MANIFEST _target_NAME) add_custom_command( TARGET ${_target_NAME} POST_BUILD - COMMAND ${MT_EXECUTABLE} + COMMAND ${KDE4_MT_EXECUTABLE} ARGS -manifest ${_manifest} -updateresource:${_executable} COMMENT "adding vista trustInfo manifest to ${_target_NAME}" ) -endmacro(KDE4_ADD_MANIFEST) +endmacro(_KDE4_ADD_MANIFEST) macro (KDE4_ADD_EXECUTABLE _target_NAME) @@ -885,7 +887,7 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME) endif (KDE4_ENABLE_FINAL) IF (KDE4_ENABLE_UAC_MANIFEST) - KDE4_ADD_MANIFEST(${_target_NAME}) + _kde4_add_manifest(${_target_NAME}) ENDIF(KDE4_ENABLE_UAC_MANIFEST) _automoc4_kde4_post_target_handling(${_target_NAME}) |