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
c90b7a0c
Commit
c90b7a0c
authored
Sep 11, 2015
by
Séverin Lemaignan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always compile a static library (even in release mode) to ease deployment of examples
Install the static library along the shared one.
parent
99065fcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
CMakeLists.txt
dlib/CMakeLists.txt
+14
-10
No files found.
dlib/CMakeLists.txt
View file @
c90b7a0c
...
@@ -118,10 +118,9 @@ if (NOT TARGET dlib)
...
@@ -118,10 +118,9 @@ if (NOT TARGET dlib)
data_io/image_dataset_metadata.cpp
)
data_io/image_dataset_metadata.cpp
)
if
(
DLIB_ISO_CPP_ONLY
)
if
(
DLIB_ISO_CPP_ONLY
)
add_library
(
dlib STATIC
${
source_files
}
)
if
(
RELEASE_MODE
)
if
(
RELEASE_MODE
)
add_library
(
dlib SHARED
${
source_files
}
)
add_library
(
dlib-shared SHARED
${
source_files
}
)
else
()
add_library
(
dlib STATIC
${
source_files
}
)
endif
()
endif
()
else
()
else
()
...
@@ -416,25 +415,30 @@ if (NOT TARGET dlib)
...
@@ -416,25 +415,30 @@ if (NOT TARGET dlib)
mark_as_advanced
(
fftw fftw_path
)
mark_as_advanced
(
fftw fftw_path
)
endif
()
endif
()
add_library
(
dlib STATIC
${
source_files
}
)
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
if
(
RELEASE_MODE
)
if
(
RELEASE_MODE
)
add_library
(
dlib SHARED
${
source_files
}
)
add_library
(
dlib-shared SHARED
${
source_files
}
)
else
()
target_link_libraries
(
dlib-shared
${
dlib_needed_libraries
}
)
add_library
(
dlib STATIC
${
source_files
}
)
endif
()
endif
()
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
endif
()
##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
endif
()
##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
# Install the library
# Install the library
if
(
RELEASE_MODE
)
if
(
RELEASE_MODE
)
install
(
TARGETS dlib LIBRARY DESTINATION lib
)
set_target_properties
(
dlib-shared PROPERTIES OUTPUT_NAME dlib
)
install
(
TARGETS dlib dlib-shared
EXPORT dlib
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
/ DESTINATION include/dlib
install
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
/ DESTINATION include/dlib
FILES_MATCHING PATTERN
"*.h"
FILES_MATCHING PATTERN
"*.h"
REGEX
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
EXCLUDE
)
REGEX
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
EXCLUDE
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/../dlib/config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h
)
# overwrite config.h with the configured one
# overwrite config.h with the configured one
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h DESTINATION include/dlib
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h DESTINATION include/dlib
)
...
...
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