aboutsummaryrefslogtreecommitdiff
path: root/modules/CMakeLists.txt
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2009-05-26 07:43:03 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2009-05-26 07:43:03 +0000
commit3708a63008ee9b8cdee6acf24019d76aaa09d372 (patch)
treeebfa9a93504664719a7ad993ea9bc85634806bc0 /modules/CMakeLists.txt
parent676b6eb8f38dda6355ac8a4264dde149a5470d2c (diff)
downloadextra-cmake-modules-3708a63008ee9b8cdee6acf24019d76aaa09d372.tar.gz
extra-cmake-modules-3708a63008ee9b8cdee6acf24019d76aaa09d372.tar.bz2
added initial support for fixing windows vista uac problem by adding a specific manifest file to executables. Vista manifest support is disabled by default and could be enabled by setting the KDE4_ENABLE_UAC_MANIFEST variable. This support requires kdewin32 >= 0.3.9
The basic idea of this patch was announced at kde-buildsystem mailing list http://lists.kde.org/?l=kde-buildsystem&m=124220817129087&w=2 without any objections for about two weeks. svn path=/trunk/KDE/kdelibs/; revision=972974
Diffstat (limited to 'modules/CMakeLists.txt')
-rw-r--r--modules/CMakeLists.txt28
1 files changed, 27 insertions, 1 deletions
diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt
index 70df69b2..b67e7337 100644
--- a/modules/CMakeLists.txt
+++ b/modules/CMakeLists.txt
@@ -1,5 +1,23 @@
-## install the cmake files
+if (WIN32)
+ 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)
+ message(STATUS "KDE manifest tool not found, manifest generating for Windows Vista disabled")
+ set (KDE4_ENABLE_UAC_MANIFEST OFF)
+ endif (MT_EXECUTABLE)
+ endif (KDE4_ENABLE_UAC_MANIFEST)
+endif (WIN32)
+## install the cmake files
+
file(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake")
set(module_install_dir ${DATA_INSTALL_DIR}/cmake/modules )
@@ -15,9 +33,17 @@ install( FILES cmake-modules-styleguide.txt
FindPyQt.py
FindSIP.py
PythonCompile.py
+ Win32.Manifest.in
${cmakeFiles}
DESTINATION ${module_install_dir} )
+if (KDE4_ENABLE_UAC_MANIFEST)
+ install( FILES cmake-modules-styleguide.txt
+ Win32.Manifest.in
+ DESTINATION ${module_install_dir}
+ )
+endif (KDE4_ENABLE_UAC_MANIFEST)
+
# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
#set(FILES_TO_REMOVE
#)