-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fresh CMakeLists.txt #2912
Draft
pfeatherstone
wants to merge
77
commits into
davisking:master
Choose a base branch
from
pfeatherstone:cmake
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fresh CMakeLists.txt #2912
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
d1d265b
WIP
ich123 8bb207d
correct headers
ich123 2e294d4
find neon
ich123 60254ff
SIMD
ich123 462e182
use static_assert, not the silly macro
ich123 30cd3df
SIMD
ich123 8584073
install targets. This is a copy paste from old script. I don't know i…
ich123 394d91e
- build python in main CMakeLists.txt file
ich123 95b9210
disable LTO on python module
ich123 6d73a19
wip
ich123 ae5380e
- build unit test in normal CMakeLists.txt file
ich123 6ff13c0
wip
ich123 8ec8b1c
wip
ich123 02f35a0
install blas for now while we try fix the version of blas in external
2d1fad2
use pkg-config
f59af43
window runner. don't know why ${{ github.workspace }}/dlib doesn't w…
2bf1bad
missing blas fortran code
e65ed6b
missing blas
404b5c4
mssing blas
4cba233
missing blas
284fcbc
deprecated
cb9c9b3
make it use our own blas
56b9fe8
replace DLIB_CASSERT with normal throw statement. otherwise, the 2nd …
9909cbd
- check there is a fortran compiler before trying to enable it. Fixes…
ccf1356
don't strip on windows.
2031e45
confusingly, gui_widgets/fonts.cpp doesn't depend on X11
7cfcfee
use DLIB_NO_ABORT_ON_2ND_FATAL_ERROR
2c22d8e
build examples
bddb28e
build examples in CI/CD
d5427e9
imaglab
6dcaef6
htmlify
cde3f07
dtoc
a41836f
build tools
5f9066f
- build specific architecture. "native" isn't supported until cmake 3.24
66bd706
increase template depth on old clang and windows. use generator expre…
3629aeb
- cmake generator expression helpers
071f6b0
more blas. never ending blas
a124862
- GLOBAL IMPORTED target
da25f35
matlab bindings
aabf289
fix install
3291d76
didn't need this after all.
610e187
matlab build fix? I think RPATH is broken on install
69970c3
WIP
d50eb8c
WIP
dac3aae
so, the fix was not to compile all/source.cpp into a static library a…
1c22cab
deprecated
323dbba
- split back into seperate CMakeLists.txt files
e5e8316
oops
e06f389
oops
48a48be
come on
405dfc0
come on, you can do it
2fbe9d1
- more message statements so you exactly what's enabled, not just wha…
8187393
more hand holding
9d05268
deprecated
2e20ca2
- compiler specific options
6d1a04f
more hand holding. Gate stripping on MSVC not WIN32
f3745b5
add test for MKL and FFMPEG
83e8c65
Update build_cpp.yml
pfeatherstone 09e0fec
- look for tbb. We might need that soon if the tbb symbols in libmkl_…
161dbcc
need to find a way to fix RPATH
b94c983
hack to force dlib to link to libtbb and add its path to RPATH.
e161f9a
don't set avx, sse or neon flags with nvcc. that upsets old nvcc 11.0…
bfe8b49
added GNU OMP threading layer. Made TBB layer the default.
b8c8c4f
- release build by default
ca676a9
warn about BLAS not found and tell people how to install it.
26640aa
release_build_by_default smells fishy
4def070
- added linking to ws2_32 winmm on windows with msvc. Is it required …
b46be21
try this
fa3e00d
remove find_library ? just force-link and hope for the best?
00f8016
more messages when can't find packages
f7a2a83
- QUIET for finding openmp
92e11fc
- change the order of the SIMD compiler options. e.g. it's -mavx -mav…
8bf41d5
- compile with Wno-free-nonheap-object when using gcc [11.3.0, 11.4.0]
9f1cae8
better
617b9a8
added runner which tests dlib installation
ad66b68
make installation work
60a7461
test dlib installation through pkg-config
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,51 @@ | ||
# =================================================================================== | ||
# The dlib CMake configuration file | ||
# | ||
# ** File generated automatically, do not modify ** | ||
# | ||
# Usage from an external project: | ||
# In your CMakeLists.txt, add these lines: | ||
# | ||
# find_package(dlib REQUIRED) | ||
# target_link_libraries(MY_TARGET_NAME dlib::dlib) | ||
# | ||
# =================================================================================== | ||
|
||
|
||
|
||
|
||
# Our library dependencies (contains definitions for IMPORTED targets) | ||
if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR) | ||
# Compute paths | ||
get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
include("${dlib_CMAKE_DIR}/dlib.cmake") | ||
# Check if Threads::Threads target is required and find it if necessary | ||
get_target_property(dlib_deps_threads_check dlib::dlib INTERFACE_LINK_LIBRARIES) | ||
list(FIND dlib_deps_threads_check "Threads::Threads" dlib_deps_threads_idx) | ||
if (${dlib_deps_threads_idx} GREATER -1) | ||
if (NOT TARGET Threads) | ||
find_package(Threads REQUIRED) | ||
endif() | ||
endif() | ||
unset(dlib_deps_threads_idx) | ||
unset(dlib_deps_threads_check) | ||
endif() | ||
|
||
set(dlib_LIBRARIES dlib::dlib) | ||
set(dlib_LIBS dlib::dlib) | ||
set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@") | ||
|
||
mark_as_advanced(dlib_LIBRARIES) | ||
mark_as_advanced(dlib_LIBS) | ||
mark_as_advanced(dlib_INCLUDE_DIRS) | ||
|
||
# Mark these variables above as deprecated. | ||
function(__deprecated_var var access) | ||
if(access STREQUAL "READ_ACCESS") | ||
message(WARNING "The variable '${var}' is deprecated! Instead, simply use target_link_libraries(your_app dlib::dlib). See http://dlib.net/examples/CMakeLists.txt.html for an example.") | ||
endif() | ||
endfunction() | ||
variable_watch(dlib_LIBRARIES __deprecated_var) | ||
variable_watch(dlib_LIBS __deprecated_var) | ||
variable_watch(dlib_INCLUDE_DIRS __deprecated_var) | ||
@PACKAGE_INIT@ | ||
|
||
include(CMakeFindDependencyMacro) | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") | ||
|
||
find_dependency(Threads) | ||
|
||
if ( NOT @DLIB_NO_GUI_SUPPORT@ ) | ||
find_dependency(X11 REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_GIF_SUPPORT@ ) | ||
find_dependency(GIF REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_JPEG_SUPPORT@ AND @JPEG_FOUND@ ) | ||
find_dependency(JPEG REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_PNG_SUPPORT@ AND @PNG_FOUND@ ) | ||
find_dependency(PNG REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_WEBP_SUPPORT@ ) | ||
find_dependency(WEBP REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_LINK_WITH_SQLITE3@ ) | ||
find_dependency(SQLite3 REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_USE_FFMPEG@ ) | ||
find_dependency(FFMPEG REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_USE_CUDA@ ) | ||
find_dependency(CUDAToolkit REQUIRED) | ||
find_dependency(CUDNN REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_USE_MKL_SEQUENTIAL@ OR @DLIB_USE_MKL_WITH_TBB@ OR @DLIB_USE_MKL_WITH_GNU@ ) | ||
find_dependency(MKL REQUIRED) | ||
endif() | ||
|
||
if ( @DLIB_USE_BLAS@ ) | ||
find_dependency(CBLAS REQUIRED) | ||
endif() | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/dlib.cmake") | ||
|
||
check_required_components(dlib) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's screwy that these deps are repeated but it's simple so it's not the end of the world.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just so dissatisfied with this. You would think cmake understands enough about a target that by the time you've built it it understands how to install it with one line of code.
Libraries like https://github.com/boost-cmake/bcm.git and https://github.com/robotology/ycm sort of provide this if you use their custom functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is annoying. It's also a bit of a regression compared to how it was before. But it's not a big deal at the end of the day, especially compared to how much other stuff is simpler so ¯_(ツ)_/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though it doesn't fix
dlib.pc
for pkg-config. That needs specific compile and linker options. It there was a magic cmake macro/function which took all your imported targets, generator expressions, and resolved everything down to concrete compile and linker options, then everything would be good. It must do this anyway since it has to generate make/ninja files. If there was a way to reuse those functions then it would be great.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah you haven't figured out how to make it generate a
dlib.pc
file yet?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No sorry. I mean it generates it fine but it references libraries like blah::blah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll have to use something like file(GENERATE) as a hack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work.