mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-01 20:27:54 +08:00
Merge pull request #285 from lpapp/issue-268
Fix the freetype linker issue on Mac
This commit is contained in:
@@ -30,6 +30,8 @@ message(STATUS "Found ASSIMP in ${ASSIMP_INCLUDE_DIR}")
|
||||
# message(STATUS "Found SOIL in ${SOIL_INCLUDE_DIR}")
|
||||
# find_package(GLEW REQUIRED)
|
||||
# message(STATUS "Found GLEW in ${GLEW_INCLUDE_DIR}")
|
||||
find_package(Freetype REQUIRED)
|
||||
message(STATUS "Found Freetype in ${FREETYPE_INCLUDE_DIRS}")
|
||||
|
||||
if(WIN32)
|
||||
set(LIBS glfw3 opengl32 assimp freetype irrKlang)
|
||||
@@ -51,7 +53,7 @@ elseif(APPLE)
|
||||
FIND_LIBRARY(CoreVideo_LIBRARY CoreVideo)
|
||||
MARK_AS_ADVANCED(COCOA_LIBRARY OpenGL_LIBRARY)
|
||||
SET(APPLE_LIBS ${COCOA_LIBRARY} ${IOKit_LIBRARY} ${OpenGL_LIBRARY} ${CoreVideo_LIBRARY})
|
||||
SET(APPLE_LIBS ${APPLE_LIBS} ${GLFW3_LIBRARY} ${ASSIMP_LIBRARY})
|
||||
SET(APPLE_LIBS ${APPLE_LIBS} ${GLFW3_LIBRARY} ${ASSIMP_LIBRARY} ${FREETYPE_LIBRARIES})
|
||||
set(LIBS ${LIBS} ${APPLE_LIBS})
|
||||
else()
|
||||
set(LIBS )
|
||||
|
||||
@@ -28,7 +28,7 @@ Using [this project](https://github.com/01e9/docker-ide) you can start IDE in do
|
||||
## Mac OS X building
|
||||
Building on Mac OS X is fairly simple (thanks [@hyperknot](https://github.com/hyperknot)):
|
||||
```
|
||||
brew install cmake assimp glm glfw
|
||||
brew install cmake assimp glm glfw freetype
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../.
|
||||
|
||||
Reference in New Issue
Block a user