Updated makefiles

This commit is contained in:
arches 2016-07-13 05:54:27 -04:00
parent 3c52636028
commit 82034a87db
3 changed files with 9 additions and 4 deletions

View File

@ -2,17 +2,17 @@ cmake_minimum_required (VERSION 3.1.3 FATAL_ERROR)
project (etcd-cpp-api)
find_library(CPPREST_LIB NAMES cpprest)
find_path(CPPREST_INCLUDE_DIR NAMES cpprest/http_client.h)
find_package(Boost REQUIRED COMPONENTS system thread locale random)
find_package(Protobuf REQUIRED)
set (etcd-cpp-api_VERSION_MAJOR 0)
set (etcd-cpp-api_VERSION_MINOR 1)
enable_testing()
include_directories(SYSTEM ${CPPREST_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror -std=c++11")
add_subdirectory(src)
add_subdirectory(tst)

View File

@ -5,7 +5,9 @@ target_link_libraries(etcd-cpp-api ${CPPREST_LIB} boost_system ssl crypto protob
install (TARGETS etcd-cpp-api DESTINATION lib)
install (FILES ../etcd/Client.hpp
../etcd/SyncClient.hpp
../etcd/Response.hpp
../etcd/Value.hpp
../etcd/Watcher.hpp
DESTINATION include/etcd)

View File

@ -1,3 +1,6 @@
find_path(CATCH_INCLUDE_DIR NAMES catch.hpp)
include_directories(${CATCH_INCLUDE_DIR})
add_executable(etcd_test EtcdTest.cpp EtcdSyncTest.cpp WatcherTest.cpp)
set_property(TARGET etcd_test PROPERTY CXX_STANDARD 11)