summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-07 22:30:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-07 22:30:56 (GMT)
commitd639b8a5b86286df682433ac86f93dabe204e8fc (patch)
tree1e868903216ab6584fa9353f8fef3712d3424adb /Source/MFCDialog
parent333ff59c23adf41fc9a12703c81e6468441343db (diff)
downloadCMake-d639b8a5b86286df682433ac86f93dabe204e8fc.zip
CMake-d639b8a5b86286df682433ac86f93dabe204e8fc.tar.gz
CMake-d639b8a5b86286df682433ac86f93dabe204e8fc.tar.bz2
ENH: allow for msvc71 to build for vista if CMAKE_MT_EXECUTABLE is put in the cache
Diffstat (limited to 'Source/MFCDialog')
-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 0b81099..3b1f3b9 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)