Install dll to bin/ on windows.

Signed-off-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
Tao He 2020-12-20 14:54:25 +08:00
parent 887dab21c8
commit 7e280ec8a4
2 changed files with 6 additions and 1 deletions

View File

@ -7,6 +7,7 @@ set(etcd-cpp-api_VERSION_MAJOR 0)
set(etcd-cpp-api_VERSION_MINOR 1)
option(BUILD_ETCD_TESTS "Build test cases" OFF)
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
find_package(Boost REQUIRED COMPONENTS system thread locale random)
if (APPLE)

View File

@ -17,4 +17,8 @@ target_link_libraries(etcd-cpp-api PUBLIC
target_include_directories(etcd-cpp-api PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../proto/gen)
target_include_directories(etcd-cpp-api PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../proto/gen/proto)
install (TARGETS etcd-cpp-api DESTINATION lib)
if (WIN32 AND BUILD_SHARED_LIBS)
install (TARGETS etcd-cpp-api RUNTIME DESTINATION bin)
else()
install (TARGETS etcd-cpp-api LIBRARY DESTINATION lib)
endif()