Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
67db08f5
Commit
67db08f5
authored
Feb 28, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made example cmake use dlib::dlib link name. Also made the installed
cmake config for dlib enable C++11.
parent
a2277560
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
CMakeLists.txt
dlib/CMakeLists.txt
+3
-1
dlibConfig.cmake.in
dlib/cmake_utils/dlibConfig.cmake.in
+2
-0
CMakeLists.txt
examples/CMakeLists.txt
+3
-3
No files found.
dlib/CMakeLists.txt
View file @
67db08f5
...
...
@@ -690,7 +690,7 @@ if (NOT TARGET dlib)
endif
()
install
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/ DESTINATION include/dlib
FILES_MATCHING PATTERN
"*.h"
FILES_MATCHING PATTERN
"*.h"
PATTERN
"*.cmake"
REGEX
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
EXCLUDE
)
...
...
@@ -734,3 +734,5 @@ if (NOT TARGET dlib)
endif
()
endif
()
add_library
(
dlib::dlib ALIAS dlib
)
dlib/cmake_utils/dlibConfig.cmake.in
View file @
67db08f5
...
...
@@ -38,3 +38,5 @@ endif()
find_library(dlib_LIBRARIES dlib HINTS ${dlib_INSTALL_PATH}/lib)
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBS ${dlib_LIBRARIES} "@dlib_needed_libraries@")
include(${dlib_INSTALL_PATH}/include/dlib/cmake_utils/use_cpp_11.cmake)
examples/CMakeLists.txt
View file @
67db08f5
...
...
@@ -16,7 +16,7 @@ include(../dlib/cmake)
# 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
)
TARGET_LINK_LIBRARIES
(
assignment_learning_ex dlib
::dlib
)
...
...
@@ -26,7 +26,7 @@ TARGET_LINK_LIBRARIES(assignment_learning_ex dlib)
# your cmake projects and use the syntax shown above.
MACRO
(
add_example name
)
ADD_EXECUTABLE
(
${
name
}
${
name
}
.cpp
)
TARGET_LINK_LIBRARIES
(
${
name
}
dlib
)
TARGET_LINK_LIBRARIES
(
${
name
}
dlib
::dlib
)
ENDMACRO
()
# if an example requires GUI, call this macro to check DLIB_NO_GUI_SUPPORT to include or exclude
...
...
@@ -154,7 +154,7 @@ else()
include_directories
(
${
OpenCV_INCLUDE_DIRS
}
)
ADD_EXECUTABLE
(
webcam_face_pose_ex webcam_face_pose_ex.cpp
)
TARGET_LINK_LIBRARIES
(
webcam_face_pose_ex dlib
${
OpenCV_LIBS
}
)
TARGET_LINK_LIBRARIES
(
webcam_face_pose_ex dlib
::dlib
${
OpenCV_LIBS
}
)
else
()
message
(
"OpenCV not found, so we won't build the webcam_face_pose_ex example."
)
endif
()
...
...
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