This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 5f1100d02 audioutils: Add CMake build support for morsey and rtttl-c
5f1100d02 is described below

commit 5f1100d02dd02ac72272508cf13d24c76be6e4ed
Author: Swatantra Yadav <[email protected]>
AuthorDate: Mon Oct 26 01:17:58 2026 +0530

    audioutils: Add CMake build support for morsey and rtttl-c
    
    Closes the CMake build-system parity gap in apps/audioutils:
    - audioutils/morsey: Adds CMakeLists.txt with FetchContent tarball
      download, public header symlinking, and library integration into apps.
    - audioutils/rtttl-c: Adds CMakeLists.txt with FetchContent shallow
      clone, public header symlinking, and library integration into apps.
    - Follows standard NuttX FetchContent conventions matching other
      submodules, with preapps configuration safety and public header
      symlink generation under include/audioutils.
    
    Signed-off-by: Swatantra Yadav <[email protected]>
---
 audioutils/morsey/CMakeLists.txt  | 49 +++++++++++++++++++++++++++++++++++++
 audioutils/rtttl-c/CMakeLists.txt | 51 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/audioutils/morsey/CMakeLists.txt b/audioutils/morsey/CMakeLists.txt
new file mode 100644
index 000000000..6aab2d089
--- /dev/null
+++ b/audioutils/morsey/CMakeLists.txt
@@ -0,0 +1,49 @@
+# 
##############################################################################
+# apps/audioutils/morsey/CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+if(CONFIG_AUDIOUTILS_MORSEY)
+  include(FetchContent)
+
+  set(MORSEY_DIR ${CMAKE_CURRENT_LIST_DIR}/morsey)
+
+  if(NOT EXISTS ${MORSEY_DIR})
+    FetchContent_Declare(
+      morsey_fetch
+      URL https://github.com/linguini1/morsey/archive/refs/tags/v1.0.1.tar.gz
+          SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/morsey BINARY_DIR
+          ${CMAKE_CURRENT_BINARY_DIR}/morsey
+      DOWNLOAD_NO_PROGRESS true
+      TIMEOUT 30)
+
+    FetchContent_GetProperties(morsey_fetch)
+    if(NOT morsey_fetch_POPULATED)
+      FetchContent_Populate(morsey_fetch)
+    endif()
+  endif()
+
+  if(TARGET apps)
+    file(MAKE_DIRECTORY ${NUTTX_APPS_BINDIR}/include/audioutils)
+    nuttx_create_symlink(${MORSEY_DIR}/morsey.h
+                         ${NUTTX_APPS_BINDIR}/include/audioutils/morsey.h)
+
+    target_sources(apps PRIVATE ${MORSEY_DIR}/morsey.c)
+    target_include_directories(apps PRIVATE ${MORSEY_DIR})
+  endif()
+endif()
diff --git a/audioutils/rtttl-c/CMakeLists.txt 
b/audioutils/rtttl-c/CMakeLists.txt
new file mode 100644
index 000000000..83344f6e6
--- /dev/null
+++ b/audioutils/rtttl-c/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 
##############################################################################
+# apps/audioutils/rtttl-c/CMakeLists.txt
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more 
contributor
+# license agreements.  See the NOTICE file distributed with this work for
+# additional information regarding copyright ownership.  The ASF licenses this
+# file to you under the Apache License, Version 2.0 (the "License"); you may 
not
+# use this file except in compliance with the License.  You may obtain a copy 
of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+#
+# 
##############################################################################
+
+if(CONFIG_AUDIOUTILS_RTTTL_C)
+  include(FetchContent)
+
+  set(RTTTL_DIR ${CMAKE_CURRENT_LIST_DIR}/rtttl-c)
+
+  if(NOT EXISTS ${RTTTL_DIR})
+    FetchContent_Declare(
+      rtttl_c_fetch
+      GIT_REPOSITORY https://git.sr.ht/~qeef/rtttl-c
+      GIT_TAG v0.1.0
+      GIT_SHALLOW TRUE
+      SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/rtttl-c BINARY_DIR
+      ${CMAKE_CURRENT_BINARY_DIR}/rtttl-c
+      DOWNLOAD_NO_PROGRESS true
+      TIMEOUT 30)
+
+    FetchContent_GetProperties(rtttl_c_fetch)
+    if(NOT rtttl_c_fetch_POPULATED)
+      FetchContent_Populate(rtttl_c_fetch)
+    endif()
+  endif()
+
+  if(TARGET apps)
+    file(MAKE_DIRECTORY ${NUTTX_APPS_BINDIR}/include/audioutils)
+    nuttx_create_symlink(${RTTTL_DIR}/rtttl.h
+                         ${NUTTX_APPS_BINDIR}/include/audioutils/rtttl.h)
+
+    target_sources(apps PRIVATE ${RTTTL_DIR}/rtttl.c)
+    target_include_directories(apps PRIVATE ${RTTTL_DIR})
+  endif()
+endif()

Reply via email to