-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
35 lines (26 loc) · 960 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
project(fluidSim)
cmake_minimum_required(VERSION 2.8)
# Useful CMake options for Qt projects
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_FLAGS "-std=c++0x")
cmake_policy(SET CMP0004 OLD)
# Search desired Qt packages
find_package(OpenGL REQUIRED)
find_package(SDL2 REQUIRED)
find_package(GLEW REQUIRED)
find_package(glm REQUIRED)
set(INCLUDE_DIRS ${INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
set(LIBS ${LIBS} ${OPENGL_LIBRARY} ${SDL2_LIBRARIES} ${GLEW_LIBRARIES})
#specify include directory
include_directories(INCLUDE_DIRS ${INCLUDE_DIRS} include)
set( project_sources
fluidSim.cpp
ShaderProgram.hpp
)
add_executable(${PROJECT_NAME} fluidSim.cpp)
target_link_libraries(${PROJECT_NAME} ${LIBS})
#Now copy shaders to build directory
add_custom_target(copy-runtime-files ALL
COMMAND cmake -E copy_directory ${CMAKE_SOURCE_DIR}/shaders ${CMAKE_BINARY_DIR}
DEPENDS ${MY_TARGET})