2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2012-11-20 16:12:27 +04:00
|
|
|
#ifndef cmVisualStudioWCEPlatformParser_h
|
|
|
|
#define cmVisualStudioWCEPlatformParser_h
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2016-09-01 21:05:48 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2012-11-20 16:12:27 +04:00
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
|
|
|
#include "cmXMLParser.h"
|
|
|
|
|
|
|
|
// This class is used to parse XML with configuration
|
|
|
|
// of installed SDKs in system
|
|
|
|
class cmVisualStudioWCEPlatformParser : public cmXMLParser
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmVisualStudioWCEPlatformParser(const char* name = NULL)
|
2016-05-16 17:34:04 +03:00
|
|
|
: RequiredName(name)
|
|
|
|
, FoundRequiredName(false)
|
|
|
|
{
|
|
|
|
}
|
2012-11-20 16:12:27 +04:00
|
|
|
|
|
|
|
int ParseVersion(const char* version);
|
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
bool Found() const { return this->FoundRequiredName; }
|
2012-11-20 16:12:27 +04:00
|
|
|
const char* GetArchitectureFamily() const;
|
|
|
|
std::string GetOSVersion() const;
|
2016-05-16 17:34:04 +03:00
|
|
|
std::string GetIncludeDirectories() const
|
|
|
|
{
|
|
|
|
return this->FixPaths(this->Include);
|
|
|
|
}
|
|
|
|
std::string GetLibraryDirectories() const
|
|
|
|
{
|
|
|
|
return this->FixPaths(this->Library);
|
|
|
|
}
|
|
|
|
std::string GetPathDirectories() const { return this->FixPaths(this->Path); }
|
|
|
|
const std::vector<std::string>& GetAvailablePlatforms() const
|
|
|
|
{
|
|
|
|
return this->AvailablePlatforms;
|
|
|
|
}
|
2012-11-20 16:12:27 +04:00
|
|
|
|
|
|
|
protected:
|
2014-02-22 04:05:55 +04:00
|
|
|
virtual void StartElement(const std::string& name, const char** attributes);
|
|
|
|
void EndElement(const std::string& name);
|
2012-11-20 16:12:27 +04:00
|
|
|
void CharacterDataHandler(const char* data, int length);
|
|
|
|
|
|
|
|
private:
|
2012-11-29 19:36:20 +04:00
|
|
|
std::string FixPaths(const std::string& paths) const;
|
|
|
|
|
2012-11-20 16:12:27 +04:00
|
|
|
std::string CharacterData;
|
|
|
|
|
2012-11-29 19:36:20 +04:00
|
|
|
std::string Include;
|
|
|
|
std::string Library;
|
|
|
|
std::string Path;
|
2012-11-20 16:12:27 +04:00
|
|
|
std::string PlatformName;
|
|
|
|
std::string OSMajorVersion;
|
|
|
|
std::string OSMinorVersion;
|
|
|
|
std::map<std::string, std::string> Macros;
|
|
|
|
std::vector<std::string> AvailablePlatforms;
|
|
|
|
|
|
|
|
const char* RequiredName;
|
|
|
|
bool FoundRequiredName;
|
2012-11-29 19:36:20 +04:00
|
|
|
std::string VcInstallDir;
|
|
|
|
std::string VsInstallDir;
|
2012-11-20 16:12:27 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|