mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-28 03:57:02 +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:
commit
347b2f0c1c
@ -2,7 +2,6 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
set(MAIN_LIB_DIR "${CMAKE_SOURCE_DIR}/lib")
|
set(MAIN_LIB_DIR "${CMAKE_SOURCE_DIR}/lib")
|
||||||
set(lib_SRCS
|
set(lib_SRCS
|
||||||
${MAIN_LIB_DIR}/StdInc.cpp
|
${MAIN_LIB_DIR}/StdInc.cpp
|
||||||
${CMAKE_BINARY_DIR}/Version.cpp
|
|
||||||
|
|
||||||
${MAIN_LIB_DIR}/battle/AccessibilityInfo.cpp
|
${MAIN_LIB_DIR}/battle/AccessibilityInfo.cpp
|
||||||
${MAIN_LIB_DIR}/battle/BattleAction.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
|
# Version.cpp is a generated file
|
||||||
set_source_files_properties(${CMAKE_BINARY_DIR}/Version.cpp
|
if(ENABLE_GITVERSION)
|
||||||
PROPERTIES GENERATED TRUE
|
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
|
set(lib_HEADERS
|
||||||
${CMAKE_SOURCE_DIR}/include/vstd/CLoggerBase.h
|
${CMAKE_SOURCE_DIR}/include/vstd/CLoggerBase.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user