".github/vscode:/vscode.git/clone" did not exist on "b2d53ef66f8fbea074a4e3f5805d70f10f73c412"
CMakeLists.txt 2.45 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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

# This variable contains a list of all the tests we are building
# into the regression test suite.
set (tests
   example.cpp
   example_args.cpp
   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.cpp
   conditioning_class_c.cpp
   config_reader.cpp
   directed_graph.cpp
34
   empirical_kernel_map.cpp
35
36
37
38
39
40
41
42
   graph.cpp
   geometry.cpp
   entropy_coder.cpp
   entropy_encoder_model.cpp
   hash_map.cpp
   hash_set.cpp
   hash_table.cpp
   image.cpp
43
   kcentroid.cpp
44
45
46
   lz77_buffer.cpp
   map.cpp
   matrix.cpp
47
   matrix2.cpp
Davis King's avatar
Davis King committed
48
   matrix3.cpp
49
50
51
52
   matrix_lu.cpp
   matrix_qr.cpp
   matrix_chol.cpp
   matrix_eig.cpp
53
54
55
56
   md5.cpp
   member_function_pointer.cpp
   metaprogramming.cpp
   multithreaded_object.cpp
57
   optimization.cpp
58
59
60
61
62
63
64
65
66
67
68
   pipe.cpp
   pixel.cpp
   queue.cpp
   rand.cpp
   reference_counter.cpp
   sequence.cpp
   serialize.cpp
   set.cpp
   sliding_buffer.cpp
   smart_pointers.cpp
   sockets.cpp
69
   sockets2.cpp
70
71
72
73
74
   sockstreambuf.cpp
   stack.cpp
   static_map.cpp
   static_set.cpp
   string.cpp
75
   svm.cpp
76
   threads.cpp
77
   thread_pool.cpp
78
79
80
   timer.cpp
   tokenizer.cpp
   tuple.cpp
Davis King's avatar
Davis King committed
81
   type_safe_union.cpp
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
   )

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