summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-07 17:30:56 -0500
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-07 17:30:56 -0500
commitd639b8a5b86286df682433ac86f93dabe204e8fc (patch)
tree1e868903216ab6584fa9353f8fef3712d3424adb
parent333ff59c23adf41fc9a12703c81e6468441343db (diff)
downloadcmake-d639b8a5b86286df682433ac86f93dabe204e8fc.tar.gz
ENH: allow for msvc71 to build for vista if CMAKE_MT_EXECUTABLE is put in the cache
-rw-r--r--Source/MFCDialog/CMakeLists.txt19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/MFCDialog/CMakeLists.txt b/Source/MFCDialog/CMakeLists.txt
index 0b810998d1..3b1f3b948b 100644
--- a/Source/MFCDialog/CMakeLists.txt
+++ b/Source/MFCDialog/CMakeLists.txt
@@ -46,7 +46,15 @@ IF(${CMAKE_MAJOR_VERSION} LESS 3)
ENDIF(NOT DEFINED CMAKE_PATCH_VERSION)
ENDIF(${CMAKE_MAJOR_VERSION} LESS 3)
+# for MSVC greater than 71 assume mt is around
+# for other versions allow for the cache to be
+# seeded with a value for CMAKE_MT_EXECUTABLE
+# this allows for MSVC71 to build CMakeSetup that
+# will have the manifest stuff for windows vista
IF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
+ SET(CMAKE_MT_EXECUTABLE mt)
+ENDIF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
+IF(CMAKE_MT_EXECUTABLE)
SET(exe "${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
IF(EXECUTABLE_OUTPUT_PATH)
SET(exe "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
@@ -79,18 +87,23 @@ IF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
ENDIF(NOT verbatim_flag)
ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
-
+ SET(_CMAKE_INPUT_RESOURCE "-inputresource:${exe};#1")
+ # if msvc71 then you can not replace the resource
+ # but you can add one, so set the input resource to empty
+ IF(MSVC71)
+ SET(_CMAKE_INPUT_RESOURCE )
+ ENDIF(MSVC71)
# Solve the "things named like *Setup prompt for admin privileges
# on Vista" problem by merging a manifest fragment that contains a
# requestedExecutionLevel element:
#
ADD_CUSTOM_COMMAND(TARGET CMakeSetup
POST_BUILD COMMAND mt
- "-inputresource:${exe};#1"
+ "${_CMAKE_INPUT_RESOURCE}"
-manifest "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetupManifest.xml"
"-outputresource:${exe};#1"
${verbatim_flag}
)
-ENDIF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
+ENDIF(CMAKE_MT_EXECUTABLE)
INSTALL_TARGETS(/bin CMakeSetup)