Skip to content

Commit

Permalink
find_glfw3: more future proof way of finding glfw3 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored May 28, 2018
1 parent 594839a commit bd96115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ include_directories(${OpenGL_INCLUDE_DIR})
find_package(GLEW REQUIRED)
include_directories(${GLEW_INCLUDE_DIRS})
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
include_directories(${GLFW_INCLUDE_DIRS})
find_package(glfw3 REQUIRED)
include_directories(${GLFW3_INCLUDE_DIR})

#-----------------------------------------------------------------------------
# BUILD TYPES & FLAGS
Expand Down Expand Up @@ -114,11 +114,9 @@ target_link_libraries(voidstar
m
${OPENGL_gl_LIBRARY}
${GLEW_LIBRARIES}
${GLFW_STATIC_LIBRARIES} # This needs manual addition of ${GLFW_STATIC_LDFLAGS}
glfw
${EXTRA_LIBS}
)
string(REPLACE ";" " " glfw_static_ldflags "${GLFW_STATIC_LDFLAGS}")
set_property(TARGET voidstar APPEND_STRING PROPERTY LINK_FLAGS "${glfw_static_ldflags}")

#-----------------------------------------------------------------------------
# PACKAGING
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ https://github.com/fenollp/voidstar/issues/2
### Debian

```shell
sudo apt install libglew-dev libglm-dev libglfw3-dev
sudo apt install libglew-dev libglm-dev libglfw3-dev pkg-config
```

### OSX
Expand Down

0 comments on commit bd96115

Please sign in to comment.