Skip to content

Commit aeb3d5a

Browse files
add version
1 parent ae450a4 commit aeb3d5a

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
cmake_minimum_required(VERSION 3.10)
22

3+
set(VERSION_MAJOR 1)
4+
set(VERSION_MINOR 0)
5+
set(VERSION_PATCH 0)
6+
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
7+
38
project(vera C CXX)
49

510
set(CMAKE_CXX_STANDARD 11)

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ endif()
315315
# We need this directory, and users of our library will need it too
316316
target_include_directories(vera PUBLIC ${INCLUDE_DEPS_FOLDERS} ${INCLUDE_FOLDER} )
317317

318+
# target_compile_definitions(vera PRIVATE DEBUG)
319+
target_compile_definitions(vera PRIVATE VERA_VERSION_MAJOR=${VERSION_MAJOR})
320+
target_compile_definitions(vera PRIVATE VERA_VERSION_MINOR=${VERSION_MINOR})
321+
target_compile_definitions(vera PRIVATE VERA_VERSION_PATCH=${VERSION_PATCH})
322+
318323
# IDEs should put the headers in a nice place
319324
# source_group( TREE ${INCLUDE_FOLDER}
320325
# PREFIX "Header Files" FILES ${ROOT_HEADER})

0 commit comments

Comments
 (0)