Member-only story

Install Dlib on macOS

Nhan Cao
2 min readApr 8, 2019
  • Install dlib by brew
brew cask install xquartzbrew install gtk+3 boostbrew install dlib

dlib installed at: /usr/local/Cellar/dlib/19.17

  • Get Dlib’s include directory
pkg-config --libs --cflags dlib-1
# cmake needs this line
cmake_minimum_required(VERSION 3.13)

# Enable C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

if(NOT CMAKE_BUILD_TYPE AND NOT (MSVC_IDE OR XCODE))
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type, one of: Release, Debug" FORCE)
endif()

# Set target name, change with your favorite name
project(nc-rd-facemask CXX)

message( STATUS "Build type: ${CMAKE_BUILD_TYPE}" )
message( STATUS "Configuration types: ${CMAKE_CONFIGURATION_TYPES}" )

# Detect 64 or 32 bit
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
# 64-bit project
SET(64_BIT_OS TRUE)
message( STATUS "A 64-bit OS detected" )
else()
SET(64_BIT_OS FALSE)
message( STATUS "A 32-bit OS detected" )
endif()

# Find OpenCV, you may need to set OpenCV_DIR variable
# to the absolute path to the directory…

--

--

No responses yet