diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 41 | ||||
-rw-r--r-- | Source/FLTKDialog/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Source/FLTKDialog/CMakeSetupGUIImplementation.cxx | 2 | ||||
-rw-r--r-- | Source/cmConfigure.cmake.h.in | 5 | ||||
-rw-r--r-- | Source/cmSourceFile.cxx | 7 | ||||
-rw-r--r-- | Source/cmStandardIncludes.h | 3 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 |
7 files changed, 48 insertions, 24 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 745d2a8..a38e9af 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -8,26 +8,35 @@ IF(FLTK_LIBRARY) ENDIF(FLTK_LIBRARY) SOURCE_FILES(SRCS -cmake -cmMakeDepend -cmMakefile -cmMakefileGenerator -cmRegularExpression -cmSourceFile -cmSystemTools -cmDirectory -cmCommands -cmTarget -cmCustomCommand -cmCacheManager -cmCableClassSet -cmSourceGroup +cmake +cmMakeDepend.cxx +cmMakefile.cxx +cmMakefileGenerator.cxx +cmRegularExpression.cxx +cmSourceFile.cxx +cmSystemTools.cxx +cmDirectory.cxx +cmCommands.cxx +cmTarget.cxx +cmCustomCommand.cxx +cmCacheManager.cxx +cmCableClassSet.cxx +cmSourceGroup.cxx ) +# configure the .h file +CONFIGURE_FILE( +${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in +${CMake_BINARY_DIR}/Source/cmConfigure.cmake.h ) +# add the include path to find the .h +INCLUDE_DIRECTORIES(${CMake_BINARY_DIR}/Source) +# let cmake know it is supposed to use it +ADD_DEFINITIONS(-DCMAKE_BUILD_WITH_CMAKE) + IF (WIN32) - SOURCE_FILES(SRCS cmDSWWriter cmDSPWriter cmMSProjectGenerator) + SOURCE_FILES(SRCS cmDSWWriter.cxx cmDSPWriter.cxx cmMSProjectGenerator.cxx) ELSE (WIN32) - SOURCE_FILES(SRCS cmUnixMakefileGenerator) + SOURCE_FILES(SRCS cmUnixMakefileGenerator.cxx) ENDIF (WIN32) # create a library used by the command line and the GUI diff --git a/Source/FLTKDialog/CMakeLists.txt b/Source/FLTKDialog/CMakeLists.txt index d110cd8..1c5e8c9 100644 --- a/Source/FLTKDialog/CMakeLists.txt +++ b/Source/FLTKDialog/CMakeLists.txt @@ -1,10 +1,10 @@ SOURCE_FILES(SRCS -CMakeSetupGUI -CMakeSetupGUIImplementation -FLTKDialog -FLTKPropertyItemRow -FLTKPropertyList -FLTKPropertyNameButtonWithHelp +CMakeSetupGUI.cxx +CMakeSetupGUIImplementation.cxx +FLTKDialog.cxx +FLTKPropertyItemRow.cxx +FLTKPropertyList.cxx +FLTKPropertyNameButtonWithHelp.cxx ) diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx index b1eab89..4206e57 100644 --- a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx @@ -146,7 +146,7 @@ CMakeSetupGUIImplementation m_PathToExecutable = absolutePath; #if defined(_WIN32) - m_PathToExecutable += "/CMake.exe"; + m_PathToExecutable += "/Debug/CMake.exe"; #else m_PathToExecutable += "/cmake"; #endif diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in new file mode 100644 index 0000000..6d76a5c --- /dev/null +++ b/Source/cmConfigure.cmake.h.in @@ -0,0 +1,5 @@ +#cmakedefine CMAKE_NO_STD_NAMESPACE +#cmakedefine CMAKE_NO_ANSI_STREAM_HEADERS +#define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}" + + diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index be4dbcc..0783115 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -74,6 +74,13 @@ void cmSourceFile::SetName(const char* name, const char* dir) std::string hname = pathname; if(cmSystemTools::FileExists(hname.c_str())) { + std::string::size_type pos = hname.rfind('.'); + if(pos != std::string::npos) + { + m_SourceExtension = hname.substr(pos+1, hname.size()-pos); + m_SourceName = hname.substr(0, pos); + } + m_HeaderFileOnly = false; m_FullPath = hname; return; diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index 9c84215..a4330bf 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -50,6 +50,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef CMAKE_HAS_AUTOCONF #include "cmConfigure.h" #endif +#ifdef CMAKE_BUILD_WITH_CMAKE +#include "cmConfigure.cmake.h" +#endif #ifdef _MSC_VER #pragma warning ( disable : 4786 ) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index f54e556..7e2a14b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -164,7 +164,7 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args) modules = cMakeRoot + "/share/CMake/Modules"; if (!cmSystemTools::FileIsDirectory(modules.c_str())) { -#if !defined(_WIN32) || defined(__CYGWIN__) +#ifdef CMAKE_ROOT_DIR // try compiled in value on UNIX cMakeRoot = CMAKE_ROOT_DIR; modules = cMakeRoot + "/Modules"; |