2002-04-22 19:49:40 +04:00
|
|
|
SET( SRCS
|
2005-03-28 22:23:07 +04:00
|
|
|
CMakeSetup.h
|
2004-01-27 20:37:30 +03:00
|
|
|
CMakeSetup.cpp
|
2005-03-28 22:23:07 +04:00
|
|
|
MakeHelp.h
|
2004-01-27 20:37:30 +03:00
|
|
|
MakeHelp.cpp
|
2005-03-28 22:23:07 +04:00
|
|
|
CMakeGenDialog.h
|
|
|
|
CMakeGenDialog.cpp
|
2004-01-27 20:37:30 +03:00
|
|
|
CMakeSetup.rc
|
2005-03-28 22:23:07 +04:00
|
|
|
CMakeSetupDialog.h
|
2004-01-27 20:37:30 +03:00
|
|
|
CMakeSetupDialog.cpp
|
2005-03-28 22:23:07 +04:00
|
|
|
PathDialog.h
|
2004-01-27 20:37:30 +03:00
|
|
|
PathDialog.cpp
|
|
|
|
PropertyList.cpp
|
2005-03-28 22:23:07 +04:00
|
|
|
StdAfx.h
|
2004-01-27 20:37:30 +03:00
|
|
|
StdAfx.cpp
|
2005-03-28 22:23:07 +04:00
|
|
|
resource.h
|
2004-01-27 20:37:30 +03:00
|
|
|
CMakeCommandLineInfo.cpp
|
2001-06-21 01:03:54 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
# add stuff to use MFC in this executable
|
|
|
|
ADD_DEFINITIONS(-D_AFXDLL)
|
2004-04-28 21:40:58 +04:00
|
|
|
|
|
|
|
# Use of CMAKE_MFC_FLAG
|
|
|
|
# Values:
|
|
|
|
# 0: Use Standard Windows Libraries
|
|
|
|
# 1: Use MFC in a Static Library
|
|
|
|
# 2: Use MFC in a Shared DLL
|
|
|
|
SET(CMAKE_MFC_FLAG 2)
|
2001-06-21 01:03:54 +04:00
|
|
|
|
2002-04-22 19:49:40 +04:00
|
|
|
ADD_EXECUTABLE(CMakeSetup WIN32 ${SRCS})
|
2002-08-21 20:02:32 +04:00
|
|
|
TARGET_LINK_LIBRARIES(CMakeSetup CMakeLib)
|
2001-06-26 21:23:55 +04:00
|
|
|
ADD_DEPENDENCIES(CMakeSetup cmake)
|
2007-09-11 23:21:37 +04:00
|
|
|
|
2007-09-20 19:27:42 +04:00
|
|
|
|
|
|
|
# some older versions of cmake do not have
|
|
|
|
# a patch version set so we need to set it
|
|
|
|
# so that a later if will not fail, this has
|
|
|
|
# to be done all the time for all generators
|
|
|
|
# since if statements are evaluated even if
|
|
|
|
# inside a false if, they must still parse so for
|
|
|
|
# if (CMAKE_PATCH_VERSION GREATER 4) not to
|
|
|
|
# fail CMAKE_PATCH_VERSION must be set
|
|
|
|
IF(${CMAKE_MAJOR_VERSION} LESS 3)
|
|
|
|
IF(NOT DEFINED CMAKE_PATCH_VERSION)
|
|
|
|
SET(CMAKE_PATCH_VERSION 0)
|
|
|
|
ENDIF(NOT DEFINED CMAKE_PATCH_VERSION)
|
|
|
|
ENDIF(${CMAKE_MAJOR_VERSION} LESS 3)
|
|
|
|
|
2007-09-11 23:21:37 +04:00
|
|
|
IF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
|
|
|
|
SET(exe "${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
|
|
|
|
IF(EXECUTABLE_OUTPUT_PATH)
|
|
|
|
SET(exe "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/CMakeSetup.exe")
|
|
|
|
ENDIF(EXECUTABLE_OUTPUT_PATH)
|
|
|
|
|
2007-09-19 21:51:23 +04:00
|
|
|
# VERBATIM flag should be avoided if building with Visual Studio.
|
|
|
|
# (OK to add the flag if ${CMAKE_CFG_INTDIR} is "." which is one
|
|
|
|
# indicator that you are not building with Visual Studio.)
|
|
|
|
#
|
|
|
|
SET(verbatim_flag)
|
2007-09-20 19:27:42 +04:00
|
|
|
IF(NOT CMAKE_CONFIGURATION_TYPES)
|
2007-09-19 21:51:23 +04:00
|
|
|
# VERBATIM flag should also be avoided if using an older CMake.
|
|
|
|
# VERBATIM flag support was added in CMake 2.4.5
|
|
|
|
#
|
|
|
|
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4)
|
|
|
|
IF(${CMAKE_PATCH_VERSION} GREATER 4)
|
|
|
|
SET(verbatim_flag "VERBATIM")
|
|
|
|
ENDIF(${CMAKE_PATCH_VERSION} GREATER 4)
|
|
|
|
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4)
|
|
|
|
|
|
|
|
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
|
|
|
|
SET(verbatim_flag "VERBATIM")
|
|
|
|
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
|
|
|
|
|
|
|
|
IF(NOT verbatim_flag)
|
|
|
|
MESSAGE("${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): warning
|
|
|
|
warning: The VERBATIM flag for ADD_CUSTOM_COMMAND may be required to execute mt correctly,
|
|
|
|
but you are using a CMake ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} which does not parse the VERBATIM flag.
|
|
|
|
Upgrade to CMake 2.4.5 or later to eliminate this warning.")
|
|
|
|
ENDIF(NOT verbatim_flag)
|
2007-09-20 19:27:42 +04:00
|
|
|
ENDIF(NOT CMAKE_CONFIGURATION_TYPES)
|
|
|
|
|
2007-09-19 21:51:23 +04:00
|
|
|
|
2007-09-11 23:21:37 +04:00
|
|
|
# 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"
|
|
|
|
-manifest "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetupManifest.xml"
|
|
|
|
"-outputresource:${exe};#1"
|
2007-09-19 21:51:23 +04:00
|
|
|
${verbatim_flag}
|
2007-09-11 23:21:37 +04:00
|
|
|
)
|
|
|
|
ENDIF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71)
|
|
|
|
|
2004-01-27 20:37:30 +03:00
|
|
|
INSTALL_TARGETS(/bin CMakeSetup)
|