blob: 4da7c84e0537034cda3d1fbcca7a4174366531d6 [file] [log] [blame]
Courtney Goeltzenleuchter3f2606d2014-10-13 17:51:58 -06001pkg_check_modules(XCB REQUIRED xcb)
2if (NOT XCB_FOUND)
3 message(FATAL_ERROR "xcb not found")
Chia-I Wuc19795a2014-09-13 11:12:55 +08004endif()
Courtney Goeltzenleuchter4825f6a2014-10-28 10:27:47 -06005if(NOT EXISTS /usr/include/glm/glm.hpp)
6 message(FATAL_ERROR "Necessary libglm-dev headers cannot be found: sudo apt-get install libglm-dev")
7endif()
Courtney Goeltzenleuchter17223602014-10-29 15:59:49 -06008if(NOT EXISTS /usr/include/png.h)
9 message(FATAL_ERROR "Necessary png12-dev headers cannot be found: sudo apt-get install png12-dev")
10endif()
Courtney Goeltzenleuchter4825f6a2014-10-28 10:27:47 -060011
Courtney Goeltzenleuchterd72c6192014-10-29 16:25:34 -060012file(GLOB TEXTURES
13 "${PROJECT_SOURCE_DIR}/demos/*.png"
14 )
15file(COPY ${TEXTURES} DESTINATION ${CMAKE_BINARY_DIR}/demos)
Courtney Goeltzenleuchter3f2606d2014-10-13 17:51:58 -060016
17include_directories (
18 ${XCB_INCLUDE_DIRS}
19 "${PROJECT_SOURCE_DIR}/icd/common"
20 )
21
22link_directories(${XCB_LIBRARY_DIRS})
Courtney Goeltzenleuchter17223602014-10-29 15:59:49 -060023link_libraries(${XCB_LIBRARIES} XGL png m)
Courtney Goeltzenleuchter3f2606d2014-10-13 17:51:58 -060024
25add_executable(tri tri.c)
26target_link_libraries(tri)
Courtney Goeltzenleuchter4e8246e2014-10-23 13:16:59 -060027
28add_executable(cube cube.c)
29target_link_libraries(cube)