mirror of https://github.com/vitalif/grive2
Convert grive to a pure shared library
In this way it's possible to develop independent clients, sharing the same "functional" part.pull/40/head
parent
74d6b56630
commit
5bda75abb3
|
@ -8,7 +8,19 @@ include_directories(
|
||||||
${grive_SOURCE_DIR}/src
|
${grive_SOURCE_DIR}/src
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable( grive
|
file(GLOB DRIVE_HEADERS
|
||||||
|
${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( grive SHARED
|
||||||
src/main.cc
|
src/main.cc
|
||||||
src/drive/Collection.cc
|
src/drive/Collection.cc
|
||||||
src/drive/Drive.cc
|
src/drive/Drive.cc
|
||||||
|
@ -21,12 +33,24 @@ add_executable( grive
|
||||||
src/util/OS.cc
|
src/util/OS.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_executable( grive_cli
|
||||||
|
src/main.cc
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries( grive
|
target_link_libraries( grive
|
||||||
curl
|
curl
|
||||||
json
|
json
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries( grive_cli
|
||||||
|
grive
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(grive PROPERTIES
|
||||||
|
SOVERSION 0 VERSION 0.0.1
|
||||||
|
)
|
||||||
|
|
||||||
add_executable( unittest
|
add_executable( unittest
|
||||||
test/UnitTest.cc
|
test/UnitTest.cc
|
||||||
src/util/DateTime.cc
|
src/util/DateTime.cc
|
||||||
|
@ -37,3 +61,11 @@ add_executable( unittest
|
||||||
target_link_libraries( unittest
|
target_link_libraries( unittest
|
||||||
cppunit
|
cppunit
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
## Install targets
|
||||||
|
install(TARGETS grive LIBRARY DESTINATION lib)
|
||||||
|
install(TARGETS grive_cli 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