-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (43 loc) · 1.47 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
46
47
48
49
50
51
52
53
54
55
56
project(QRaster)
cmake_minimum_required(VERSION 2.8)
include (CheckCSourceCompiles)
include(CheckFunctionExists)
include(CheckIncludeFile)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
include(FindOpenGL)
if (OPENGL_FOUND)
#OpenGL lib
set(QRASTER_LIBRARIES ${QRASTER_LIBRARIES} ${OPENGL_LIBRARIES})
#Glew
add_definitions(-D_USEGLEW_)
add_definitions(-DGLEW_STATIC)
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src/gllibs/include/ )
set(QRASTER_SOURCES ${QRASTER_SOURCES} src/gllibs/glew/glew.c )
# glXGetProcAddress
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OPENGL_LIBRARIES})
check_function_exists(glXGetProcAddress GLXGETPROCADDRESS_OK)
if (GLXGETPROCADDRESS_OK)
add_definitions(-DHAVE_GLXGETPROCADDRESS=1)
endif()
endif (OPENGL_FOUND)
if (GLFW_FOUND)
include_directories( ${GLFW_INCLUDE_DIRS} )
set(QRASTER_LIBRARIES ${QRASTER_LIBRARIES} ${GLFW_LIBRARIES})
#set(QRASTER_HEADERS ${QRASTER_HEADERS} platform/glfw/platform.h
endif (GLFW_FOUND)
set(QRASTER_SOURCES ${QRASTER_SOURCES}
src/main.c
src/vdp1_compute.c
)
set(QRASTER_HEADERS ${QRASTER_HEADERS}
src/vdp1_compute.h
src/vdp1_prog_compute.h
src/standard_compute.h
src/sonic.h
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-trigraphs -O3")
set(QRASTER_LIBRARIES ${QRASTER_LIBRARIES} m)
add_executable(QRaster ${QRASTER_SOURCES} ${QRASTER_HEADERS} )
target_link_libraries(QRaster ${QRASTER_LIBRARIES})
install(TARGETS QRaster DESTINATION "bin")