mirror of https://github.com/vitalif/grive2
added -v to display version
parent
1eeaede474
commit
98f1bba4ab
|
@ -1,4 +1,6 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set( GRIVE_VERSION "0.0.4" )
|
||||
|
||||
add_subdirectory( libgrive )
|
||||
add_subdirectory( grive )
|
||||
|
|
|
@ -5,6 +5,8 @@ include_directories(
|
|||
${OPT_INCS}
|
||||
)
|
||||
|
||||
add_definitions( -DVERSION="${GRIVE_VERSION}" )
|
||||
|
||||
add_executable( grive_executable
|
||||
src/main.cc
|
||||
)
|
||||
|
|
|
@ -87,7 +87,7 @@ int main( int argc, char **argv )
|
|||
Json config = ReadConfig() ;
|
||||
|
||||
int c ;
|
||||
while ((c = getopt (argc, argv, "ac:")) != -1)
|
||||
while ((c = getopt (argc, argv, "ac:v")) != -1)
|
||||
{
|
||||
switch ( c )
|
||||
{
|
||||
|
@ -115,6 +115,13 @@ int main( int argc, char **argv )
|
|||
|
||||
break ;
|
||||
}
|
||||
|
||||
case 'v' :
|
||||
{
|
||||
std::cout
|
||||
<< "grive version " VERSION " " __DATE__ " " __TIME__ << std::endl ;
|
||||
return 0 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ file (GLOB LIBGRIVE_SRC
|
|||
src/util/*.cc
|
||||
)
|
||||
|
||||
add_definitions( -DVERSION="${GRIVE_VERSION}" )
|
||||
|
||||
add_library( grive SHARED ${LIBGRIVE_SRC} )
|
||||
|
||||
target_link_libraries( grive
|
||||
|
@ -43,7 +45,7 @@ target_link_libraries( grive
|
|||
)
|
||||
|
||||
set_target_properties(grive PROPERTIES
|
||||
SOVERSION 0 VERSION 0.0.3
|
||||
SOVERSION 0 VERSION 0.0.4
|
||||
)
|
||||
|
||||
install(TARGETS grive LIBRARY DESTINATION lib)
|
||||
|
|
Loading…
Reference in New Issue