Commit 1f42f521 authored by Bill Hoffman's avatar Bill Hoffman

NEW: move from tools and config to create CMake

parent d6bdba10
#------------------------------------------------------------------------------
# Include generated rules
@MAKEINCLUDE@ @MAKEQUOTE@targets.make@MAKEQUOTE@
@MAKEINCLUDE@ @MAKEQUOTE@CMakeTargets.make@MAKEQUOTE@
#------------------------------------------------------------------------------
# Include all variable settings
@MAKEINCLUDE@ @MAKEQUOTE@@ITK_OBJ@/Code/config/MakeVariables.make@MAKEQUOTE@
@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeVariables.make@MAKEQUOTE@
#------------------------------------------------------------------------------
# Include user-editable defines.
@MAKEINCLUDE@ @MAKEQUOTE@@ITK_OBJ@/local.make@MAKEQUOTE@
@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMakeLocal.make@MAKEQUOTE@
#------------------------------------------------------------------------------
# Include General Build Rules
@MAKEINCLUDE@ @MAKEQUOTE@@ITK_OBJ@/Code/config/MakeRules.make@MAKEQUOTE@
@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeRules.make@MAKEQUOTE@
......@@ -15,22 +15,22 @@
#
#------------------------------------------------------------------------------
#
all: ${OBJ_SUB_DIRS} ${EXECUTABLES} ${SUBDIR_BUILD} ${ITK_LIB_FILE} ${LOCAL_BUILD_TARGETS}
all: ${OBJ_SUB_DIRS} ${EXECUTABLES} ${SUBDIR_BUILD} ${ITK_LIB_FILE} ${LOCAL_BUILD_TARGETS}
#------------------------------------------------------------------------------
${RULESGEN}: @fullSrcDir@/Code/tools/*.cxx @fullSrcDir@/Code/tools/*.h
cd @ITK_OBJ@/Code/tools; ${MAKE} rulesgen
${CMAKE}: @fullSrcDir@/CMake/Source/*.cxx @fullSrcDir@/CMake/Source/*.h
cd @CMAKE_OBJ_DIR@/CMake/Source; ${MAKE} CMakeBuildTargets
depend: ${RULESGEN}
${RULESGEN} Makefile
depend: ${CMAKE}
${CMAKE} ${srcdir}/CMakeLists.txt -S${srcdir} -I${srcdir} ${INCLUDE_FLAGS}
clean: ${SUBDIR_CLEAN}
rm -f ${SRC_OBJ} ${ITK_EXECUTABLES}
targets.make: ${RULESGEN} Makefile
${RULESGEN} Makefile -S${srcdir} -I${srcdir} ${INCLUDE_FLAGS}
CMakeTargets.make: ${CMAKE} ${srcdir}/CMakeLists.txt
${CMAKE} ${srcdir}/CMakeLists.txt -S${srcdir} -I${srcdir} ${INCLUDE_FLAGS}
#------------------------------------------------------------------------------
# rules for the normal library
......
topdir = @fullSrcDir@
CONFIG_DIR = @ITK_OBJ@
CONFIG_DIR = @CMAKE_OBJ_DIR@
SHELL = /bin/sh
ITK_OBJ = @ITK_OBJ@
CMAKE_OBJ_DIR = ${CONFIG_DIR}
RANLIB = @RANLIB@
CC = @CC@
......@@ -104,6 +104,6 @@ CXX_FLAGS = ${CPPFLAGS} ${LOCAL_CXXFLAGS} ${CXXFLAGS} \
CC_FLAGS = ${CPPFLAGS} ${LOCAL_CFLAGS} ${CFLAGS}
# set up the path to the rulesgen program
RULESGEN = @ITK_OBJ@/Code/tools/rulesgen
CMAKE = @CMAKE_OBJ_DIR@/CMake/Source/CMakeBuildTargets
BUILD_LIB_FILE = lib${ME}${ITK_LIB_EXT}
CMakeMaster.make -> main file to be included by makefiles
CMakeVariables.make -> all make varibles are set in this file
CMakeRules.make -> All build rules are here
CMakeLocal.make -> Place for hand configuration
CMakeLists.txt -> File in each directory that contains classes, exe, etc
CMakeTargets.make -> generated rules for make style build
Windows / Visual Studio 6.0
CMakeSetup.exe -> window MFC based GUI for configure on windows
CMakeSetupCMD.exe -> windows command line version of CMakeConfigure
Unix
configure -> run on unix to configure for build
CMakeBuildTargets -> Unix program to read CMakeLists.txt and generate CMakeTargets.make
TODO:
Fix cmUnixMakefile.cxx and cmDSPMakefile.cxx
to read libraries and -I stuff from a config file
#include "cmUnixMakefile.h"
#include "cmMakeDepend.h"
#include <iostream>
main(int ac, char** av)
{
if(ac < 2)
{
std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
return -1;
}
cmUnixMakefile* mf = new cmUnixMakefile;
cmMakeDepend md;
if(ac > 2)
{
for(int i =2; i < ac; i++)
{
std::string arg = av[i];
if(arg.find("-I",0) != std::string::npos)
{
std::string path = arg.substr(2);
md.AddSearchPath(path.c_str());
}
if(arg.find("-S",0) != std::string::npos)
{
std::string path = arg.substr(2);
mf->SetCurrentDirectory(path.c_str());
}
}
}
if(!mf->ReadMakefile(av[1]))
{
std::cerr << "Usage: " << av[0] << " Makefile.in -Ipath ..." << std::endl;
return -1;
}
md.SetMakefile(mf);
md.DoDepends();
mf->OutputMakefile("CMakeTargets.make");
delete mf;
}
#include "cmDSWBuilder.h"
#include "cmDSPBuilder.h"
#include <iostream>
void SetArgs(cmPCBuilder& builder, int ac, char** av)
{
for(int i =2; i < ac; i++)
{
std::string arg = av[i];
if(arg.find("-H",0) != std::string::npos)
{
std::string path = arg.substr(2);
builder.SetHomeDirectory(path.c_str());
}
if(arg.find("-D",0) != std::string::npos)
{
std::string path = arg.substr(2);
builder.SetCurrentDirectory(path.c_str());
}
}
}
main(int ac, char** av)
{
if(ac < 3)
{
std::cerr << "Usage: " << av[0] <<
" Makefile.in -[DSP|DSW] -Hinsighthome -Dcurrentdir ..." << std::endl;
return -1;
}
std::string arg = av[2];
if(arg.find("-DSP", 0) != std::string::npos)
{
cmDSPBuilder builder;
builder.SetInputMakefilePath(av[1]);
SetArgs(builder, ac, av);
builder.CreateDSPFile();
}
else
{
cmDSWBuilder builder;
builder.SetInputMakefilePath(av[1]);
SetArgs(builder, ac, av);
builder.CreateDSWFile();
}
return 0;
}
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "CMakeSetup"=.\MFCDialog\CMakeSetup.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name pcbuilderCMD
End Project Dependency
}}}
###############################################################################
Project: "CMakeSetupCMD"=.\CMakeSetupCMD.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
#include "cmDSWBuilder.h"
#include "cmDSPBuilder.h"
#include <iostream>
void SetArgs(cmPCBuilder& builder, int ac, char** av)
{
for(int i =3; i < ac; i++)
{
std::string arg = av[i];
if(arg.find("-H",0) != std::string::npos)
{
std::string path = arg.substr(2);
builder.SetHomeDirectory(path.c_str());
}
if(arg.find("-D",0) != std::string::npos)
{
std::string path = arg.substr(2);
std::cerr << "set makefile dir " << path.c_str() << std::endl;
builder.SetMakefileDirectory(path.c_str());
}
if(arg.find("-O",0) != std::string::npos)
{
std::string path = arg.substr(2);
builder.SetOutputDirectory(path.c_str());
}
if(arg.find("-B",0) != std::string::npos)
{
std::string path = arg.substr(2);
builder.SetOutputHomeDirectory(path.c_str());
std::cout << "set output home to " << path.c_str() << std::endl;
}
}
}
main(int ac, char** av)
{
std::cerr << "pcbuilderCMD\n ";
if(ac < 3)
{
std::cerr << "Usage: " << av[0] <<
" Makefile.in -[DSP|DSW] -Hinsighthome -Dcurrentdir -Ooutput directory" << std::endl;
return -1;
}
std::string arg = av[2];
if(arg.find("-DSP", 0) != std::string::npos)
{
cmDSPBuilder builder;
SetArgs(builder, ac, av);
builder.SetInputMakefilePath(av[1]);
builder.CreateDSPFile();
}
else
{
cmDSWBuilder builder;
SetArgs(builder, ac, av);
builder.SetInputMakefilePath(av[1]);
builder.CreateDSWFile();
}
return 0;
}
# Microsoft Developer Studio Project File - Name="CMakeSetupCMD" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=CMakeSetupCMD - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "CMakeSetupCMD.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "CMakeSetupCMD.mak" CFG="CMakeSetupCMD - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "CMakeSetupCMD - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "CMakeSetupCMD - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "CMakeSetupCMD - Win32 Release"
# PROP BASE Use_MFC 0
# 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_Debug_Libraries 0
# PROP Output_Dir ""
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GR /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "CMakeSetupCMD - Win32 Debug"
# PROP BASE Use_MFC 0
# 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_Debug_Libraries 1
# PROP Output_Dir ""
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GR /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "CMakeSetupCMD - Win32 Release"
# Name "CMakeSetupCMD - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\cmClassFile.cxx
# End Source File
# Begin Source File
SOURCE=.\cmDSPBuilder.cxx
# End Source File
# Begin Source File
SOURCE=.\cmDSPMakefile.cxx
# End Source File
# Begin Source File
SOURCE=.\cmDSWBuilder.cxx
# End Source File
# Begin Source File
SOURCE=.\cmDSWMakefile.cxx
# End Source File
# Begin Source File
SOURCE=.\cmMakeDepend.cxx
# End Source File
# Begin Source File
SOURCE=.\cmMakefile.cxx
# End Source File
# Begin Source File
SOURCE=.\cmPCBuilder.cxx
# End Source File
# Begin Source File
SOURCE=.\cmRegularExpression.cxx
# End Source File
# Begin Source File
SOURCE=.\cmSystemTools.cxx
# End Source File
# Begin Source File
SOURCE=.\CMakeSetupCMD.cxx
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project
# Microsoft Developer Studio Project File - Name="pcbuilder" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# CM DSP Header file
# This file is read by the build system of cm, and is used as the top part of
# a microsoft project dsp header file
# IF this is in a dsp file, then it is not the header, but has
# already been used, so do not edit here...
# variables to REPLACE
#
# BUILD_INCLUDES == include path
# EXTRA_DEFINES == compiler defines
# OUTPUT_LIBNAME == name of output library
# CM_DEBUG_LIBRARIES == libraries linked in
# CM_RELEASE_LIBRARIES == libraries linked in
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=OUTPUT_LIBNAME - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "OUTPUT_LIBNAME.mak" CFG="OUTPUT_LIBNAME - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "OUTPUT_LIBNAME - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "OUTPUT_LIBNAME - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Release"
# PROP BASE Use_MFC 0
# 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_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GR /GX /Zm1000 /O2 /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 CM_RELEASE_LIBRARIES kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "OUTPUT_LIBNAME - Win32 Debug"
# PROP BASE Use_MFC 0
# 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_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /W3 /GR /Zm1000 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /MD /GR /Gm /GX /Zm1000 /ZI /Od /D "WIN32" BUILD_INCLUDES EXTRA_DEFINES /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 CM_DEBUG_LIBRARIES kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "OUTPUT_LIBNAME - Win32 Release"
# Name "OUTPUT_LIBNAME - Win32 Debug"
// CMakeSetupDialogDlg.cpp : implementation file
//
#include "stdafx.h"
#include "pcbuilder.h"
#include "CMakeSetupDialog.h"
#include "../itkDSWBuilder.h"
#include "../itkVC60Configure.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP();
/////////////////////////////////////////////////////////////////////////////
// CMakeSetupDialog dialog
CMakeSetupDialog::CMakeSetupDialog(CWnd* pParent /*=NULL*/)
: CDialog(CMakeSetupDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CMakeSetupDialog)
m_WhereITK = _T("");
m_WhereBuildITK = _T("");
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_WhereITK = _T("");
this->LoadFromRegistry();
}
void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMakeSetupDialog)
DDX_Text(pDX, IDC_WhereITK, m_WhereITK);
DDX_Text(pDX, IDC_WhereITK2, m_WhereBuildITK);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMakeSetupDialog, CDialog)
//{{AFX_MSG_MAP(CMakeSetupDialog)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_EN_CHANGE(IDC_WhereITK, OnChangeEdit1)
ON_BN_CLICKED(IDC_BUTTON2, OnBrowse)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
//}}AFX_MSG_MAP
END_MESSAGE_MAP();
/////////////////////////////////////////////////////////////////////////////
// CMakeSetupDialog message handlers
BOOL CMakeSetupDialog::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
}
void CMakeSetupDialog::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CMakeSetupDialog::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}