]> granicus.if.org Git - esp-idf/commitdiff
bt: Fix unit tests build with CMake
authorAnton Maklakov <anton@espressif.com>
Mon, 19 Nov 2018 11:04:42 +0000 (19:04 +0800)
committerAnton Maklakov <anton@espressif.com>
Wed, 28 Nov 2018 07:19:04 +0000 (15:19 +0800)
components/bt/test/CMakeLists.txt

index c8c2dda4b9022332cb5781bce9dd61cf0a4775af..e59c45744a879f0e117784689867e07030cab3dc 100644 (file)
@@ -1,8 +1,7 @@
-if(CONFIG_BT_ENABLED)
+if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION)
     set(COMPONENT_SRCDIRS ".")
     set(COMPONENT_ADD_INCLUDEDIRS ".")
-endif()
-
-set(COMPONENT_REQUIRES unity nvs_flash bt)
+    set(COMPONENT_REQUIRES unity nvs_flash bt)
 
-register_component()
+    register_component()
+endif()