2007-04-04 19:22:14 +04:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
Program: CMake - Cross-Platform Makefile Generator
|
|
|
|
Module: $RCSfile$
|
|
|
|
Language: C++
|
|
|
|
Date: $Date$
|
|
|
|
Version: $Revision$
|
|
|
|
|
|
|
|
Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
|
|
|
|
See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
|
|
|
|
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
PURPOSE. See the above copyright notices for more information.
|
|
|
|
|
|
|
|
=========================================================================*/
|
|
|
|
#ifndef cmGlobalVisualStudioGenerator_h
|
|
|
|
#define cmGlobalVisualStudioGenerator_h
|
|
|
|
|
|
|
|
#include "cmGlobalGenerator.h"
|
|
|
|
|
|
|
|
/** \class cmGlobalVisualStudioGenerator
|
|
|
|
* \brief Base class for global Visual Studio generators.
|
|
|
|
*
|
|
|
|
* cmGlobalVisualStudioGenerator provides functionality common to all
|
|
|
|
* global Visual Studio generators.
|
|
|
|
*/
|
|
|
|
class cmGlobalVisualStudioGenerator : public cmGlobalGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmGlobalVisualStudioGenerator();
|
|
|
|
virtual ~cmGlobalVisualStudioGenerator();
|
2007-04-04 22:50:35 +04:00
|
|
|
|
2007-04-10 21:09:03 +04:00
|
|
|
/**
|
|
|
|
* Basic generate implementation for all VS generators.
|
|
|
|
*/
|
|
|
|
virtual void Generate();
|
|
|
|
|
2007-11-16 15:01:58 +03:00
|
|
|
/**
|
|
|
|
* Configure CMake's Visual Studio macros file into the user's Visual
|
|
|
|
* Studio macros directory.
|
|
|
|
*/
|
|
|
|
virtual void ConfigureCMakeVisualStudioMacros();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Where does this version of Visual Studio look for macros for the
|
|
|
|
* current user? Returns the empty string if this version of Visual
|
|
|
|
* Studio does not implement support for VB macros.
|
|
|
|
*/
|
|
|
|
virtual std::string GetUserMacrosDirectory();
|
|
|
|
|
2008-02-15 19:49:58 +03:00
|
|
|
/**
|
|
|
|
* What is the reg key path to "vsmacros" for this version of Visual
|
|
|
|
* Studio?
|
|
|
|
*/
|
|
|
|
virtual std::string GetUserMacrosRegKeyBase();
|
|
|
|
|
2007-11-19 21:44:51 +03:00
|
|
|
enum MacroName {MacroReload, MacroStop};
|
|
|
|
|
2007-11-16 15:01:58 +03:00
|
|
|
/**
|
|
|
|
* Call the ReloadProjects macro if necessary based on
|
|
|
|
* GetFilesReplacedDuringGenerate results.
|
|
|
|
*/
|
2007-11-19 21:44:51 +03:00
|
|
|
virtual void CallVisualStudioMacro(MacroName m,
|
|
|
|
const char* vsSolutionFile = 0);
|
2007-11-16 15:01:58 +03:00
|
|
|
|
2007-04-04 22:50:35 +04:00
|
|
|
protected:
|
|
|
|
virtual void CreateGUID(const char*) {}
|
2007-12-21 23:04:06 +03:00
|
|
|
void FixUtilityDepends();
|
2007-04-04 22:50:35 +04:00
|
|
|
const char* GetUtilityForTarget(cmTarget& target, const char*);
|
2007-11-16 15:01:58 +03:00
|
|
|
|
2007-12-21 23:04:06 +03:00
|
|
|
// Does this VS version link targets to each other if there are
|
|
|
|
// dependencies in the SLN file? This was done for VS versions
|
|
|
|
// below 8.
|
|
|
|
virtual bool VSLinksDependencies() const { return true; }
|
|
|
|
|
2007-04-04 22:50:35 +04:00
|
|
|
private:
|
|
|
|
void FixUtilityDependsForTarget(cmTarget& target);
|
|
|
|
void CreateUtilityDependTarget(cmTarget& target);
|
|
|
|
bool CheckTargetLinks(cmTarget& target, const char* name);
|
2007-04-04 19:22:14 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|