Updated makefiles
This commit is contained in:
parent
3c52636028
commit
82034a87db
|
|
@ -2,17 +2,17 @@ cmake_minimum_required (VERSION 3.1.3 FATAL_ERROR)
|
||||||
project (etcd-cpp-api)
|
project (etcd-cpp-api)
|
||||||
|
|
||||||
find_library(CPPREST_LIB NAMES cpprest)
|
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(Boost REQUIRED COMPONENTS system thread locale random)
|
||||||
find_package(Protobuf REQUIRED)
|
|
||||||
|
|
||||||
set (etcd-cpp-api_VERSION_MAJOR 0)
|
set (etcd-cpp-api_VERSION_MAJOR 0)
|
||||||
set (etcd-cpp-api_VERSION_MINOR 1)
|
set (etcd-cpp-api_VERSION_MINOR 1)
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
include_directories(SYSTEM ${CPPREST_INCLUDE_DIR} ${Boost_INCLUDE_DIR})
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_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(src)
|
||||||
add_subdirectory(tst)
|
add_subdirectory(tst)
|
||||||
|
|
|
||||||
|
|
@ -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 (TARGETS etcd-cpp-api DESTINATION lib)
|
||||||
install (FILES ../etcd/Client.hpp
|
install (FILES ../etcd/Client.hpp
|
||||||
|
../etcd/SyncClient.hpp
|
||||||
../etcd/Response.hpp
|
../etcd/Response.hpp
|
||||||
../etcd/Value.hpp
|
../etcd/Value.hpp
|
||||||
|
../etcd/Watcher.hpp
|
||||||
DESTINATION include/etcd)
|
DESTINATION include/etcd)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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)
|
add_executable(etcd_test EtcdTest.cpp EtcdSyncTest.cpp WatcherTest.cpp)
|
||||||
set_property(TARGET etcd_test PROPERTY CXX_STANDARD 11)
|
set_property(TARGET etcd_test PROPERTY CXX_STANDARD 11)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue