CMakeLists.txt 1.42 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
project(OldDrawGrid)
set(SOURCE main.cpp
           rotate.cpp
4
           clipboard.cpp
Kirill Terekhov's avatar
Kirill Terekhov committed
5
           rotate.h
6
           inc_glut.h
Kirill Terekhov's avatar
Kirill Terekhov committed
7
8
9
10
           clipboard.h
           color.h
           coord.h
           coord.cpp
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
           octree.h
           streamline.h
           streamline.cpp
           svg_line.h
           svg_line.cpp
           face2gl.h
           face2gl.cpp
		   color_bar.h
		   color_bar.cpp
		   printtext.cpp
		   tga.h
		   tga.cpp
		   screenshot.h
		   screenshot.cpp
		   volumetric.h
		   volumetric.cpp
		   input.h
		   input.cpp
		   picker.h
		   picker.cpp
		   clipper.h
		   clipper.cpp)
Kirill Terekhov's avatar
Kirill Terekhov committed
33
find_package(OpenGL)
Kirill Terekhov's avatar
Kirill Terekhov committed
34
find_package(GLUT)
Kirill Terekhov's avatar
Kirill Terekhov committed
35
36

if(OPENGL_FOUND)
Kirill Terekhov's avatar
Kirill Terekhov committed
37
38
39
40
41
42
43
44
45
46
47
48
  if(GLUT_FOUND)
    message("linking OldDrawGrid with GLUT and OpenGL")
    include_directories(${OPENGL_INCLUDE_DIR})
    include_directories(${GLUT_INCLUDE_DIR})
    add_executable(OldDrawGrid ${SOURCE})
    target_link_libraries(OldDrawGrid inmost ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
    if(USE_MPI)
      target_link_libraries(OldDrawGrid ${MPI_LIBRARIES}) 
      if(MPI_LINK_FLAGS)
        set_target_properties(OldDrawGrid PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
      endif() 
    endif(USE_MPI)
Kirill Terekhov's avatar
Fixes    
Kirill Terekhov committed
49
    install(TARGETS OldDrawGrid EXPORT inmost-targets RUNTIME DESTINATION bin)
Kirill Terekhov's avatar
Kirill Terekhov committed
50
51
52
  else(GLUT_FOUND)
    message("GLUT not found, not building OldDrawGrid")
  endif(GLUT_FOUND)
Kirill Terekhov's avatar
Kirill Terekhov committed
53
else(OPENGL_FOUND)
Kirill Terekhov's avatar
Kirill Terekhov committed
54
  message("OpenGL not found, not building OldDrawGrid")
Kirill Terekhov's avatar
Kirill Terekhov committed
55
endif(OPENGL_FOUND)