1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Merge pull request #1003 from kambala-decapitator/fix-gitversion-option

compile Version.cpp only when ENABLE_GITVERSION is ON
This commit is contained in:
Andrii Danylchenko 2022-10-01 19:51:42 +03:00 committed by GitHub
commit 347b2f0c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,6 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
set(MAIN_LIB_DIR "${CMAKE_SOURCE_DIR}/lib")
set(lib_SRCS
${MAIN_LIB_DIR}/StdInc.cpp
${CMAKE_BINARY_DIR}/Version.cpp
${MAIN_LIB_DIR}/battle/AccessibilityInfo.cpp
${MAIN_LIB_DIR}/battle/BattleAction.cpp
@ -196,9 +195,12 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
)
# Version.cpp is a generated file
set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
PROPERTIES GENERATED TRUE
)
if(ENABLE_GITVERSION)
list(APPEND lib_SRCS ${CMAKE_BINARY_DIR}/Version.cpp)
set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
PROPERTIES GENERATED TRUE
)
endif()
set(lib_HEADERS
${CMAKE_SOURCE_DIR}/include/vstd/CLoggerBase.h