diff options
| author | DanielG <[email protected]> | 2021-05-24 05:05:08 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-24 11:05:08 +0200 |
| commit | e5e401c640564381f8353ab9e2338e6f2cb3a498 (patch) | |
| tree | 95d3d8af57667d67e46528e5fddc00c335e77548 /projects | |
| parent | 6c874feb7bef71772859ae1804dbd60643f5dbc0 (diff) | |
| download | raylib-e5e401c640564381f8353ab9e2338e6f2cb3a498.tar.gz raylib-e5e401c640564381f8353ab9e2338e6f2cb3a498.zip | |
Fixed CMake linking on MacOS (#1783)
Added links to IOKit, Cocoa, and OpenGL to the CMake build file for MacOS platforms
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/CMake/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt index 496577e9..0876f0d5 100644 --- a/projects/CMake/CMakeLists.txt +++ b/projects/CMake/CMakeLists.txt @@ -34,4 +34,11 @@ add_executable(${PROJECT_NAME} core_basic_window.c) #set(raylib_VERBOSE 1) target_link_libraries(${PROJECT_NAME} raylib) +# Checks if OSX and links appropriate frameworks (Only required on MacOS) +if (APPLE) + target_link_libraries(${PROJECT_NAME} "-framework IOKit") + target_link_libraries(${PROJECT_NAME} "-framework Cocoa") + target_link_libraries(${PROJECT_NAME} "-framework OpenGL") +endif() + # That's it! You should have an example executable that you can run. Have fun! |
