diff options
author | Brad King <brad.king@kitware.com> | 2006-02-01 00:34:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-02-01 00:34:57 (GMT) |
commit | 73284a1c12c6707b802233111a7c1e5e18c94c14 (patch) | |
tree | 497a3ecdaeec475327f86c42f4fdb0e91da9c599 /Source | |
parent | 576d8b41cb10428a227c0f75ed8cc6d0a37fcd05 (diff) | |
download | CMake-73284a1c12c6707b802233111a7c1e5e18c94c14.zip CMake-73284a1c12c6707b802233111a7c1e5e18c94c14.tar.gz CMake-73284a1c12c6707b802233111a7c1e5e18c94c14.tar.bz2 |
ENH: Enabled build of VS 7 and 8 generators for MinGW.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeLists.txt | 44 | ||||
-rw-r--r-- | Source/cmake.cxx | 16 |
2 files changed, 28 insertions, 32 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 0318d05..988b0ee 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -174,43 +174,43 @@ IF (WIN32) IF(NOT UNIX) SET(SRCS ${SRCS} cmGlobalBorlandMakefileGenerator.cxx - cmGlobalNMakeMakefileGenerator.cxx - cmGlobalWatcomWMakeGenerator.cxx + cmGlobalBorlandMakefileGenerator.h cmGlobalMSYSMakefileGenerator.cxx cmGlobalMinGWMakefileGenerator.cxx - cmGlobalVisualStudio6Generator.cxx - cmLocalVisualStudio6Generator.cxx - cmGlobalBorlandMakefileGenerator.h + cmGlobalNMakeMakefileGenerator.cxx cmGlobalNMakeMakefileGenerator.h + cmGlobalVisualStudio6Generator.cxx cmGlobalVisualStudio6Generator.h + cmGlobalVisualStudio71Generator.cxx + cmGlobalVisualStudio71Generator.h + cmGlobalVisualStudio7Generator.cxx + cmGlobalVisualStudio7Generator.h + cmGlobalVisualStudio8Generator.cxx + cmGlobalVisualStudio8Generator.h + cmGlobalWatcomWMakeGenerator.cxx + cmLocalVisualStudio6Generator.cxx cmLocalVisualStudio6Generator.h + cmLocalVisualStudio7Generator.cxx + cmLocalVisualStudio7Generator.h cmWin32ProcessExecution.cxx cmWin32ProcessExecution.h ) - IF(NOT MINGW) - SET(SRCS ${SRCS} - cmGlobalVisualStudio71Generator.h - cmGlobalVisualStudio8Generator.h - cmGlobalVisualStudio7Generator.h - cmLocalVisualStudio7Generator.h - cmGlobalVisualStudio8Generator.cxx - cmGlobalVisualStudio71Generator.cxx - cmGlobalVisualStudio7Generator.cxx - cmLocalVisualStudio7Generator.cxx) - ENDIF(NOT MINGW) ENDIF(NOT UNIX) ENDIF (WIN32) # create a library used by the command line and the GUI ADD_LIBRARY(CMakeLib ${SRCS}) TARGET_LINK_LIBRARIES(CMakeLib cmsys ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES} ${CMAKE_TAR_LIBRARIES}) -IF (UNIX) + +# On UNIX platforms we need the dl libraries for loading plugins. +IF(UNIX) TARGET_LINK_LIBRARIES(CMakeLib ${CMAKE_DL_LIBS}) -ENDIF (UNIX) -IF(CMAKE_BUILD_ON_VISUAL_STUDIO) - # On Visual Studio we need rpcrt4.lib for cmVisualStudio7 generator. - TARGET_LINK_LIBRARIES(CMakeLib rpcrt4.lib) -ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO) +ENDIF(UNIX) + +# On some platforms we need the rpcrt4 library for the VS 7 generators. +IF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW) + TARGET_LINK_LIBRARIES(CMakeLib rpcrt4) +ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW) # # CTestLib diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a10b1ae..da39732 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -43,13 +43,11 @@ // include the generator #if defined(_WIN32) && !defined(__CYGWIN__) -# if !defined(__MINGW32__) +# if !defined(CMAKE_BOOT_MINGW) +# include "cmGlobalVisualStudio6Generator.h" # include "cmGlobalVisualStudio7Generator.h" # include "cmGlobalVisualStudio71Generator.h" # include "cmGlobalVisualStudio8Generator.h" -# endif -# if !defined(CMAKE_BOOT_MINGW) -# include "cmGlobalVisualStudio6Generator.h" # include "cmGlobalBorlandMakefileGenerator.h" # include "cmGlobalNMakeMakefileGenerator.h" # include "cmGlobalWatcomWMakeGenerator.h" @@ -1599,24 +1597,22 @@ void cmake::AddDefaultCommands() void cmake::AddDefaultGenerators() { #if defined(_WIN32) && !defined(__CYGWIN__) -#if !defined(__MINGW32__) +# if !defined(CMAKE_BOOT_MINGW) + m_Generators[cmGlobalVisualStudio6Generator::GetActualName()] = + &cmGlobalVisualStudio6Generator::New; m_Generators[cmGlobalVisualStudio7Generator::GetActualName()] = &cmGlobalVisualStudio7Generator::New; m_Generators[cmGlobalVisualStudio71Generator::GetActualName()] = &cmGlobalVisualStudio71Generator::New; m_Generators[cmGlobalVisualStudio8Generator::GetActualName()] = &cmGlobalVisualStudio8Generator::New; -#endif -#if !defined(CMAKE_BOOT_MINGW) - m_Generators[cmGlobalVisualStudio6Generator::GetActualName()] = - &cmGlobalVisualStudio6Generator::New; m_Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] = &cmGlobalBorlandMakefileGenerator::New; m_Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] = &cmGlobalNMakeMakefileGenerator::New; m_Generators[cmGlobalWatcomWMakeGenerator::GetActualName()] = &cmGlobalWatcomWMakeGenerator::New; -#endif +# endif m_Generators[cmGlobalMSYSMakefileGenerator::GetActualName()] = &cmGlobalMSYSMakefileGenerator::New; m_Generators[cmGlobalMinGWMakefileGenerator::GetActualName()] = |