Blame view

CMakeLists.txt 1.3 KB
b71cc8bb   Tianshu Cheng   mPb using 3 channels
1
2
3
4
5
6
7
8
9
  #Specify the version being used aswell as the language
  cmake_minimum_required(VERSION 2.8.11)
  
  #Name your project here
  project(bsds500)
  
  #set the module directory
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
  
6dcc460e   Tianshu Cheng   cPb+tPb
10
11
12
  #find OpenCV
  find_package(OpenCV REQUIRED )
  
b71cc8bb   Tianshu Cheng   mPb using 3 channels
13
14
15
16
17
18
19
20
21
22
23
24
25
  #set up CUDA
  find_package(CUDA REQUIRED)
  
  #find the STIM library
  find_package(STIM REQUIRED)
  
  #find the pthreads package
  find_package(Threads)
  
  #find the X11 package
  find_package(X11)
  
  include_directories(
6dcc460e   Tianshu Cheng   cPb+tPb
26
  					${OpenCV_INCLUDE_DIRS}
b71cc8bb   Tianshu Cheng   mPb using 3 channels
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  					${STIM_INCLUDE_DIRS}
  					)
  
  #Assign source files to the appropriate variables
  file(GLOB SRC_CPP "*.cpp")
  file(GLOB SRC_H "*.h")
  file(GLOB SRC_CU "*.cu")
  file(GLOB SRC_CUH "*.cuh")
  
  #create an executable file
  cuda_add_executable(bsds500
  				${SRC_H} 
  				${SRC_CPP} 
  				${SRC_CU} 
  				${SRC_CUH} 
  				)
  
  #set the link libraries
  target_link_libraries(bsds500
  						#${CUDA_cufft_LIBRARY}
  						#${CUDA_cublas_LIBRARY}
6dcc460e   Tianshu Cheng   cPb+tPb
48
  						${OpenCV_LIBS} 
b71cc8bb   Tianshu Cheng   mPb using 3 channels
49
50
51
52
53
54
55
  						${CMAKE_THREAD_LIBS_INIT}
  						${X11_LIBRARIES}
  		  )
  
  #copy an image test case
  configure_file(data/101085.bmp 101085.bmp COPYONLY)
  configure_file(data/101087.bmp 101087.bmp COPYONLY)
6dcc460e   Tianshu Cheng   cPb+tPb
56
  configure_file(data/101087_square.bmp 101087_square.bmp COPYONLY)
7fab7a98   Tianshu Cheng   a neat version of...
57
58
  configure_file(data/slice00.bmp slice00.bmp COPYONLY)
  configure_file(data/slice00_500_500.bmp slice00_500_500.bmp COPYONLY)