CMakeLists.txt 1011 Bytes
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
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
project(OctreeCutcell)
set(SOURCE main.cpp
           rotate.cpp
           rotate.h
	   tree.cpp
	   tree.h
	   triang.cpp
	   triang.h
	   gettype.hpp
	   obj.cpp
	   obj.h
	   octgrid.cpp
	   octgrid.h
	   point.h
	   proj.hpp
           my_glut.h)


add_executable(OctreeCutcell ${SOURCE})

target_link_libraries(OctreeCutcell inmost)


if(USE_MPI)
  message("linking with mpi")
  target_link_libraries(OctreeCutcell ${MPI_LIBRARIES}) 
  if(MPI_LINK_FLAGS)
    message("adding link flags")
    set_target_properties(OctreeCutcell PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
  endif() 
endif(USE_MPI)

find_package(OpenGL)
Kirill Terekhov's avatar
Kirill Terekhov committed
34
find_package(GLUT)
Kirill Terekhov's avatar
Kirill Terekhov committed
35
36
37

if(OPENGL_FOUND)
	if(GLUT_FOUND)
Kirill Terekhov's avatar
Kirill Terekhov committed
38
39
		include_directories(${OPENGL_INCLUDE_DIR})
		include_directories(${GLUT_INCLUDE_DIR})
Kirill Terekhov's avatar
Kirill Terekhov committed
40
		add_definitions(-D__GRAPHICS__)
Kirill Terekhov's avatar
Kirill Terekhov committed
41
		target_link_libraries(OctreeCutcell ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
Kirill Terekhov's avatar
Kirill Terekhov committed
42
43
44
45
46
47
48
	else(GLUT_FOUND)
		message("GLUT not found")
	endif(GLUT_FOUND)
else(OPENGL_FOUND)
	message("OpenGL not found")
endif(OPENGL_FOUND)