Blame view

CMakeLists.txt 2.99 KB
18fad6bc   David Mayerich   big fixes and cha...
1
  #Specify the version being used as well as the language
66c20862   pranathivemuri   external librarie...
2
3
4
  cmake_minimum_required(VERSION 2.8.11)
  
  #Name your project here
18fad6bc   David Mayerich   big fixes and cha...
5
  project(netmets)
66c20862   pranathivemuri   external librarie...
6
7
8
9
  
  #set the module directory
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
  
66c20862   pranathivemuri   external librarie...
10
  #find the STIM library
18fad6bc   David Mayerich   big fixes and cha...
11
12
13
14
15
16
17
18
19
  find_package(STIM)
  
  #if the STIM library isn't found, download it
  if(NOT STIM_INCLUDE_DIRS)
  	file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/stimlib)	#remove the stimlib directory if it exists
  	set(STIM_GIT "https://git.stim.ee.uh.edu/codebase/stimlib.git")
  	execute_process(COMMAND git clone --depth 1 ${STIM_GIT} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
  	set(STIM_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/stimlib" CACHE TYPE PATH)
  endif(NOT STIM_INCLUDE_DIRS)
66c20862   pranathivemuri   external librarie...
20
21
22
23
  
  #find BOOST
  find_package(Boost REQUIRED)
  
94a07643   David Mayerich   removed ANN
24
25
26
  #find cuda
  find_package(CUDA REQUIRED)
  
627eed8d   David Mayerich   added a GUI for d...
27
28
  #find the GLUT library for visualization
  find_package(OpenGL REQUIRED)
d1ab3c93   Pavel Govyadinov   Changes to get ne...
29
  
627eed8d   David Mayerich   added a GUI for d...
30
31
  find_package(GLUT REQUIRED)
  
66c20862   pranathivemuri   external librarie...
32
33
34
35
36
37
  #find the pthreads package
  find_package(Threads)
  
  #find the X11 package
  find_package(X11)
  
66c20862   pranathivemuri   external librarie...
38
  #find the Approximate Nearest Neighbor Library
94a07643   David Mayerich   removed ANN
39
  #find_package(ANN REQUIRED)
66c20862   pranathivemuri   external librarie...
40
  
18fad6bc   David Mayerich   big fixes and cha...
41
  #build the executable in the binary directory on MS Visual Studio
a0048e31   David Mayerich   added several tes...
42
43
44
45
46
  if ( MSVC )
  	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}")
  	SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}")
  endif ( MSVC )
  
66c20862   pranathivemuri   external librarie...
47
  include_directories(
d1ab3c93   Pavel Govyadinov   Changes to get ne...
48
  					${OPENGL_INCLUDE_DIRS}
627eed8d   David Mayerich   added a GUI for d...
49
  					${GLUT_INCLUDE_DIR}
66c20862   pranathivemuri   external librarie...
50
  					${STIM_INCLUDE_DIRS}
94a07643   David Mayerich   removed ANN
51
            			#${ANN_INCLUDE_DIR}
66c20862   pranathivemuri   external librarie...
52
53
54
55
  					${Boost_INCLUDE_DIR}
  					)
  
  #Assign source files to the appropriate variables
68944dbf   David Mayerich   updates to get cy...
56
57
  #file(GLOB SRC_CPP "*.cu")
  #file(GLOB SRC_H "*.h")
66c20862   pranathivemuri   external librarie...
58
59
  
  #create an executable file
68944dbf   David Mayerich   updates to get cy...
60
  cuda_add_executable(netmets main.cu)
66c20862   pranathivemuri   external librarie...
61
62
63
  
  #set the link libraries
  target_link_libraries(netmets
d1ab3c93   Pavel Govyadinov   Changes to get ne...
64
65
66
  #						${OpenGL_LIBRARIES}
  						${OPENGL_gl_LIBRARY}
  						${OPENGL_glu_LIBRARY}
627eed8d   David Mayerich   added a GUI for d...
67
  						${GLUT_LIBRARIES}
66c20862   pranathivemuri   external librarie...
68
  						${CMAKE_THREAD_LIBS_INIT}
94a07643   David Mayerich   removed ANN
69
              			#${ANN_LIBRARY}
66c20862   pranathivemuri   external librarie...
70
71
72
  						${X11_LIBRARIES}
  		  )
  
a0048e31   David Mayerich   added several tes...
73
74
75
76
77
78
79
80
81
82
83
84
  #set up copying data files
  configure_file(data/00_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/00_GT.obj @ONLY)
  configure_file(data/00_T.obj ${CMAKE_CURRENT_BINARY_DIR}/00_T.obj @ONLY)
  configure_file(data/01_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/01_GT.obj @ONLY)
  configure_file(data/01_T.obj ${CMAKE_CURRENT_BINARY_DIR}/01_T.obj @ONLY)
  configure_file(data/02_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/02_GT.obj @ONLY)
  configure_file(data/02_T.obj ${CMAKE_CURRENT_BINARY_DIR}/02_T.obj @ONLY)
  configure_file(data/03_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/03_GT.obj @ONLY)
  configure_file(data/03_T.obj ${CMAKE_CURRENT_BINARY_DIR}/03_T.obj @ONLY)
  configure_file(data/04_GT.obj ${CMAKE_CURRENT_BINARY_DIR}/04_GT.obj @ONLY)
  configure_file(data/04_Ta.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Ta.obj @ONLY)
  configure_file(data/04_Tb.obj ${CMAKE_CURRENT_BINARY_DIR}/04_Tb.obj @ONLY)
b31bfd7d   David Mayerich   added SWC files a...
85
86
  configure_file(data/1.swc ${CMAKE_CURRENT_BINARY_DIR}/1.swc @ONLY)
  configure_file(data/2.swc ${CMAKE_CURRENT_BINARY_DIR}/2.swc @ONLY)
7c1b82bc   Jiaming Guo   test for 00_GT.swc
87
  configure_file(data/00_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/00_GT.swc @ONLY)
95850378   Jiaming Guo   add two good test...
88
89
  configure_file(data/01_GT.swc ${CMAKE_CURRENT_BINARY_DIR}/01_GT.swc @ONLY)
  configure_file(data/01_T.swc ${CMAKE_CURRENT_BINARY_DIR}/01_T.swc @ONLY)