Skip to content

Commit ca19005

Browse files
committed
Pass VERSION macro to src/common.cpp only.
1 parent 3982109 commit ca19005

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ VERSION_MAJOR := 2
33
VERSION := 2.git.$(shell git rev-parse --short HEAD)
44
# VERSION := 2.0.0
55

6-
FLAGS += -DVERSION=$(VERSION)
76
FLAGS += -Iinclude -Idep/include
87

98
include arch.mk
@@ -17,6 +16,8 @@ SOURCES += dep/pffft/pffft.c dep/pffft/fftpack.c
1716
SOURCES += $(wildcard src/*.c src/*/*.c)
1817
SOURCES += $(wildcard src/*.cpp src/*/*.cpp)
1918

19+
build/src/common.cpp.o: FLAGS += -D_APP_VERSION=$(VERSION)
20+
2021
STANDALONE_SOURCES += adapters/standalone.cpp
2122

2223
FLAGS += -fPIC

src/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const std::string APP_NAME = "VCV Rack";
1919
const std::string APP_EDITION = "CE";
2020
const std::string APP_EDITION_NAME = "Community Edition";
2121
const std::string APP_VERSION_MAJOR = "2";
22-
const std::string APP_VERSION = TOSTRING(VERSION);
22+
const std::string APP_VERSION = TOSTRING(_APP_VERSION);
2323
#if defined ARCH_WIN
2424
const std::string APP_ARCH = "win";
2525
#elif ARCH_MAC

0 commit comments

Comments
 (0)