From 379b6d1b6fd6b46a42a1ed6d4b5ba858775734f5 Mon Sep 17 00:00:00 2001 From: Rafal Zajac Date: Mon, 13 Nov 2017 16:39:10 +0100 Subject: [PATCH] Add missing libraries to link with drivers. --- src/esp_dht22/CMakeLists.txt | 6 +++--- src/esp_ds18b20/CMakeLists.txt | 5 +++-- src/esp_sht21/CMakeLists.txt | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/esp_dht22/CMakeLists.txt b/src/esp_dht22/CMakeLists.txt index bf16851..df53eed 100644 --- a/src/esp_dht22/CMakeLists.txt +++ b/src/esp_dht22/CMakeLists.txt @@ -27,6 +27,6 @@ target_include_directories(esp_dht22 PUBLIC ${esp_gpio_INCLUDE_DIRS} ${ESP_USER_CONFIG_DIR}) -esp_gen_lib(esp_dht22 - ${ESP_CMAKE_FIND_DIR} - ${esp_gpio_LIBRARIES}) +target_link_libraries(esp_dht22 ${esp_gpio_LIBRARIES}) + +esp_gen_lib(esp_dht22) diff --git a/src/esp_ds18b20/CMakeLists.txt b/src/esp_ds18b20/CMakeLists.txt index f4bfcc0..fca5e86 100644 --- a/src/esp_ds18b20/CMakeLists.txt +++ b/src/esp_ds18b20/CMakeLists.txt @@ -31,8 +31,9 @@ target_include_directories(esp_ds18b20 PUBLIC ${esp_tim_INCLUDE_DIRS} ${ESP_USER_CONFIG_DIR}) -esp_gen_lib(esp_ds18b20 - ${ESP_CMAKE_FIND_DIR} +target_link_libraries(esp_ds18b20 ${esp_ow_LIBRARIES} ${esp_eb_LIBRARIES} ${esp_tim_LIBRARIES}) + +esp_gen_lib(esp_ds18b20) diff --git a/src/esp_sht21/CMakeLists.txt b/src/esp_sht21/CMakeLists.txt index 3181da8..0735e86 100644 --- a/src/esp_sht21/CMakeLists.txt +++ b/src/esp_sht21/CMakeLists.txt @@ -27,6 +27,6 @@ target_include_directories(esp_sht21 PUBLIC ${esp_i2c_INCLUDE_DIRS} ${ESP_USER_CONFIG_DIR}) -esp_gen_lib(esp_sht21 - ${ESP_CMAKE_FIND_DIR} - ${esp_i2c_LIBRARIES}) +target_link_libraries(esp_sht21 ${esp_i2c_LIBRARIES}) + +esp_gen_lib(esp_sht21)