chore(cmake) propagate version

This commit is contained in:
illyum 2024-09-15 02:37:09 -06:00
parent 42c0af0dbf
commit 1a7f3415ad
2 changed files with 14 additions and 0 deletions

View File

@ -59,6 +59,14 @@ ELSE ()
SET_TARGET_PROPERTIES(ICEngine PROPERTIES OUTPUT_NAME "ICEngine")
ENDIF ()
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/engine/config.hpp.in"
"${CMAKE_CURRENT_BINARY_DIR}/engine/config.hpp"
)
target_include_directories(ICEngine PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
IF (BUILD_EXAMPLES)
INCLUDE_DIRECTORIES(examples/server)
INCLUDE_DIRECTORIES(examples/client)

6
engine/config.hpp.in Normal file
View File

@ -0,0 +1,6 @@
//
// Created by illyum on 9/15/2024.
//
#pragma once
#define PROJECT_VERSION "@PROJECT_VERSION@"