2025-11-03--Umfeld-on-Homebrew.png this is actually exciting! Umfeld can now be installed with Homebrew.

the benefits are a leaner installation process as well as a much faster build time. the downside is that a few options are not available that might be relevant especially for development ( e.g OpenGL ES 3.0 on macOS or disabling specific dependencies like FFmpeg or PortAudio ).

the package is not part of the main homebrew distribution yet ( but i am considering it ). until then you need to tap the Umfeld formular before installing it. the installation process is as follows:

brew tap Umfeld/umfeld https://codeberg.org/Umfeld/homebrew-umfeld
brew install Umfeld/umfeld/umfeld

there is also an example in umfeld-examples that makes use of the homebrew version. to compile and run it do the following:

cd umfeld-examples/Advanced/homebrew
cmake -B build
cmake --build build --parallel
./build/homebrew

Using the Homebrew Version in CMake Script

after installing Umfeld with Homebrew using the library is quite simple. just add the following lines to a CMake script:

find_package(Umfeld REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Umfeld::umfeld-lib-interface Umfeld::umfeld-lib)

a complete CMake script might look like this:

cmake_minimum_required(VERSION 3.20)
project(my-project)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include_directories(".")
file(GLOB SOURCE_FILES "*.cpp")
add_executable(${PROJECT_NAME} ${SOURCE_FILES})

find_package(Umfeld REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE Umfeld::umfeld-lib-interface Umfeld::umfeld-lib)

UPDATE

after playing with this a bit i was suddenly confronted with a broken CMake build system that produced dubious errors like this:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstring:69:5: 
           error: <cstring> tried including <string.h> but didn't find libc++'s <string.h> header.
           This usually means that your header search paths are not configured properly.
           The header search paths should contain the C++ Standard Library headers before
           any C Standard Library, and you are probably using compiler flags that make that
           not be the case.
  69 | #   error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \
     |     ^

if you ever run into a similar problem, it seems that removing all build folders and then running ccache --clear does the job. also make sure that no stray environment variables are set. in my case i also had to manually unset CXXFLAGS with unset CXXFLAGS