CMakeLists.txt 892 Bytes
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
project(DrawMatrix)
set(SOURCE main.cpp my_glut.h)
find_package(OpenGL)
Kirill Terekhov's avatar
Kirill Terekhov committed
4
find_package(GLUT)
Kirill Terekhov's avatar
Kirill Terekhov committed
5
6
7

if(OPENGL_FOUND)
	if(GLUT_FOUND)
Kirill Terekhov's avatar
Kirill Terekhov committed
8
9
		include_directories(${OPENGL_INCLUDE_DIR})
		include_directories(${GLUT_INCLUDE_DIR})
Kirill Terekhov's avatar
Kirill Terekhov committed
10
		add_executable(DrawMatrix ${SOURCE})
Kirill Terekhov's avatar
Kirill Terekhov committed
11
12
13
14
15
16
17
		target_link_libraries(DrawMatrix inmost ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
		if(USE_MPI)
		  target_link_libraries(DrawMatrix ${MPI_LIBRARIES}) 
		  if(MPI_LINK_FLAGS)
            set_target_properties(DrawMatrix PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
            endif() 
		endif(USE_MPI)
Kirill Terekhov's avatar
Kirill Terekhov committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
		if(USE_SOLVER_ANI3D)
			target_link_libraries(DrawMatrix ani3d)
		endif()
		if(USE_SOLVER_PETSC)
			add_definitions(${PETSC_DEFINITIONS})
			target_link_libraries(DrawMatrix ${PETSC_LIBRARIES})
		endif()
	else(GLUT_FOUND)
		message("GLUT not found")
	endif(GLUT_FOUND)
else(OPENGL_FOUND)
	message("OpenGL not found")
endif(OPENGL_FOUND)