Skip to content

Commit 096304a

Browse files
authored
Fix CMakeLists in order to be able to perform make install
1 parent 5321dcb commit 096304a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ cmake_minimum_required(VERSION 3.2)
33

44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_EXTENSIONS OFF)
6+
set(CPP_STATSD_CLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include/cpp-statsd-client)
67

7-
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/cpp-statsd-client)
8+
include_directories(${CPP_STATSD_CLIENT_DIR})
89

9-
install(FILES UDPSender.hpp StatsdClient.hpp DESTINATION include)
10+
install(DIRECTORY ${CPP_STATSD_CLIENT_DIR} DESTINATION include)
1011

1112
find_package(Threads)
1213
add_executable(testStatsdClient ${CMAKE_CURRENT_SOURCE_DIR}/tests/testStatsdClient.cpp)
1314
target_link_libraries(testStatsdClient ${CMAKE_THREAD_LIBS_INIT})
1415

1516
enable_testing()
16-
add_test(testSuite testStatsdClient)
17+
add_test(testSuite testStatsdClient)
18+
19+
unset(CPP_STATSD_CLIENT_DIR)

0 commit comments

Comments
 (0)