Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
d1bafb5a
Commit
d1bafb5a
authored
Aug 21, 2015
by
Ehsan Azarnasab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify passing cmake yes and no options.
parent
34e73a6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
setup.py
setup.py
+12
-25
No files found.
setup.py
View file @
d1bafb5a
...
...
@@ -12,15 +12,10 @@ To repackage the previously built package as wheel (bypassing build):
python setup.py bdist_wheel --repackage
To install a develop version (egg with symbolic link):
python setup.py develop
To exclude/include certain features in the build:
--no-gui-support: sets DLIB_NO_GUI_SUPPORT
--enable-stack-trace: sets DLIB_ENABLE_STACK_TRACE
--enable-asserts: sets DLIB_ENABLE_ASSERTS
--no-blas: unsets DLIB_USE_BLAS
--no-lapack: unsets DLIB_USE_LAPACK
--no-libpng: unsets DLIB_LINK_WITH_LIBPNG
--no-libjpeg: unsets DLIB_LINK_WITH_LIBJPEG
--no-sqlite3: unsets DLIB_LINK_WITH_SQLITE3
To exclude/include certain options in the cmake config use --yes and --no:
for example:
--yes DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=yes
--no DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=no
Additional options:
--debug: makes a debug build
--cmake: path to specific cmake executable
...
...
@@ -73,6 +68,10 @@ def _get_options():
for
opt_idx
,
arg
in
enumerate
(
sys
.
argv
):
if
opt_key
==
'cmake'
:
_cmake_path
=
arg
elif
opt_key
==
'yes'
:
_cmake_extra
.
append
(
'-D{arg}=yes'
.
format
(
arg
=
arg
.
trim
()))
elif
opt_key
==
'no'
:
_cmake_extra
.
append
(
'-D{arg}=no'
.
format
(
arg
=
arg
.
trim
()))
if
opt_key
:
sys
.
argv
.
remove
(
arg
)
...
...
@@ -88,6 +87,10 @@ def _get_options():
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
continue
elif
opt
in
[
'yes'
,
'no'
]:
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
continue
opt_key
=
None
custom_arg
=
True
...
...
@@ -95,22 +98,6 @@ def _get_options():
_cmake_config
=
'Debug'
elif
opt
==
'release'
:
_cmake_config
=
'Release'
elif
opt
==
'no-gui-support'
:
_cmake_extra
.
append
(
'-DDLIB_NO_GUI_SUPPORT=yes'
)
elif
opt
==
'enable-stack-trace'
:
_cmake_extra
.
append
(
'-DDLIB_ENABLE_STACK_TRACE=yes'
)
elif
opt
==
'enable-asserts'
:
_cmake_extra
.
append
(
'-DDLIB_ENABLE_ASSERTS=yes'
)
elif
opt
==
'no-blas'
:
_cmake_extra
.
append
(
'-DDLIB_USE_BLAS=no'
)
elif
opt
==
'no-lapack'
:
_cmake_extra
.
append
(
'-DDLIB_USE_LAPACK=no'
)
elif
opt
==
'no-libpng'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_LIBPNG=no'
)
elif
opt
==
'no-libjpeg'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_LIBJPEG=no'
)
elif
opt
==
'no-sqlite3'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_SQLITE3=no'
)
elif
opt
in
[
'debug'
,
'release'
,
'repackage'
]:
_options
.
append
(
opt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment