mirror of https://github.com/vitalif/grive2
commit
e7ab019c5f
|
@ -18,8 +18,19 @@ include_directories(
|
||||||
${OPT_INCS}
|
${OPT_INCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable( grive
|
file(GLOB DRIVE_HEADERS
|
||||||
src/main.cc
|
${grive_SOURCE_DIR}/src/drive/*.hh
|
||||||
|
)
|
||||||
|
|
||||||
|
file (GLOB PROTOCOL_HEADERS
|
||||||
|
${grive_SOURCE_DIR}/src/protocol/*.hh
|
||||||
|
)
|
||||||
|
|
||||||
|
file (GLOB UTIL_HEADERS
|
||||||
|
${grive_SOURCE_DIR}/src/util/*.hh
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library( fgrive SHARED
|
||||||
src/drive/Collection.cc
|
src/drive/Collection.cc
|
||||||
src/drive/Drive.cc
|
src/drive/Drive.cc
|
||||||
src/protocol/Download.cc
|
src/protocol/Download.cc
|
||||||
|
@ -32,30 +43,44 @@ add_executable( grive
|
||||||
src/util/Path.cc
|
src/util/Path.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( grive
|
add_executable( grive
|
||||||
|
src/main.cc
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries( fgrive
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${JSONC_LIBRARY}
|
${JSONC_LIBRARY}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF ( CPPUNIT_FOUND )
|
target_link_libraries( grive
|
||||||
|
fgrive
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(fgrive PROPERTIES
|
||||||
|
SOVERSION 0 VERSION 0.0.1
|
||||||
|
)
|
||||||
|
|
||||||
|
IF ( CPPUNIT_FOUND )
|
||||||
add_executable( unittest
|
add_executable( unittest
|
||||||
src/util/DateTime.cc
|
|
||||||
src/util/Path.cc
|
|
||||||
|
|
||||||
test/UnitTest.cc
|
test/UnitTest.cc
|
||||||
test/util/DateTimeTest.cc
|
test/util/DateTimeTest.cc
|
||||||
test/util/FunctionTest.cc
|
test/util/FunctionTest.cc
|
||||||
test/util/PathTest.cc
|
test/util/PathTest.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries( unittest
|
target_link_libraries( unittest
|
||||||
|
fgrive
|
||||||
${CPPUNIT_LIBRARY}
|
${CPPUNIT_LIBRARY}
|
||||||
)
|
)
|
||||||
|
else ( CPPUNIT_FOUND )
|
||||||
|
message( STATUS "skip building unittest" )
|
||||||
|
endif ( CPPUNIT_FOUND )
|
||||||
|
|
||||||
ELSE ( CPPUNIT_FOUND )
|
|
||||||
message( STATUS "skip building unittest" )
|
|
||||||
ENDIF ( CPPUNIT_FOUND )
|
|
||||||
|
|
||||||
INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/grive DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
## Install targets
|
||||||
|
install(TARGETS fgrive LIBRARY DESTINATION lib)
|
||||||
|
install(TARGETS grive RUNTIME DESTINATION bin)
|
||||||
|
install(FILES ${DRIVE_HEADERS} DESTINATION include/grive/drive)
|
||||||
|
install(FILES ${PROTOCOL_HEADERS} DESTINATION include/grive/protocol)
|
||||||
|
install(FILES ${UTIL_HEADERS} DESTINATION include/grive/util)
|
||||||
|
|
Loading…
Reference in New Issue