Commit 67db08f5 authored by Davis King's avatar Davis King

Made example cmake use dlib::dlib link name. Also made the installed

cmake config for dlib enable C++11.
parent a2277560
......@@ -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)
......@@ -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)
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment