-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (34 loc) · 1.5 KB
/
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
36
37
38
39
40
41
42
43
44
45
project(graphics_asgn2)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(src SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
include(FindPkgConfig)
pkg_check_modules(GLFW3 REQUIRED glfw3)
include_directories(${GLFW3_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${GLFW3_LIBRARIES})
pkg_check_modules(GLEW REQUIRED glew)
include_directories(${GLEW_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${GLEW_LIBRARIES})
if (NOT APPLE)
pkg_check_modules(GL REQUIRED gl)
include_directories(${GL_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${GL_LIBRARIES})
endif()
if (APPLE)
target_link_libraries(${PROJECT_NAME} "-framework OpenGL")
endif()
# find_package(Threads REQUIRED)
target_link_libraries(${PROJECT_NAME} pthread)
target_link_libraries(${PROJECT_NAME} SOIL)
pkg_check_modules(AO REQUIRED ao)
include_directories(${AO_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${AO_LIBRARIES})
pkg_check_modules(LIBMPG123 REQUIRED libmpg123)
include_directories(${LIBMPG123_INCLUDE_DIRS})
target_link_libraries (${PROJECT_NAME} ${LIBMPG123_LIBRARIES})
configure_file(src/Sample_GL.vert Sample_GL.vert COPYONLY)
configure_file(src/Sample_GL.frag Sample_GL.frag COPYONLY)
configure_file(src/TextureRender.vert TextureRender.vert COPYONLY)
configure_file(src/TextureRender.frag TextureRender.frag COPYONLY)
configure_file(src/TextVertexShader.vertexshader TextVertexShader.vertexshader COPYONLY)
configure_file(src/TextVertexShader.fragmentshader TextVertexShader.fragmentshader COPYONLY)