Skip to content

Commit

Permalink
Hopefully fix on newer OSX versions
Browse files Browse the repository at this point in the history
  • Loading branch information
topisani committed Aug 21, 2018
1 parent 4e02e96 commit 6178cd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boards/parts/ui/glfw/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ gl3w_gen("${OTTO_EXTERNAL_DIR}/")

# GLFW
find_package(glfw3)
if (glfw3_FOUND)
if (NOT glfw3_FOUND)
message("Using system GLFW")
target_link_libraries(glfw INTERFACE dl)
if(NOT APPLE)
target_link_libraries(glfw INTERFACE dl)
endif()
else()
message("GLFW not found, building from source")
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build GLFW examples")
Expand All @@ -16,3 +18,4 @@ else()
endif()

target_link_libraries(otto PUBLIC glfw)

2 changes: 2 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ if (APPLE)
find_package(OpenGL)
target_include_directories(nanovg SYSTEM INTERFACE ${OPENGL_INCLUDE_DIR})
target_link_libraries(nanovg INTERFACE ${OPENGL_LIBRARIES})
find_library(CORE_FOUNDATION CoreFoundation)
target_link_libraries(external ${CORE_FOUNDATION})
endif()

# NanoCanvas
Expand Down

0 comments on commit 6178cd8

Please sign in to comment.