Skip to content

Commit b2999d2

Browse files
author
Youssef Abukwaik
committed
Linux / macOS fixes
1 parent 69efed2 commit b2999d2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (WIN32 OR APPLE)
1212
include(glfw)
1313
else() # Linux
1414
find_package(glfw3 REQUIRED)
15-
set(GLFW_LIBRARIES ${GLFW3_LIBRARY})
15+
set(GLFW_LIBRARIES glfw)
1616
endif()
1717

1818
find_package(OpenGL REQUIRED)

cmake/glfw.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ else()
3030
set(GLFW_INCLUDE_DIR ${INSTALL_DIR}/include)
3131
set(GLFW_LIBRARIES
3232
${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}glfw3${CMAKE_STATIC_LIBRARY_SUFFIX})
33+
34+
if(APPLE)
35+
list(APPEND GLFW_LIBRARIES -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo)
36+
endif()
3337
endif()
3438

3539
set(GLFW_INCLUDE_DIR ${GLFW_INCLUDE_DIR} CACHE STRING "")

0 commit comments

Comments
 (0)