Skip to content

Commit

Permalink
Merge pull request #128 from tony/freebsd-support
Browse files Browse the repository at this point in the history
Include /usr/local/include on BSD systems
  • Loading branch information
wjakob committed Sep 13, 2016
2 parents f7a9cf3 + b3bb44e commit 14d11f8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Expand Up @@ -138,6 +138,11 @@ if (NOT NANOGUI_EIGEN_INCLUDE_DIR)
list(APPEND NANOGUI_EXTRA_INCS "${NANOGUI_EIGEN_INCLUDE_DIR}")
endif()

if (${CMAKE_SYSTEM_NAME} MATCHES "BSD")
include_directories(/usr/local/include)
link_directories(/usr/local/lib)
endif()

# Required core libraries on various platforms
if (WIN32)
list(APPEND NANOGUI_EXTRA_LIBS opengl32)
Expand All @@ -148,8 +153,11 @@ elseif (APPLE)
find_library(iokit_library IOKit)
list(APPEND NANOGUI_EXTRA_LIBS ${cocoa_library} ${opengl_library} ${corevideo_library} ${iokit_library})
list(APPEND LIBNANOGUI_EXTRA_SOURCE src/darwin.mm)
elseif(CMAKE_SYSTEM MATCHES "Linux")
list(APPEND NANOGUI_EXTRA_LIBS GL Xxf86vm Xrandr Xinerama Xcursor Xi X11 pthread dl rt)
elseif(CMAKE_SYSTEM MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "BSD")
list(APPEND NANOGUI_EXTRA_LIBS GL Xxf86vm Xrandr Xinerama Xcursor Xi X11 pthread rt)
if(CMAKE_SYSTEM MATCHES "Linux")
list(APPEND NANOGUI_EXTRA_LIBS dl)
endif()
endif()

include_directories(${NANOGUI_EIGEN_INCLUDE_DIR} ext/glfw/include ext/nanovg/src include ${CMAKE_CURRENT_BINARY_DIR})
Expand Down

0 comments on commit 14d11f8

Please sign in to comment.