瀏覽代碼

Fixed CMake linking on MacOS (#1783)

Added links to IOKit, Cocoa, and OpenGL to the CMake build file for MacOS platforms
pull/1788/head
DanielG 4 年之前
committed by GitHub
父節點
當前提交
e5e401c640
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      projects/CMake/CMakeLists.txt

+ 7
- 0
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!

Loading…
取消
儲存