-
-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Description
I had this issue in my local environment when I tried to compile for ESP32 S3 in my own demo project (https://github.com/goiaba-io/libpeer-demo):
CMake Error at /Users/renan.prata/esp/esp-idf/tools/cmake/component.cmake:228 (message):
CMake Warning (dev) at build_properties.temp.cmake:8:
Syntax Warning in cmake code at column 106
Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
/Users/renan.prata/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:3 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error at
/Users/renan.prata/esp/goiaba/components/libpeer/CMakeLists.txt:1
(cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
Call Stack (most recent call first):
/Users/renan.prata/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:107 (include)
/Users/renan.prata/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:160 (__component_get_requirements)
Call Stack (most recent call first):
/Users/renan.prata/esp/esp-idf/tools/cmake/build.cmake:644 (__component_get_requirements)
/Users/renan.prata/esp/esp-idf/tools/cmake/project.cmake:717 (idf_build_process)
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /Users/renan.prata/esp/goiaba/libpeer-demo/build/log/idf_py_stderr_output_51007 and /Users/renan.prata/esp/goiaba/libpeer-demo/build/log/idf_py_stdout_output_51007
make: *** [set-target] Error 2
To resolve this issue I need to apply this patch in libpeer project:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a14c9aa..83789d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.16)
+cmake_policy(VERSION 3.16)
include(${CMAKE_CURRENT_LIST_DIR}/third_party/coreHTTP/httpFilePaths.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/third_party/coreMQTT/mqttFilePaths.cmake)
@@ -8,7 +9,7 @@ if (DEFINED ENV{IDF_PATH})
idf_component_register(
SRCS ${ESP32_CODES} ${HTTP_SOURCES} ${MQTT_SOURCES} ${MQTT_SERIALIZER_SOURCES}
INCLUDE_DIRS "./include" ${HTTP_INCLUDE_PUBLIC_DIRS} ${MQTT_INCLUDE_PUBLIC_DIRS}
- PRIV_INCLUDE_DIRS "./src"
+ PRIV_INCLUDE_DIRS "./src"
REQUIRES mbedtls srtp json esp_netif
)
add_definitions("-DCONFIG_USE_LWIP=1" "-DCONFIG_USE_USRSCTP=0" "-DCONFIG_AUDIO_BUFFER_SIZE=8096" "-DCONFIG_DATA_BUFFER_SIZE=102400" "-D__BYTE_ORDER=__LITTLE_ENDIAN" "-DHTTP_DO_NOT_USE_CUSTOM_CONFIG" "-DMQTT_DO_NOT_USE_CUSTOM_CONFIG")
Can I create a MR to update CMAKE minimum version or there's something in this project that we need to keep cmake minimum 3.1? A good point is that the ESP32 example is using CMAKE 3.19.
Metadata
Metadata
Assignees
Labels
No labels