From 5815f41b7775c44cd41c03854e0980fd9482911f Mon Sep 17 00:00:00 2001 From: Tat Leung Date: Sun, 24 Dec 2023 21:45:00 -0800 Subject: [PATCH] changed CMAKE_CURRENT_LIST_DIR to HOMEKIT_PATH in examples CMakeLists.txt file so examples can be copied to directories outside the examples directory --- examples/aws-iot/CMakeLists.txt | 2 +- examples/bridge/CMakeLists.txt | 2 +- examples/data_tlv8/CMakeLists.txt | 2 +- examples/emulator/CMakeLists.txt | 2 +- examples/fan/CMakeLists.txt | 2 +- examples/lightbulb/CMakeLists.txt | 2 +- examples/smart_outlet/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/aws-iot/CMakeLists.txt b/examples/aws-iot/CMakeLists.txt index b27e59a..4296ea0 100644 --- a/examples/aws-iot/CMakeLists.txt +++ b/examples/aws-iot/CMakeLists.txt @@ -15,7 +15,7 @@ if(NOT DEFINED ENV{AWS_IOT_PATH}) message(FATAL_ERROR "Please set AWS_IOT_PATH to esp-aws-iot repo") endif(NOT DEFINED ENV{AWS_IOT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit $ENV{AWS_IOT_PATH}/../ ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit $ENV{AWS_IOT_PATH}/../ ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(aws-iot) diff --git a/examples/bridge/CMakeLists.txt b/examples/bridge/CMakeLists.txt index 9deb0ae..1921365 100644 --- a/examples/bridge/CMakeLists.txt +++ b/examples/bridge/CMakeLists.txt @@ -8,7 +8,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(bridge) diff --git a/examples/data_tlv8/CMakeLists.txt b/examples/data_tlv8/CMakeLists.txt index 4daa629..b70cd3d 100644 --- a/examples/data_tlv8/CMakeLists.txt +++ b/examples/data_tlv8/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(data_tlv8) diff --git a/examples/emulator/CMakeLists.txt b/examples/emulator/CMakeLists.txt index a5990fc..b4f9e6f 100644 --- a/examples/emulator/CMakeLists.txt +++ b/examples/emulator/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(emulator) diff --git a/examples/fan/CMakeLists.txt b/examples/fan/CMakeLists.txt index 6a2fb34..184d3d6 100644 --- a/examples/fan/CMakeLists.txt +++ b/examples/fan/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(fan) diff --git a/examples/lightbulb/CMakeLists.txt b/examples/lightbulb/CMakeLists.txt index b5757b2..f3722fc 100644 --- a/examples/lightbulb/CMakeLists.txt +++ b/examples/lightbulb/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(lightbulb) diff --git a/examples/smart_outlet/CMakeLists.txt b/examples/smart_outlet/CMakeLists.txt index 950a8f8..dfca2f4 100644 --- a/examples/smart_outlet/CMakeLists.txt +++ b/examples/smart_outlet/CMakeLists.txt @@ -11,7 +11,7 @@ else() set(HOMEKIT_PATH ${CMAKE_CURRENT_LIST_DIR}/../..) endif(DEFINED ENV{HOMEKIT_PATH}) -set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${CMAKE_CURRENT_LIST_DIR}/../common) +set(EXTRA_COMPONENT_DIRS ${HOMEKIT_PATH}/components ${HOMEKIT_PATH}/components/homekit ${HOMEKIT_PATH}/examples/common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(smart_outlet)