From f937afb71aee841607f87a7f8bbd9783581fbd30 Mon Sep 17 00:00:00 2001 From: micknoise Date: Sat, 4 Jan 2025 15:57:20 +0000 Subject: [PATCH] update CMakeLists.txt --- cpp/commandline/CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cpp/commandline/CMakeLists.txt b/cpp/commandline/CMakeLists.txt index 37cf7f3c..8e951b1b 100644 --- a/cpp/commandline/CMakeLists.txt +++ b/cpp/commandline/CMakeLists.txt @@ -17,9 +17,17 @@ if (LINUX) add_definitions(-D__LINUX_ALSA__) endif() -if (OSX) - MESSAGE(STATUS "OSX build") - target_link_libraries(maximilian PUBLIC -lasound) +if (APPLE) + MESSAGE(STATUS "Configuring for macOS build") + + # Add macOS frameworks + target_link_libraries(maximilian PUBLIC + "-framework CoreAudio" + "-framework CoreFoundation" + "-framework CoreMidi" + ) + + # Define a macOS-specific macro add_definitions(-D__MACOSX_CORE__) - #incomplete - need to add frameworks -framework CoreAudio -framework CoreFoundation + endif()