@ -1,5 +1,9 @@
# W e d o t h i s v i a a c u s t o m c o m m a n d t h a t r e - i n v o k e s a c m a k e s c r i p t b e c a u s e w e n e e d t h e D E P E N D S o n . g i t / i n d e x s o t h a t w e w i l l r e - r u n it ( to regenerate the commit tag in the version ) w h e n e v e r t h e c u r r e n t c o m m i t c h a n g e s . I f w e u s e d a c o n f i g u r e _ f i l e d i r e c t l y h e r e , i t w o u l d o n l y r e - r u n w h e n s o m e t h i n g e l s e c a u s e s c m a k e t o r e - r u n .
# W e d o t h i s v i a a c u s t o m c o m m a n d t h a t r e - i n v o k e s a c m a k e s c r i p t b e c a u s e w e n e e d t h e D E P E N D S o n . g i t / i n d e x s o t h a t w e w i l l r e - r u n it ( to regenerate the commit tag in the version ) w h e n e v e r t h e c u r r e n t c o m m i t c h a n g e s . I f w e u s e d a c o n f i g u r e _ f i l e d i r e c t l y h e r e , i t w o u l d o n l y r e - r u n w h e n s o m e t h i n g e l s e c a u s e s c m a k e t o r e - r u n .
if ( LOKINET_VERSIONTAG )
set ( VERSIONTAG "${LOKINET_VERSIONTAG}" )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp" @ONLY )
else ( )
set ( VERSIONTAG "${GIT_VERSION}" )
set ( VERSIONTAG "${GIT_VERSION}" )
set ( GIT_INDEX_FILE "${PROJECT_SOURCE_DIR}/.git/index" )
set ( GIT_INDEX_FILE "${PROJECT_SOURCE_DIR}/.git/index" )
find_package ( Git )
find_package ( Git )
@ -22,6 +26,7 @@ if(EXISTS "${GIT_INDEX_FILE}" AND ( GIT_FOUND OR Git_FOUND) )
else ( )
else ( )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp" @ONLY )
configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp" @ONLY )
endif ( )
endif ( )
endif ( )
if ( WIN32 )
if ( WIN32 )