diff --git a/CMakeLists.txt b/CMakeLists.txt index e2f363a..1245548 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,19 @@ include_directories( ${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/drive/Collection.cc src/drive/Drive.cc @@ -21,12 +33,24 @@ add_executable( grive src/util/OS.cc ) +add_executable( grive_cli + src/main.cc +) + target_link_libraries( grive curl json ${OPENSSL_LIBRARIES} ) +target_link_libraries( grive_cli + grive +) + +set_target_properties(grive PROPERTIES + SOVERSION 0 VERSION 0.0.1 +) + add_executable( unittest test/UnitTest.cc src/util/DateTime.cc @@ -37,3 +61,11 @@ add_executable( unittest target_link_libraries( unittest 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)