: bharatvaj/forwarder

commit 8559076b1997c7b600b830f4d54333c5aedbb7c4
parent 11f04e996d3da5fc5940c6e5dc5fef4b445f070e
Author: Bharatvaj H <bharatvajph@gmail.com>
Date: Fri, 15 Mar 2019 18:54:25 +0000

Refactored file for readability
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/3rdparty/xbee/CMakeLists.txt b/3rdparty/xbee/CMakeLists.txt
@@ -0,0 +1,11 @@
+cmake_minimum_required(VERSION 3.0)
+
+project(xbee LANGUAGES C)
+
+file(GLOB_RECURSE xbee_HDRS "include/*.h")
+file(GLOB_RECURSE xbee_SRCS "src/util/*.c" "src/posix/*.c" "src/wpan/*.c" "src/xbee/*.c" "src/zigbee/*.c")
+add_definitions(-DPOSIX)
+add_library(xbee ${xbee_HDRS} ${xbee_SRCS})
+target_include_directories(xbee PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+$<INSTALL_INTERFACE:include>)
diff --git a/3rdparty/xbee_CMakeLists.txt b/3rdparty/xbee_CMakeLists.txt
@@ -1,18 +0,0 @@
-cmake_minimum_required(VERSION 3.0)
-
-project(xbee LANGUAGES C)
-
-file(GLOB_RECURSE xbee_HDRS "include/*.h")
-file(GLOB_RECURSE xbee_SRCS "src/util/*.c" "src/posix/*.c" "src/wpan/*.c" "src/xbee/*.c" "src/zigbee/*.c")
-add_definitions(-DPOSIX)
-add_library(xbee ${xbee_HDRS} ${xbee_SRCS})
-target_include_directories(xbee PRIVATE include)
-install(DIRECTORY include/wpan DESTINATION include)
-install(DIRECTORY include/xbee DESTINATION include)
-install(DIRECTORY include/zigbee DESTINATION include)
-install(TARGETS xbee
-        PUBLIC_HEADER DESTINATION include
-        ARCHIVE DESTINATION lib
-        LIBRARY DESTINATION lib
-        RUNTIME DESTINATION bin)
-