Umfeld on Homebrew
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)