Skip to content

Commit 8b770ed

Browse files
committed
use new git-version-tracking
1 parent 6736a3e commit 8b770ed

File tree

5 files changed

+20
-9
lines changed

5 files changed

+20
-9
lines changed

3rdparty/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ target_compile_definitions(spirv_cross PUBLIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIO
278278
# cmake-git-version-tracking
279279
set(GIT_WORKING_DIR "${NBL_ROOT_PATH}")
280280
add_subdirectory(git-version-tracking EXCLUDE_FROM_ALL)
281-
281+
NBL_ADD_GIT_TRACKING_META_LIBRARY(nabla "${NBL_ROOT_PATH}")
282+
NBL_ADD_GIT_TRACKING_META_LIBRARY(dxc "${CMAKE_CURRENT_SOURCE_DIR}/dxc/dxc")
283+
NBL_GENERATE_GIT_TRACKING_META()
282284

283285
if(NBL_BUILD_IMGUI)
284286
add_library(imgui STATIC
@@ -386,7 +388,6 @@ set(NBL_3RDPARTY_TARGETS
386388
shaderc
387389
jpeg-static
388390
bzip2
389-
cmake_git_version_tracking
390391
simdjson
391392
nlohmann_json
392393
glslang

include/nabla.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
// meta info
2121
#include "git_info.h"
2222

23+
namespace nbl {
24+
NBL_API2 const gtml::GitInfo& getGitInfo(gtml::E_GIT_REPO_META repo);
25+
}
26+
2327
// core lib
2428
#include "nbl/core/declarations.h"
2529

src/nbl/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ set(NBL_SCENE_SOURCES
284284
${NBL_ROOT_PATH}/src/nbl/scene/ITransformTree.cpp
285285
)
286286

287+
set(NBL_META_SOURCES
288+
${NBL_ROOT_PATH}/src/nbl/gtml.cpp
289+
)
290+
287291
set(NABLA_SRCS_COMMON
288292
${NBL_CORE_SOURCES}
289293
${NBL_SYSTEM_SOURCES}
@@ -292,6 +296,7 @@ set(NABLA_SRCS_COMMON
292296
${NBL_VIDEO_SOURCES}
293297
${NBL_SCENE_SOURCES}
294298
${NBL_GENERATED_SOURCES}
299+
${NBL_META_SOURCES}
295300
)
296301

297302
if(MSVC)
@@ -656,12 +661,6 @@ write_source_definitions("${_NBL_DEFINE_FILE_WRAPPER_}" "${_NBL_SOURCE_DEFINITIO
656661

657662
# git version tracking
658663
target_link_libraries(Nabla PUBLIC cmake_git_version_tracking)
659-
target_include_directories(cmake_git_version_tracking PUBLIC
660-
"${CMAKE_CURRENT_BINARY_DIR}/include"
661-
"$<$<CONFIG:DEBUG>:${NABLA_CONF_DIR_DEBUG}>"
662-
"$<$<CONFIG:RELEASE>:${NABLA_CONF_DIR_RELEASE}>"
663-
"$<$<CONFIG:RELWITHDEBINFO>:${NABLA_CONF_DIR_RELWITHDEBINFO}>"
664-
)
665664

666665
#on MSVC it won't compile without this option!
667666
if (MSVC)

src/nbl/gtml.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "git_info.h"
2+
3+
namespace nbl {
4+
const gtml::GitInfo& getGitInfo(gtml::E_GIT_REPO_META repo) {
5+
return gtml::gitMeta[repo];
6+
}
7+
}

0 commit comments

Comments
 (0)