-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
84 lines (63 loc) · 2.33 KB
/
CMakeLists.txt
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULES_PATH} ${CMAKE_SOURCE_DIR}/Modules)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Modules/cuda" ${CMAKE_MODULE_PATH})
SET(PROJECT_NAME "gicu")
INCLUDE(MacroEnsureOutOfSourceBuild)
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
PROJECT(${PROJECT_NAME})
SET(CMAKE_CXX_FLAGS "-Os")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
SET( ${PROJECT_NAME}_SRCS
gicu.cpp )
#GCC 4.3
#SET(CUDA_NVCC_FLAGS -keep "-use_fast_math;-arch=compute_12;-code=sm_12;-ccbin;/usr/bin/g++-4.3")
#SET(CUDA_NVCC_FLAGS "--compiler-bindir=/usr/bin/gcc-4.3.4")
#SET(CUDA_NVCC_FLAGS "--compiler-bindir=/usr/bin/gcc-4.3")
FIND_PACKAGE(GTK2 COMPONENTS gtk)
FIND_PACKAGE(CUDA)
IF ( NOT CUDA_TOOLKIT_ROOT_DIR)
SET( CUDA_TOOLKIT_ROOT_DIR
/afs/tu-bs.de/usr/usr53/y0053765/cuda/cuda
)
ENDIF ( NOT CUDA_TOOLKIT_ROOT_DIR)
INCLUDE_DIRECTORIES(
${GTK2_INCLUDE_DIRS}
${CURL_INCLUDE_DIR}
/usr/include/gimp-2.0
/usr/include/glib-2.0
/usr/lib64/glib-2.0/include
/opt/cuda/sdk/C/common/inc
/afs/tu-bs.de/usr/usr53/y0053765/cuda/cuda/sdk/C/common/inc
)
INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS})
CUDA_INCLUDE_DIRECTORIES (
/opt/cuda/sdk/C/common/inc
)
LINK_DIRECTORIES(
/opt/cuda/lib64
/opt/cuda/sdk/C/lib
)
CUDA_ADD_EXECUTABLE( ${PROJECT_NAME}
gicu.cpp
cuda.cu
gui.cpp
#grey.cu
#box.cu
#sobel.cu
)
#ADD_EXECUTABLE( ${PROJECT_NAME} ${${PROJECT_NAME}_SRCS} )
TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${GTK2_LIBRARIES} ${CUDA_LIBRARIES} gimp-2.0 gimpui-2.0)
#INSTALL(FILES ${files} DESTINATION include)
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/gicu DESTINATION ~/.gimp-2.6/plug-ins/)
# ON IBR MACHINES!!!!!!
# ON IBR MACHINES!!!!!!
# ON IBR MACHINES!!!!!!
# ON IBR MACHINES!!!!!!
# ON IBR MACHINES!!!!!!
# run cmake and afterwards you have run ccmake and change the variable
# CUDA_NVCC_FLAGS to:
# --compiler-bindir=/usr/bin/gcc-4.3
MESSAGE(STATUS "Please compile with gcc 4.3.x... see CMakeLists.txt for more information")
MESSAGE(STATUS "Please compile with gcc 4.3.x... see CMakeLists.txt for more information")
MESSAGE(STATUS "Please compile with gcc 4.3.x... see CMakeLists.txt for more information")
MESSAGE(STATUS "Please compile with gcc 4.3.x... see CMakeLists.txt for more information")