From 8479aef7738e7ff25da959a6c8f3ee34df49995f Mon Sep 17 00:00:00 2001 From: Marcus Minhorst Date: Sat, 20 Sep 2025 19:55:37 -0400 Subject: [PATCH] Update macos search paths --- CMakeLists.txt | 2 ++ cmake/FindSDL2.cmake | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87177cece..0332f91ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -310,6 +310,8 @@ else() set( DEB_C_FLAGS "" ) if( APPLE ) + list(PREPEND CMAKE_PREFIX_PATH "/opt/local") # port + list(PREPEND CMAKE_PREFIX_PATH "/opt/homebrew") # brew set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13") if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" ) # If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc. diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index 02c6bba06..00157979d 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -20,7 +20,6 @@ # this module will try to find on your behalf.) Also for OS X, this # module will automatically add the -framework Cocoa on your behalf. # -# # Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration # and no SDL2_LIBRARY, it means CMake did not find your SDL2 library # (SDL2.dll, libsdl2.so, SDL2.framework, etc). @@ -29,7 +28,6 @@ # as appropriate. These values are used to generate the final SDL2_LIBRARY # variable, but when these values are unset, SDL2_LIBRARY does not get created. # -# # $SDL2DIR is an environment variable that would # correspond to the ./configure --prefix=$SDL2DIR # used in building SDL2. @@ -72,8 +70,9 @@ FIND_PATH(SDL2_INCLUDE_DIR SDL.h /sw # Fink /opt/local # DarwinPorts /opt/csw # Blastwave + /opt/homebrew /opt - /boot/system/develop/headers/SDL2 #Hiaku OS + /boot/system/develop/headers/SDL2 #Haiku OS ) #MESSAGE("SDL2_INCLUDE_DIR is ${SDL2_INCLUDE_DIR}") @@ -86,10 +85,10 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP /sw /opt/local /opt/csw + /opt/homebrew /opt - /system/lib #Hiaku OS + /system/lib #Haiku OS ) - #MESSAGE("SDL2_LIBRARY_TEMP is ${SDL2_LIBRARY_TEMP}") IF(NOT SDL2_BUILDING_LIBRARY) @@ -107,6 +106,7 @@ IF(NOT SDL2_BUILDING_LIBRARY) /sw /opt/local /opt/csw + /opt/homebrew /opt ) ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")