mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 07:56:40 +00:00 
			
		
		
		
	Now we don't need to recompile 3 .cpp files and re-link whenever the current git HEAD changes.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			547 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			547 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef VERSION_HPP
 | 
						|
#define VERSION_HPP
 | 
						|
 | 
						|
#include <string>
 | 
						|
 | 
						|
namespace Version
 | 
						|
{
 | 
						|
 | 
						|
    struct Version
 | 
						|
    {
 | 
						|
        std::string mVersion;
 | 
						|
        std::string mCommitHash;
 | 
						|
        std::string mTagHash;
 | 
						|
 | 
						|
        std::string describe();
 | 
						|
    };
 | 
						|
 | 
						|
    /// Read OpenMW version from the version file located in resourcePath.
 | 
						|
    Version getOpenmwVersion(const std::string& resourcePath);
 | 
						|
 | 
						|
    /// Helper function to getOpenmwVersion and describe() it
 | 
						|
    std::string getOpenmwVersionDescription(const std::string& resourcePath);
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
#endif // VERSION_HPP
 | 
						|
 |