Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
4d223d4d
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "91fd181245d7b287c735f2f479e4c498d5458462"
Commit
4d223d4d
authored
Jan 31, 2015
by
Davis King
Browse files
Made example's CMakeLists.txt file a little more tutorial like.
parent
6fbd0dac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
examples/CMakeLists.txt
examples/CMakeLists.txt
+14
-5
No files found.
examples/CMakeLists.txt
View file @
4d223d4d
...
@@ -10,10 +10,20 @@ PROJECT(examples)
...
@@ -10,10 +10,20 @@ PROJECT(examples)
include
(
../dlib/cmake
)
include
(
../dlib/cmake
)
# We are going to use a macro to add all the example programs. However,
# Tell CMake to compile a program. We do this with the ADD_EXECUTABLE()
# usually you will only create one executable in your cmake projects.
# statement which takes the name of the output executable and then a list of
# Therefore, you would just need to invoke ADD_EXECUTABLE() and
# .cpp files to compile. Here each example consists of only one .cpp file but
# TARGET_LINK_LIBRARIES() as shown below.
# in general you will make programs that const of many .cpp files.
ADD_EXECUTABLE
(
assignment_learning_ex assignment_learning_ex.cpp
)
# Then we tell it to link with dlib.
TARGET_LINK_LIBRARIES
(
assignment_learning_ex dlib
)
# Since there are a lot of examples I'm going to use a macro to simply this
# CMakeLists.txt file. However, usually you will create only one executable in
# your cmake projects and use the syntax shown above.
MACRO
(
add_example name
)
MACRO
(
add_example name
)
ADD_EXECUTABLE
(
${
name
}
${
name
}
.cpp
)
ADD_EXECUTABLE
(
${
name
}
${
name
}
.cpp
)
TARGET_LINK_LIBRARIES
(
${
name
}
dlib
)
TARGET_LINK_LIBRARIES
(
${
name
}
dlib
)
...
@@ -21,7 +31,6 @@ ENDMACRO()
...
@@ -21,7 +31,6 @@ ENDMACRO()
#here we apply our macros
#here we apply our macros
add_example
(
assignment_learning_ex
)
add_example
(
bayes_net_ex
)
add_example
(
bayes_net_ex
)
add_example
(
bayes_net_from_disk_ex
)
add_example
(
bayes_net_from_disk_ex
)
add_example
(
bayes_net_gui_ex
)
add_example
(
bayes_net_gui_ex
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment