build: Cleanup version loading logic to make it available for plugins

This commit is contained in:
WerWolv
2022-07-27 08:27:38 +02:00
parent 54b31b8a55
commit 80c4949dfb
2 changed files with 14 additions and 7 deletions

View File

@@ -277,6 +277,11 @@ macro(setDefaultBuiltTypeIfUnset)
endif()
endmacro()
function(loadVersion version)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" read_version)
set(${version} ${read_version} PARENT_SCOPE)
endfunction()
macro(detectBadClone)
file (GLOB EXTERNAL_DIRS "lib/external/*")
foreach (EXTERNAL_DIR ${EXTERNAL_DIRS})