Skip to content

Commit

Permalink
move version to its own file so it's easy for CLI to query it
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Oct 11, 2022
1 parent 5f2d3c8 commit d636f7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)

set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build libraries static" FORCE)
set(GEODE_VERSION 0.4.1)
file(READ VERSION GEODE_VERSION)

project(geode-sdk VERSION ${GEODE_VERSION} LANGUAGES CXX C)

Expand All @@ -13,6 +13,9 @@ endif()

add_library(${PROJECT_NAME} INTERFACE)

# Rerun CMake on VERSION file change
set_target_properties(${PROJECT_NAME} PROPERTIES CMAKE_CONFIGURE_DEPENDS VERSION)

target_compile_definitions(${PROJECT_NAME} INTERFACE -DPROJECT_NAME=${CMAKE_PROJECT_NAME})

set(GEODE_CODEGEN_PATH ${CMAKE_CURRENT_BINARY_DIR}/codegenned)
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.4.2

0 comments on commit d636f7d

Please sign in to comment.