[CMake] Using CMake as a VC7 workspace generator with external makefiles

Richard Maunder Richard.Maunder at cern.ch
Fri Jun 17 12:34:00 EDT 2005


Ah but I don't want to write a Makefile - I want to write a .vcproj file
of 'Makefile' type.

Looking at one of these I see:

ConfigurationType="0"

Looking in the code, in
cmLocalVisualStudio7Generator::WriteConfiguration()

  // This is an internal type to Visual Studio, it seems that:
  // 4 == static library
  // 2 == dll
  // 1 == executable
  // 10 == utility 
  const char* configType = "10";
  switch(target.GetType())
    { 
    case cmTarget::STATIC_LIBRARY:
      configType = "4";
      break;
    case cmTarget::SHARED_LIBRARY:
    case cmTarget::MODULE_LIBRARY:
      configType = "2";
      break;
    case cmTarget::EXECUTABLE: 
      configType = "1";
      break; 
    case cmTarget::UTILITY:
      configType = "10";
    default:
      break;
    }
 
so this case ="0" is not supported. Is it worth logging a feature
request to add this? 

If I get the time I will look into doing it myself - it looks much
simplier than normal .vcproj files so shouldn't be too hard.

The only other issue is that ideally I would like to be able to use the
same CMakefiles to generate equivalent XCode/KDevelop setups, which can
do the same calling of externally created makefiles.

Richard

>-----Original Message-----
>From: Brad King [mailto:brad.king at kitware.com] 
>Sent: Friday, June 17, 2005 5:53 PM
>To: Richard Maunder
>Cc: cmake at cmake.org
>Subject: Re: [CMake] Using CMake as a VC7 workspace generator 
>with external makefiles
>
>Richard Maunder wrote:
>> I thought prehaps there might be a CMAKE_XXX var or some 
>other way to 
>> do this? ADD_LIBRARY / ADD_EXECUTABLE only seem to be capable of 
>> making lib/dll/exe projects?
>
>These commands are the only way to add these kinds of 
>projects.  You could try using CONFIGURE_FILE after the GLOB 
>to write your own Makefile.
>
>-Brad
>


More information about the CMake mailing list