mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-18 13:41:26 +01:00
Fixed CMake linking on MacOS (#1783)
Added links to IOKit, Cocoa, and OpenGL to the CMake build file for MacOS platforms
This commit is contained in:
@ -34,4 +34,11 @@ add_executable(${PROJECT_NAME} core_basic_window.c)
|
|||||||
#set(raylib_VERBOSE 1)
|
#set(raylib_VERBOSE 1)
|
||||||
target_link_libraries(${PROJECT_NAME} raylib)
|
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!
|
# That's it! You should have an example executable that you can run. Have fun!
|
||||||
|
|||||||
Reference in New Issue
Block a user