CMakeLists.txt 2.9 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
29
30
31
32
   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
   cmd_line_parser.cpp
   cmd_line_parser_wchar_t.cpp
   compress_stream.cpp
   conditioning_class_c.cpp
33
   conditioning_class.cpp
34
35
   config_reader.cpp
   directed_graph.cpp
36
   discriminant_pca.cpp
37
   ekm_and_lisf.cpp
38
   empirical_kernel_map.cpp
39
40
   entropy_coder.cpp
   entropy_encoder_model.cpp
41
42
   geometry.cpp
   graph.cpp
43
44
45
46
   hash_map.cpp
   hash_set.cpp
   hash_table.cpp
   image.cpp
47
   is_same_object.cpp
48
   kcentroid.cpp
49
   kernel_matrix.cpp
50
   least_squares.cpp
51
   linear_manifold_regularizer.cpp
52
53
   lz77_buffer.cpp
   map.cpp
54
   matrix2.cpp
Davis King's avatar
Davis King committed
55
   matrix3.cpp
56
   matrix4.cpp
57
   matrix_chol.cpp
58
   matrix.cpp
59
   matrix_eig.cpp
60
61
   matrix_lu.cpp
   matrix_qr.cpp
62
   max_cost_assignment.cpp
63
64
65
66
   md5.cpp
   member_function_pointer.cpp
   metaprogramming.cpp
   multithreaded_object.cpp
67
   one_vs_all_trainer.cpp
68
   one_vs_one_trainer.cpp
69
   optimization.cpp
70
   optimization_test_functions.cpp
Davis King's avatar
Davis King committed
71
   opt_qp_solver.cpp
72
73
74
75
   pipe.cpp
   pixel.cpp
   queue.cpp
   rand.cpp
76
   read_write_mutex.cpp
77
78
79
80
   reference_counter.cpp
   sequence.cpp
   serialize.cpp
   set.cpp
81
   sldf.cpp
82
83
   sliding_buffer.cpp
   smart_pointers.cpp
84
   sockets2.cpp
85
   sockets.cpp
86
87
88
89
   sockstreambuf.cpp
   stack.cpp
   static_map.cpp
   static_set.cpp
90
   statistics.cpp
91
   std_vector_c.cpp
92
   string.cpp
93
   svm_c_linear.cpp
Davis King's avatar
Davis King committed
94
   svm.cpp
95
   symmetric_matrix_cache.cpp
96
   thread_pool.cpp
97
   threads.cpp
98
99
   timer.cpp
   tokenizer.cpp
Davis King's avatar
Davis King committed
100
   trust_region.cpp
101
   tuple.cpp
Davis King's avatar
Davis King committed
102
   type_safe_union.cpp
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
   )

# 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 )