CMakeLists.txt 1.22 KB
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
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)
Kirill Terekhov's avatar
Kirill Terekhov committed
23
  message("linking OctreeCutcell with mpi")
Kirill Terekhov's avatar
Kirill Terekhov committed
24
25
26
27
28
29
30
  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)

Kirill Terekhov's avatar
Kirill Terekhov committed
31

Kirill Terekhov's avatar
Kirill Terekhov committed
32
find_package(OpenGL)
Kirill Terekhov's avatar
Kirill Terekhov committed
33
find_package(GLUT)
Kirill Terekhov's avatar
Kirill Terekhov committed
34
35

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

Kirill Terekhov's avatar
Kirill Terekhov committed
49
install(TARGETS OctreeCutcell EXPORT inmost-targets RUNTIME DESTINATION bin/OctreeCutcell)
Kirill Terekhov's avatar
Kirill Terekhov committed
50
install(DIRECTORY Obj oil_obj2 DESTINATION bin/OctreeCutcell)