diff --git a/CMakeLists.txt b/CMakeLists.txt index acf6b27..023d5dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ configure_file( ) add_subdirectory(src) +add_subdirectory(include) # Make sure we build googletest before anything else add_dependencies(cppkafka googletest) enable_testing() diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..08a7e38 --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(cppkafka) diff --git a/include/cppkafka/CMakeLists.txt b/include/cppkafka/CMakeLists.txt new file mode 100644 index 0000000..010e084 --- /dev/null +++ b/include/cppkafka/CMakeLists.txt @@ -0,0 +1,7 @@ +file(GLOB INCLUDE_FILES "*.h") +install( + FILES ${INCLUDE_FILES} + DESTINATION include/cppkafka + COMPONENT Headers +) +add_subdirectory(zookeeper) diff --git a/include/cppkafka/zookeeper/CMakeLists.txt b/include/cppkafka/zookeeper/CMakeLists.txt new file mode 100644 index 0000000..9041bee --- /dev/null +++ b/include/cppkafka/zookeeper/CMakeLists.txt @@ -0,0 +1,6 @@ +file(GLOB INCLUDE_FILES "*.h") +install( + FILES ${INCLUDE_FILES} + DESTINATION include/cppkafka/zookeeper + COMPONENT Headers +) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0e4ed79..a33acfa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,4 +26,11 @@ if (ENABLE_ZOOKEEPER) set(SOURCES ${SOURCES} ${ZOOKEEPER_SOURCES}) endif() -add_library(cppkafka ${SOURCES}) \ No newline at end of file +add_library(cppkafka ${SOURCES}) + +install( + TARGETS cppkafka + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + COMPONENT dev +)