Skip to content

Commit

Permalink
cmake: Add option to build dlib submodule
Browse files Browse the repository at this point in the history
Fedora provides package `dlib` and `dlib-devel` so that it is
unnecessary to build dlib.
  • Loading branch information
norihiro committed Jun 1, 2024
1 parent 4b71a1c commit 14f1a2b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set(PLUGIN_URL "https://obsproject.com/forum/resources/face-tracker.1294/")
set(LINUX_MAINTAINER_EMAIL "[email protected]")

option(WITH_PTZ_TCP "Enable to connect PTZ camera through TCP socket" ON)
option(WITH_DLIB_SUBMODULE "Link dlib from submodule" ON)
option(ENABLE_MONITOR_USER "Enable monitor source for user" OFF)
option(ENABLE_DEBUG_DATA "Enable property to save error and control data" OFF)
option(WITH_DOCK "Enable dock" ON)
Expand Down Expand Up @@ -36,16 +37,18 @@ find_package(obs-frontend-api REQUIRED)
include(cmake/ObsPluginHelpers.cmake)
find_qt(VERSION ${QT_VERSION} COMPONENTS Widgets Core Gui)

set(CMAKE_POSITION_INDEPENDENT_CODE True)
set(DLIB_NO_GUI_SUPPORT ON)
set(DLIB_PNG_SUPPORT OFF)
set(DLIB_GIF_SUPPORT OFF)
set(DLIB_USE_FFMPEG OFF)
set(DLIB_JPEG_SUPPORT OFF)
set(DLIB_LINK_WITH_SQLITE3 OFF)
set(DLIB_WEBP_SUPPORT OFF)
set(DLIB_TEST_COMPILE_ALL_SOURCE_CPP OFF)
add_subdirectory(dlib)
if (WITH_DLIB_SUBMODULE)
set(CMAKE_POSITION_INDEPENDENT_CODE True)
set(DLIB_NO_GUI_SUPPORT ON)
set(DLIB_PNG_SUPPORT OFF)
set(DLIB_GIF_SUPPORT OFF)
set(DLIB_USE_FFMPEG OFF)
set(DLIB_JPEG_SUPPORT OFF)
set(DLIB_LINK_WITH_SQLITE3 OFF)
set(DLIB_WEBP_SUPPORT OFF)
set(DLIB_TEST_COMPILE_ALL_SOURCE_CPP OFF)
add_subdirectory(dlib)
endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
Expand Down

0 comments on commit 14f1a2b

Please sign in to comment.