-
Notifications
You must be signed in to change notification settings - Fork 35
/
CMakeLists.txt
142 lines (114 loc) · 5.92 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
cmake_minimum_required (VERSION 3.9.4)
project (JIGSAW_UNIT_TEST)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (INSTALL_LOCAL TRUE)
message ( ">> INSTALLING LOCALLY" )
else ()
message ( ">> INSTALLING TO ${CMAKE_INSTALL_PREFIX}" )
endif ()
if (DEFINED INSTALL_LOCAL)
find_library (LIBJIGSAW jigsaw HINTS "${PROJECT_SOURCE_DIR}/../lib")
else ()
find_library (LIBJIGSAW jigsaw HINTS "${CMAKE_INSTALL_PREFIX}/lib")
endif ()
message (">> LIBJIGSAW LOCATION: ${LIBJIGSAW}")
add_executable (test_all test_all.c)
target_link_libraries (test_all ${LIBJIGSAW})
set_target_properties(test_all PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test_all DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_a test2d_a.c)
target_link_libraries (test2d_a ${LIBJIGSAW})
set_target_properties(test2d_a PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_a DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_a test3d_a.c)
target_link_libraries (test3d_a ${LIBJIGSAW})
set_target_properties(test3d_a PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_a DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_a test2s_a.c)
target_link_libraries (test2s_a ${LIBJIGSAW})
set_target_properties(test2s_a PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_a DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_b test2d_b.c)
target_link_libraries (test2d_b ${LIBJIGSAW})
set_target_properties(test2d_b PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_b DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_b test3d_b.c)
target_link_libraries (test3d_b ${LIBJIGSAW})
set_target_properties(test3d_b PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_b DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_b test2s_b.c)
target_link_libraries (test2s_b ${LIBJIGSAW})
set_target_properties(test2s_b PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_b DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_c test2d_c.c)
target_link_libraries (test2d_c ${LIBJIGSAW})
set_target_properties(test2d_c PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_c DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_c test3d_c.c)
target_link_libraries (test3d_c ${LIBJIGSAW})
set_target_properties(test3d_c PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_c DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_c test2s_c.c)
target_link_libraries (test2s_c ${LIBJIGSAW})
set_target_properties(test2s_c PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_c DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_d test2d_d.c)
target_link_libraries (test2d_d ${LIBJIGSAW})
set_target_properties(test2d_d PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_d DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_d test3d_d.c)
target_link_libraries (test3d_d ${LIBJIGSAW})
set_target_properties(test3d_d PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_d DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_e test2d_e.c)
target_link_libraries (test2d_e ${LIBJIGSAW})
set_target_properties(test2d_e PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_e DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_e test3d_e.c)
target_link_libraries (test3d_e ${LIBJIGSAW})
set_target_properties(test3d_e PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_e DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_e test2s_e.c)
target_link_libraries (test2s_e ${LIBJIGSAW})
set_target_properties(test2s_e PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_e DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_f test2d_f.c)
target_link_libraries (test2d_f ${LIBJIGSAW})
set_target_properties(test2d_f PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_f DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_f test3d_f.c)
target_link_libraries (test3d_f ${LIBJIGSAW})
set_target_properties(test3d_f PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_f DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_f test2s_f.c)
target_link_libraries (test2s_f ${LIBJIGSAW})
set_target_properties(test2s_f PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_f DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_g test2d_g.c)
target_link_libraries (test2d_g ${LIBJIGSAW})
set_target_properties(test2d_g PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_g DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test3d_g test3d_g.c)
target_link_libraries (test3d_g ${LIBJIGSAW})
set_target_properties(test3d_g PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test3d_g DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_g test2s_g.c)
target_link_libraries (test2s_g ${LIBJIGSAW})
set_target_properties(test2s_g PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_g DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_h test2d_h.c)
target_link_libraries (test2d_h ${LIBJIGSAW})
set_target_properties(test2d_h PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_h DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_h test2s_h.c)
target_link_libraries (test2s_h ${LIBJIGSAW})
set_target_properties(test2s_h PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_h DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2d_i test2d_i.c)
target_link_libraries (test2d_i ${LIBJIGSAW})
set_target_properties(test2d_i PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2d_i DESTINATION "${PROJECT_SOURCE_DIR}")
add_executable (test2s_i test2s_i.c)
target_link_libraries (test2s_i ${LIBJIGSAW})
set_target_properties(test2s_i PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
install (TARGETS test2s_i DESTINATION "${PROJECT_SOURCE_DIR}")