Get the version from the CMake file

This commit is contained in:
CharlesThobe 2022-01-04 04:25:37 +02:00
parent 561c8fb27b
commit 26369efdca
3 changed files with 3113 additions and 8 deletions

View File

@ -1,20 +1,17 @@
cmake_minimum_required(VERSION 3.18)
project("chdman CBT edition")
#compiler flags are "CMAKE_C_FLAGS" and "CMAKE_CXX_FLAGS"
set(build_version "0.238-CBT_edition")
set(vcs_revision "mame0238-326-gf811f531887")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_RELEASE "-O3")
add_subdirectory(cmake_subdirs)
#chdman
add_executable(chdman
${CMAKE_SOURCE_DIR}/src/chdman.cpp
${CMAKE_SOURCE_DIR}/src/tools/chdman.cpp
${CMAKE_SOURCE_DIR}/src/version.cpp
)
target_include_directories(chdman PRIVATE
@ -24,6 +21,10 @@ ${CMAKE_SOURCE_DIR}/3rdparty
${CMAKE_SOURCE_DIR}/3rdparty/libflac/include
)
set_property(TARGET chdman PROPERTY CXX_STANDARD 17)
target_compile_definitions(chdman PRIVATE
BARE_BUILD_VERSION="${build_version}"
BARE_VCS_REVISION="${vcs_revision}"
)
#linking
#target_link_libraries(ocore_sdl PRIVATE SDL2)

3106
src/tools/chdman.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,4 @@
//Charles Bin Thobe
#define BARE_BUILD_VERSION "0.238-CBT_edition"
#define BARE_VCS_REVISION "mame0238-249-g6e0218c2fe6"
extern const char bare_build_version[];
extern const char bare_vcs_revision[];
extern const char build_version[];