From d454811a63636b835483b6ddad7a36d16f9b75db Mon Sep 17 00:00:00 2001
From: Bill Hoffman <bill.hoffman@kitware.com>
Date: Tue, 19 Jun 2001 15:33:37 -0400
Subject: ENH: add bootstrap support for building fltk

---
 Source/CMakeLists.txt                 | 19 +++++++++++++++++--
 Source/FLTKDialog/CMakeSetupGUI.cxx   |  4 ++--
 Source/MFCDialog/CMakeSetupDialog.cpp |  2 +-
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index f8ef7e5..aec9fb9 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -1,3 +1,12 @@
+INCLUDE (${CMAKE_ROOT}/Modules/FindFLTK.cmake)
+
+
+IF(FLTK_LIBRARY)
+  IF(FLTK_INCLUDE_PATH)
+    SUBDIRS(FLTKDialog)
+  ENDIF(FLTK_INCLUDE_PATH)
+ENDIF(FLTK_LIBRARY)
+
 SOURCE_FILES(SRCS
 cmake  
 cmMakeDepend
@@ -13,7 +22,6 @@ cmCustomCommand
 cmCacheManager
 cmCableClassSet
 cmSourceGroup
-cmakemain
 )
 
 IF (WIN32)
@@ -22,7 +30,14 @@ ELSE (WIN32)
   SOURCE_FILES(SRCS cmUnixMakefileGenerator)
 ENDIF (WIN32)
 
-ADD_EXECUTABLE(cmake SRCS)
+# create a library used by the command line and the GUI
+ADD_LIBRARY(CMakeLib SRCS)
+# always link in the library
+LINK_LIBRARIES(CMakeLib)
+# the library is found here
+LINK_DIRECTORIES(${CMAKE}/Sources)
+
+ADD_EXECUTABLE(cmake cmakemain)
 
 ADD_TEST(burn cmake)
 
diff --git a/Source/FLTKDialog/CMakeSetupGUI.cxx b/Source/FLTKDialog/CMakeSetupGUI.cxx
index 7855d36..dac7f42 100644
--- a/Source/FLTKDialog/CMakeSetupGUI.cxx
+++ b/Source/FLTKDialog/CMakeSetupGUI.cxx
@@ -127,7 +127,7 @@ void CMakeSetupGUI::Show(void) {
 }
 
 bool CMakeSetupGUI::SetBinaryPath(const char *) {
-}
+return true;}
 
 bool CMakeSetupGUI::SetSourcePath(const char *) {
-}
+return true;}
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index c9a8d90..d6e7790 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -583,7 +583,7 @@ void CMakeSetupDialog::SaveCacheFromGUI()
 void CMakeSetupDialog::OnSize(UINT nType, int cx, int cy) 
 {
   CDialog::OnSize(nType, cx, cy);
-  // TODO: Add your message handler code here
+  
   if(m_CacheEntriesList.m_hWnd)
     {
     m_ListFrame.SetWindowPos(&wndTop, 0, 0, cx-28, cy-137,
-- 
cgit v0.12