severin-lemaignan / gazr

3D head pose estimation using monocular vision
Other
179 stars 55 forks source link

[cmake] Use dlib::dlib_shared for target_link_libraries #22

Closed takotakot closed 3 years ago

takotakot commented 6 years ago

This PR allows us to avoid "CMake Warning" that 'dlib_INCLUDE_DIRS' and 'dlib_LIBRARIES' are deplicated. With this request, #21 is solved.

According to davisking, dlib owner, "If you changed libgazr's target_link_libraries call to link against dlib::dlib_shared it works." ref: https://github.com/davisking/dlib/issues/1073 .

When I run cmake .. I found below warings:

CMake Warning at ... dlib/dlibConfig.cmake:42 (message):
  The variable 'dlib_INCLUDE_DIRS' is deprecated! Instead, simply use
  target_link_libraries(your_app dlib::dlib).  See
  http://dlib.net/examples/CMakeLists.txt.html for an example.
Call Stack (most recent call first):
  CMakeLists.txt:9999 (__deprecated_var)

CMake Warning at ... dlib/dlibConfig.cmake:42 (message):
  The variable 'dlib_LIBRARIES' is deprecated! Instead, simply use
  target_link_libraries(your_app dlib::dlib).  See
  http://dlib.net/examples/CMakeLists.txt.html for an example.
Call Stack (most recent call first):
  CMakeLists.txt:9999 (__deprecated_var)

. For this project dlib::dlib_shared seems better than dlib::dlib.

severin-lemaignan commented 3 years ago

Closed in #28

severin-lemaignan commented 3 years ago

It doesn't seem that dlib is exporting a dlib::dlib_shared anymore? (tried with dlib-19.22). So simply linking with dlib::dlib.