From 1d579be7f2469afdc2074af29d96dece70a62daa Mon Sep 17 00:00:00 2001 From: Henrique Alves Date: Tue, 23 Apr 2024 23:40:55 +0300 Subject: Fix cmakelist for mac --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bb8e46..b41afcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,13 @@ target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCES}) target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE}) target_link_libraries(${PROJECT_NAME} PRIVATE raylib PkgConfig::GUILE_PKG) +# Checks if OSX and links appropriate frameworks (Only required on MacOS) +if (APPLE) + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework IOKit") + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa") + target_link_libraries(${PROJECT_NAME} PRIVATE "-framework OpenGL") +endif() + # Setting ASSETS_PATH target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="./assets/") target_compile_definitions(${PROJECT_NAME} PUBLIC SCRIPTS_PATH="./scripts/") -- cgit v1.2.3