From 339bdd47b584a7e273bd488e21d95d241be3baaa Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 20 Jun 2001 16:49:09 -0400 Subject: [PATCH] ENH: boot strap mfc gui and support for MFC --- Source/CMakeLists.txt | 8 ++++++-- Source/cmDSPWriter.cxx | 7 +++++++ Templates/DLLHeader.dsptemplate | 16 ++++++++-------- Templates/EXEHeader.dsptemplate | 16 ++++++++-------- Templates/EXEWinHeader.dsptemplate | 16 ++++++++-------- Templates/staticLibHeader.dsptemplate | 16 ++++++++-------- 6 files changed, 45 insertions(+), 34 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a38e9affa..6c38220e0 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -35,10 +35,14 @@ ADD_DEFINITIONS(-DCMAKE_BUILD_WITH_CMAKE) IF (WIN32) SOURCE_FILES(SRCS cmDSWWriter.cxx cmDSPWriter.cxx cmMSProjectGenerator.cxx) -ELSE (WIN32) - SOURCE_FILES(SRCS cmUnixMakefileGenerator.cxx) + IF(NOT UNIX) + SUBDIRS(MFCDialog) + ENDIF(NOT UNIX) ENDIF (WIN32) +SOURCE_FILES(SRCS cmUnixMakefileGenerator.cxx) + + # create a library used by the command line and the GUI ADD_LIBRARY(CMakeLib SRCS) # always link in the library diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index 0135b591f..b936a1134 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -590,6 +590,13 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName, { fin.getline(buffer, 2048); std::string line = buffer; + const char* mfcFlag = m_Makefile->GetDefinition("CMAKE_MFC_FLAG"); + if(!mfcFlag) + { + mfcFlag = "0"; + } + cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG", + mfcFlag); cmSystemTools::ReplaceString(line, "CM_LIBRARIES", libOptions.c_str()); cmSystemTools::ReplaceString(line, "CM_DEBUG_LIBRARIES", diff --git a/Templates/DLLHeader.dsptemplate b/Templates/DLLHeader.dsptemplate index 2cd06f4aa..fd9100ee0 100644 --- a/Templates/DLLHeader.dsptemplate +++ b/Templates/DLLHeader.dsptemplate @@ -46,12 +46,12 @@ RSC=rc.exe !IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHRelease" # PROP Intermediate_Dir "Release" @@ -75,12 +75,12 @@ LINK32=link.exe !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 1 # PROP Output_Dir "LIBRARY_OUTPUT_PATHDebug" # PROP Intermediate_Dir "Debug" @@ -104,13 +104,13 @@ LINK32=link.exe !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "MinSizeRel" # PROP BASE Intermediate_Dir "MinSizeRel" # PROP BASE Ignore_Export_Lib 0 # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHMinSizeRel" # PROP Intermediate_Dir "MinSizeRel" @@ -135,12 +135,12 @@ LINK32=link.exe !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 ReleaseWithDebugInfo" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ReleaseWithDebugInfo" # PROP BASE Intermediate_Dir "ReleaseWithDebugInfo" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHReleaseWithDebugInfo" # PROP Intermediate_Dir "ReleaseWithDebugInfo" diff --git a/Templates/EXEHeader.dsptemplate b/Templates/EXEHeader.dsptemplate index dee760715..a015d972a 100644 --- a/Templates/EXEHeader.dsptemplate +++ b/Templates/EXEHeader.dsptemplate @@ -46,12 +46,12 @@ RSC=rc.exe !IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHRelease" # PROP Intermediate_Dir "Release" @@ -74,12 +74,12 @@ CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 1 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHDebug" # PROP Intermediate_Dir "Debug" @@ -103,12 +103,12 @@ CM_MULTILINE_DEBUG_LIBRARIES CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "MinSizeRel" # PROP BASE Intermediate_Dir "MinSizeRel" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHMinSizeRel" # PROP Intermediate_Dir "MinSizeRel" @@ -131,12 +131,12 @@ CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 ReleaseWithDebugInfo" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ReleaseWithDebugInfo" # PROP BASE Intermediate_Dir "ReleaseWithDebugInfo" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHReleaseWithDebugInfo" # PROP Intermediate_Dir "ReleaseWithDebugInfo" diff --git a/Templates/EXEWinHeader.dsptemplate b/Templates/EXEWinHeader.dsptemplate index 34d7190fb..6e98c42f8 100644 --- a/Templates/EXEWinHeader.dsptemplate +++ b/Templates/EXEWinHeader.dsptemplate @@ -46,12 +46,12 @@ RSC=rc.exe !IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHRelease" # PROP Intermediate_Dir "Release" @@ -76,12 +76,12 @@ CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 1 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHDebug" # PROP Intermediate_Dir "Debug" @@ -106,12 +106,12 @@ CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "MinSizeRel" # PROP BASE Intermediate_Dir "MinSizeRel" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHMinSizeRel" # PROP Intermediate_Dir "MinSizeRel" @@ -134,12 +134,12 @@ CM_MULTILINE_LIBRARIES !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 ReleaseWithDebugInfo" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ReleaseWithDebugInfo" # PROP BASE Intermediate_Dir "ReleaseWithDebugInfo" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "EXECUTABLE_OUTPUT_PATHReleaseWithDebugInfo" # PROP Intermediate_Dir "ReleaseWithDebugInfo" diff --git a/Templates/staticLibHeader.dsptemplate b/Templates/staticLibHeader.dsptemplate index 883bd7779..050a29263 100644 --- a/Templates/staticLibHeader.dsptemplate +++ b/Templates/staticLibHeader.dsptemplate @@ -43,12 +43,12 @@ RSC=rc.exe !IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHRelease" # PROP Intermediate_Dir "Release" @@ -69,12 +69,12 @@ LIB32=link.exe -lib !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 1 # PROP Output_Dir "LIBRARY_OUTPUT_PATHDebug" # PROP Intermediate_Dir "Debug" @@ -93,12 +93,12 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 MinSizeRel" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "MinSizeRel" # PROP BASE Intermediate_Dir "MinSizeRel" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHMinSizeRel" # PROP Intermediate_Dir "MinSizeRel" @@ -120,12 +120,12 @@ LIB32=link.exe -lib !ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 ReleaseWithDebugInfo" -# PROP BASE Use_MFC 0 +# PROP BASE Use_MFC CMAKE_MFC_FLAG # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ReleaseWithDebugInfo" # PROP BASE Intermediate_Dir "ReleaseWithDebugInfo" # PROP BASE Target_Dir "" -# PROP Use_MFC 0 +# PROP Use_MFC CMAKE_MFC_FLAG # PROP Use_Debug_Libraries 0 # PROP Output_Dir "LIBRARY_OUTPUT_PATHReleaseWithDebugInfo" # PROP Intermediate_Dir "ReleaseWithDebugInfo"