Browse Source

Pass VERSION macro to src/common.cpp only.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
ca19005e1d
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      Makefile
  2. +1
    -1
      src/common.cpp

+ 2
- 1
Makefile View File

@@ -3,7 +3,6 @@ VERSION_MAJOR := 2
VERSION := 2.git.$(shell git rev-parse --short HEAD) VERSION := 2.git.$(shell git rev-parse --short HEAD)
# VERSION := 2.0.0 # VERSION := 2.0.0


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


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


build/src/common.cpp.o: FLAGS += -D_APP_VERSION=$(VERSION)

STANDALONE_SOURCES += adapters/standalone.cpp STANDALONE_SOURCES += adapters/standalone.cpp


FLAGS += -fPIC FLAGS += -fPIC


+ 1
- 1
src/common.cpp View File

@@ -19,7 +19,7 @@ const std::string APP_NAME = "VCV Rack";
const std::string APP_EDITION = "CE"; const std::string APP_EDITION = "CE";
const std::string APP_EDITION_NAME = "Community Edition"; const std::string APP_EDITION_NAME = "Community Edition";
const std::string APP_VERSION_MAJOR = "2"; const std::string APP_VERSION_MAJOR = "2";
const std::string APP_VERSION = TOSTRING(VERSION);
const std::string APP_VERSION = TOSTRING(_APP_VERSION);
#if defined ARCH_WIN #if defined ARCH_WIN
const std::string APP_ARCH = "win"; const std::string APP_ARCH = "win";
#elif ARCH_MAC #elif ARCH_MAC


Loading…
Cancel
Save