Some minor changes to build files to get this to build and run on macOS.

This commit is contained in:
Alex Grant Benedict 2021-11-22 17:41:02 -07:00
parent 1c6edca7f6
commit 769f7ebe8b
2 changed files with 8 additions and 3 deletions

View file

@ -643,6 +643,11 @@ endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
if(APPLE)
list(APPEND CMAKE_PREFIX_PATH /opt/homebrew/)
endif()
find_package(Lua51 REQUIRED)
find_package(PNG REQUIRED)
find_package(SDL2 REQUIRED)

View file

@ -42,9 +42,9 @@ if(SDL2_LIBRARY_TEMP)
# I think it has something to do with the CACHE STRING.
# So I use a temporary variable until the end so I can set the
# "real" variable in one-shot.
if(APPLE)
set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
endif()
#if(APPLE)
# set(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
#endif()
# For threads, as mentioned Apple doesn't need this.
# In fact, there seems to be a problem if I used the Threads package