mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-28 16:24:13 +01:00
[build] Extract version number from git if available
Logs the version number and game executable name as well.
This commit is contained in:
parent
cc4b53db43
commit
2fce0a7685
@ -1,4 +1,4 @@
|
||||
project('dxvk', ['c', 'cpp'])
|
||||
project('dxvk', ['c', 'cpp'], version : 'v0.61')
|
||||
|
||||
cpu_family = target_machine.cpu_family()
|
||||
|
||||
@ -35,6 +35,10 @@ glsl_generator = generator(glsl_compiler,
|
||||
output : [ '@BASENAME@.h' ],
|
||||
arguments : [ '-V', '--vn', '@BASENAME@', '@INPUT@', '-o', '@OUTPUT@' ])
|
||||
|
||||
dxvk_version = vcs_tag(['git', 'describe'],
|
||||
input: 'version.h.in',
|
||||
output: 'version.h')
|
||||
|
||||
subdir('src')
|
||||
|
||||
enable_tests = get_option('enable_tests')
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <version.h>
|
||||
|
||||
#include "dxvk_instance.h"
|
||||
#include "dxvk_openvr.h"
|
||||
|
||||
@ -6,6 +8,9 @@
|
||||
namespace dxvk {
|
||||
|
||||
DxvkInstance::DxvkInstance() {
|
||||
Logger::info(str::format("Game: ", env::getExeName()));
|
||||
Logger::info(str::format("DXVK: ", DXVK_VERSION));
|
||||
|
||||
g_vrInstance.initInstanceExtensions();
|
||||
|
||||
m_vkl = new vk::LibraryFn();
|
||||
|
@ -92,7 +92,7 @@ dxvk_src = files([
|
||||
|
||||
thread_dep = dependency('threads')
|
||||
|
||||
dxvk_lib = static_library('dxvk', dxvk_src, glsl_generator.process(dxvk_shaders),
|
||||
dxvk_lib = static_library('dxvk', dxvk_src, glsl_generator.process(dxvk_shaders), dxvk_version,
|
||||
link_with : [ util_lib, spirv_lib ],
|
||||
dependencies : [ thread_dep, lib_vulkan ],
|
||||
include_directories : [ dxvk_include_path ],
|
||||
|
3
version.h.in
Normal file
3
version.h.in
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define DXVK_VERSION "@VCS_TAG@"
|
Loading…
Reference in New Issue
Block a user