mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
CMakeList updated + Readme
Merged changes from Inner_Product s.t. makelist still works as it did before, now with proper Linux libraries.
This commit is contained in:
@@ -4,9 +4,13 @@ cmake_policy(VERSION 2.8)
|
|||||||
|
|
||||||
project (LearnOpenGL)
|
project (LearnOpenGL)
|
||||||
|
|
||||||
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib )
|
IF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
|
||||||
|
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||||
|
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib )
|
||||||
|
|
||||||
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
|
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
|
||||||
|
|
||||||
@@ -14,11 +18,11 @@ list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
|
|||||||
# ADD_CUSTOM_TARGET(release ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=Release ${PROJECT_SOURCE_DIR})
|
# ADD_CUSTOM_TARGET(release ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=Release ${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(LIBS glfw3 opengl32 glew32s SOIL assimp)
|
set(LIBS glfw3 opengl32 glew32s SOIL assimp)
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
set(LIBS gl X11 rt dl)
|
set(LIBS GL X11 glfw GLEW SOIL assimp rt dl)
|
||||||
else()
|
else()
|
||||||
set(LIBS )
|
set(LIBS )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -1,5 +1,13 @@
|
|||||||
# learnopengl.com code repository
|
# learnopengl.com code repository
|
||||||
Contains code samples for all tutorials of [http://learnopengl.com](http://learnopengl.com).
|
Contains code samples for all tutorials of [http://learnopengl.com](http://learnopengl.com).
|
||||||
|
|
||||||
For more info see http://learnopengl.com/#!Code-repository
|
The CMakeLists.txt is not yet finished for Linux/OS X; for more info see http://learnopengl.com/#!Code-repository
|
||||||
|
|
||||||
|
## Windows building
|
||||||
|
All relevant libraries are found in /libs and all DLLs found in /dlls (pre-)compiled for Windows.
|
||||||
|
The CMake script knows where to find the libraries so just run CMake script and generate project of choice.
|
||||||
|
Note that you still have to manually copy the required .DLL files from the /dlls folder to your binary folder for the binaries to run.
|
||||||
|
|
||||||
|
## Linux building
|
||||||
|
First get the required packages:
|
||||||
|
Use root (sudo) and type `apt-get install libsoil-dev libglm-dev libassimp-dev libglew-dev libglfw-dev`
|
||||||
Reference in New Issue
Block a user