CMakeLists.txt 3.13 KB
Newer Older
1
2
3
4
5
6
7
#
# This is a CMake makefile.  You can find the cmake utility and
# information about it at http://www.cmake.org
#

# setting this makes CMake allow normal looking IF ELSE statements
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
8
cmake_minimum_required(VERSION 2.4)
9
10
11
if(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
12
13
14
15
16
17

# This variable contains a list of all the tests we are building
# into the regression test suite.
set (tests
   example.cpp
   example_args.cpp
Davis King's avatar
Davis King committed
18
   any.cpp
19
   any_function.cpp
20
21
22
23
24
25
26
27
28
   array2d.cpp
   array.cpp
   base64.cpp
   bayes_nets.cpp
   bigint.cpp
   binary_search_tree_kernel_1a.cpp
   binary_search_tree_kernel_2a.cpp
   binary_search_tree_mm1.cpp
   binary_search_tree_mm2.cpp
Davis King's avatar
Davis King committed
29
   bridge.cpp
30
   byte_orderer.cpp
31
32
33
34
   cmd_line_parser.cpp
   cmd_line_parser_wchar_t.cpp
   compress_stream.cpp
   conditioning_class_c.cpp
35
   conditioning_class.cpp
36
   config_reader.cpp
37
   crc32.cpp
38
39
   create_iris_datafile.cpp
   data_io.cpp
40
   directed_graph.cpp
41
   discriminant_pca.cpp
42
   ekm_and_lisf.cpp
43
   empirical_kernel_map.cpp
44
45
   entropy_coder.cpp
   entropy_encoder_model.cpp
46
47
   geometry.cpp
   graph.cpp
48
   hash.cpp
49
50
51
52
   hash_map.cpp
   hash_set.cpp
   hash_table.cpp
   image.cpp
53
   is_same_object.cpp
54
   kcentroid.cpp
55
   kernel_matrix.cpp
Davis King's avatar
Davis King committed
56
   kmeans.cpp
57
   least_squares.cpp
58
   linear_manifold_regularizer.cpp
59
60
   lz77_buffer.cpp
   map.cpp
61
   matrix2.cpp
Davis King's avatar
Davis King committed
62
   matrix3.cpp
63
   matrix4.cpp
64
   matrix_chol.cpp
65
   matrix.cpp
66
   matrix_eig.cpp
67
68
   matrix_lu.cpp
   matrix_qr.cpp
69
   max_cost_assignment.cpp
70
   max_sum_submatrix.cpp
71
72
73
74
   md5.cpp
   member_function_pointer.cpp
   metaprogramming.cpp
   multithreaded_object.cpp
75
   one_vs_all_trainer.cpp
76
   one_vs_one_trainer.cpp
77
   optimization.cpp
78
   optimization_test_functions.cpp
Davis King's avatar
Davis King committed
79
   opt_qp_solver.cpp
80
81
   pipe.cpp
   pixel.cpp
82
   probabilistic.cpp
83
   pyramid_down.cpp
84
85
   queue.cpp
   rand.cpp
86
   read_write_mutex.cpp
87
88
89
90
   reference_counter.cpp
   sequence.cpp
   serialize.cpp
   set.cpp
91
   sldf.cpp
92
93
   sliding_buffer.cpp
   smart_pointers.cpp
94
   sockets2.cpp
95
   sockets.cpp
96
97
98
99
   sockstreambuf.cpp
   stack.cpp
   static_map.cpp
   static_set.cpp
100
   statistics.cpp
101
   std_vector_c.cpp
102
   string.cpp
103
   svm_c_linear.cpp
Davis King's avatar
Davis King committed
104
   svm.cpp
105
   svm_multiclass_linear.cpp
106
   svm_struct.cpp
107
   symmetric_matrix_cache.cpp
108
   thread_pool.cpp
109
   threads.cpp
110
111
   timer.cpp
   tokenizer.cpp
Davis King's avatar
Davis King committed
112
   trust_region.cpp
113
   tuple.cpp
Davis King's avatar
Davis King committed
114
   type_safe_union.cpp
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
   )

# create a variable called target_name and set it to the string "test"
set (target_name test)

PROJECT(${target_name})

# add all the cpp files we want to compile to this list.  This tells
# cmake that they are part of our target (which is the executable named test)
ADD_EXECUTABLE(${target_name} main.cpp tester.cpp ${tests})

# add the folder containing the dlib folder to the include path
INCLUDE_DIRECTORIES(../..)

# There is a CMakeLists.txt file in the dlib source folder that tells cmake
# how to build the dlib library.  Tell cmake about that file.
add_subdirectory(.. dlib_build)

if (NOT DLIB_NO_GUI_SUPPORT)
   add_subdirectory(gui)
endif()

# Tell cmake to link our target executable to the non-gui version of the dlib
# library.  
TARGET_LINK_LIBRARIES(${target_name} dlib )