Adding package features for Dlib and OpenCV

Dlib - Package feature for blas (dlib is compatiable with Intel MKL) and CUDA
OpenCV - Added option to integrate GDCM support (to read DICOM files)
This commit is contained in:
Luiz Paulo 2017-11-11 15:31:38 +00:00 committed by Luiz Paulo M. Pires
parent 50f6bc4e8f
commit 72f10db01c
4 changed files with 29 additions and 3 deletions

View File

@ -2,3 +2,10 @@ Source: dlib
Version: 19.7
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
Feature: blas
Description: BLAS support for dlib
Feature: cuda
Build-Depends: cuda
Description: CUDA support for dlib

View File

@ -17,6 +17,16 @@ file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE)
string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}")
file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}")
set(WITH_BLAS OFF)
if("blas" IN_LIST FEATURES)
set(WITH_BLAS ON)
endif()
set(WITH_CUDA OFF)
if("cuda" IN_LIST FEATURES)
set(WITH_CUDA ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@ -25,12 +35,11 @@ vcpkg_configure_cmake(
-DDLIB_USE_FFTW=ON
-DDLIB_PNG_SUPPORT=ON
-DDLIB_JPEG_SUPPORT=ON
-DDLIB_USE_BLAS=OFF
-DDLIB_USE_BLAS=${WITH_BLAS}
-DDLIB_USE_LAPACK=OFF
-DDLIB_USE_CUDA=OFF
-DDLIB_USE_CUDA=${WITH_CUDA}
-DDLIB_GIF_SUPPORT=OFF
-DDLIB_USE_MKL_FFT=OFF
#-DDLIB_USE_CUDA=ON
OPTIONS_DEBUG
-DDLIB_ENABLE_ASSERTS=ON
#-DDLIB_ENABLE_STACK_TRACE=ON

View File

@ -21,3 +21,7 @@ Description: Qt GUI support for opencv
Feature: vtk
Build-Depends: vtk
Description: vtk support for opencv
Feature: gdcm
Build-Depends: gdcm2
Description: GDCM support for opencv

View File

@ -58,6 +58,11 @@ if("vtk" IN_LIST FEATURES)
set(WITH_VTK ON)
endif()
set(WITH_GDCM OFF)
if("gdcm" IN_LIST FEATURES)
set(WITH_GDCM ON)
endif()
set(WITH_MSMF ON)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(WITH_MSMF OFF)
@ -112,6 +117,7 @@ vcpkg_configure_cmake(
-DWITH_OPENGL=ON
-DWITH_QT=${WITH_QT}
-DWITH_VTK=${WITH_VTK}
-DWITH_GDCM=${WITH_GDCM}
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
-DINSTALL_OTHER=OFF