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
67db08f5
Commit
67db08f5
authored
Feb 28, 2017
by
Davis King
Browse files
Made example cmake use dlib::dlib link name. Also made the installed
cmake config for dlib enable C++11.
parent
a2277560
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+3
-1
dlib/cmake_utils/dlibConfig.cmake.in
dlib/cmake_utils/dlibConfig.cmake.in
+2
-0
examples/CMakeLists.txt
examples/CMakeLists.txt
+3
-3
No files found.
dlib/CMakeLists.txt
View file @
67db08f5
...
@@ -690,7 +690,7 @@ if (NOT TARGET dlib)
...
@@ -690,7 +690,7 @@ if (NOT TARGET dlib)
endif
()
endif
()
install
(
DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
/ DESTINATION include/dlib
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
)
REGEX
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
EXCLUDE
)
...
@@ -734,3 +734,5 @@ if (NOT TARGET dlib)
...
@@ -734,3 +734,5 @@ if (NOT TARGET dlib)
endif
()
endif
()
endif
()
endif
()
add_library
(
dlib::dlib ALIAS dlib
)
dlib/cmake_utils/dlibConfig.cmake.in
View file @
67db08f5
...
@@ -38,3 +38,5 @@ endif()
...
@@ -38,3 +38,5 @@ endif()
find_library(dlib_LIBRARIES dlib HINTS ${dlib_INSTALL_PATH}/lib)
find_library(dlib_LIBRARIES dlib HINTS ${dlib_INSTALL_PATH}/lib)
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBS ${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)
...
@@ -16,7 +16,7 @@ include(../dlib/cmake)
# in general you will make programs that const of many .cpp files.
# in general you will make programs that const of many .cpp files.
ADD_EXECUTABLE
(
assignment_learning_ex assignment_learning_ex.cpp
)
ADD_EXECUTABLE
(
assignment_learning_ex assignment_learning_ex.cpp
)
# Then we tell it to link with dlib.
# 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)
...
@@ -26,7 +26,7 @@ TARGET_LINK_LIBRARIES(assignment_learning_ex dlib)
# your cmake projects and use the syntax shown above.
# 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
::dlib
)
ENDMACRO
()
ENDMACRO
()
# if an example requires GUI, call this macro to check DLIB_NO_GUI_SUPPORT to include or exclude
# if an example requires GUI, call this macro to check DLIB_NO_GUI_SUPPORT to include or exclude
...
@@ -154,7 +154,7 @@ else()
...
@@ -154,7 +154,7 @@ else()
include_directories
(
${
OpenCV_INCLUDE_DIRS
}
)
include_directories
(
${
OpenCV_INCLUDE_DIRS
}
)
ADD_EXECUTABLE
(
webcam_face_pose_ex webcam_face_pose_ex.cpp
)
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
()
else
()
message
(
"OpenCV not found, so we won't build the webcam_face_pose_ex example."
)
message
(
"OpenCV not found, so we won't build the webcam_face_pose_ex example."
)
endif
()
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