Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
c90b7a0c
Commit
c90b7a0c
authored
Sep 11, 2015
by
Séverin Lemaignan
Browse files
Always compile a static library (even in release mode) to ease deployment of examples
Install the static library along the shared one.
parent
99065fcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+14
-10
No files found.
dlib/CMakeLists.txt
View file @
c90b7a0c
...
...
@@ -118,10 +118,9 @@ if (NOT TARGET dlib)
data_io/image_dataset_metadata.cpp
)
if
(
DLIB_ISO_CPP_ONLY
)
add_library
(
dlib STATIC
${
source_files
}
)
if
(
RELEASE_MODE
)
add_library
(
dlib SHARED
${
source_files
}
)
else
()
add_library
(
dlib STATIC
${
source_files
}
)
add_library
(
dlib-shared SHARED
${
source_files
}
)
endif
()
else
()
...
...
@@ -416,25 +415,30 @@ if (NOT TARGET dlib)
mark_as_advanced
(
fftw fftw_path
)
endif
()
add_library
(
dlib STATIC
${
source_files
}
)
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
if
(
RELEASE_MODE
)
add_library
(
dlib SHARED
${
source_files
}
)
else
()
add_library
(
dlib STATIC
${
source_files
}
)
add_library
(
dlib-shared SHARED
${
source_files
}
)
target_link_libraries
(
dlib-shared
${
dlib_needed_libraries
}
)
endif
()
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
endif
()
##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
# Install the library
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
FILES_MATCHING PATTERN
"*.h"
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
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