-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Cmake find_package() fix and runtime path #8335
Conversation
about the second commit, while i can understand that in principle it would be the best default, in practice darknet has the legacy of producing build artifacts in the source root folder. |
for the first commit, i agree with it and i might accept it |
I see, I was wondering if there was a reason for not doing that already. For me it's OK as long as I'm able to specify the installation path. |
ok thanks. |
Done!
At the moment it wouldn't be useful as If I'm not mistaken, Stb is embedded in the project and it's only used for building so it's not really a dependency, and Threads are searched with other modules? |
while you're right for Stb, this is not true for PThreads4W. But see #8303 for an open issue about that, which you just reminded me of having to take a decision |
Ok, I added |
The first commit will install
FindCUDNN.cmake
alongsideDarknetConfig.cmake
, fixes Including darknet library in my project using cmake #4729.Without this, the CMake command:
find_package(Darknet)
will not work because CMake doesn't know how to find CUDNN.
The second commit will install the library
libdarknet.so
and binariesuselib
anddarknet
into subdirectories ofCMAKE_INSTALL_PREFIX
and set the runtime paths accordingly.Without this, if you specified, for example,
-DCMAKE_INSTALL_PREFIX=/usr/local
that stuff was still installed in the build directory.