Make libdshowcapture.dll installable #51
No reviewers
Labels
No labels
Bug
Duplicate
Enhancement
Help Wanted
Invalid
Question
Wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/libdshowcapture!51
Loading…
Reference in a new issue
No description provided.
Delete branch "Ybalrid/yba/cmake-install"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
This changes add an
installtarget to the main CMakeLists.txt. It will install the .lib, .dll and necessary header files to the location set byCMAKE_INSTALL_PREFIX(standard practice for CMake projects)Motivation and Context
This allows building this library in a form that is very easy to consume for 3rd party projects.
How Has This Been Tested?
cmakeorcmake-guiCMAKE_INSTALL_PREFIXto a non default directory (if not, it put it inC:\Program Files\<project name>CMAKE_DEBUG_POSTFIXto allow installing both Release and Debug symbolsINSTALLsub projectTypes of changes
Checklist:
There is no documentation to update about building this library, so I am not sure what to do about "all appropriate documentation" In the contribution checklist
@PatTheMav @gxalpha sorry for the ping, just wanted to bring your attention about this. This is just a minimal change to the CMake files ot allow outputting the DLL easier
@ -120,2 +120,4 @@target_link_libraries(libdshowcapture PRIVATE setupapi strmiids ksuser winmmwmcodecdspuuid)set_target_properties(libdshowcapture PROPERTIES PUBLIC_HEADER "${libdshowcapture_HEADERS}")This is fine, but given that it's a single property (that has the potential to hold existing values), I'd personally prefer to use:
set_property(TARGET libdshowcapture APPEND PROPERTY PUBLIC_HEADER ${libdshowcapture_HEADERS})I don't think this is the correct approach:
The headers are contained in subdirectories, but
PUBLIC_HEADERdoes not support directory structures - it will take all the files specified in the list and copy them into theCMAKE_INCLUDE_DIRin a flattened fashion. The subdirectories are lost.This will only work if the library (and its consumers) include the headers without any expectation of subdirectories, i.e.
#include <IVideoCaptureFilter.h>.If the headers in subdirectories are not actually public headers, they in turn should not be added as such.
I'll take a closer look at how these headers are actually installed here, I have been using the output of a cmake install from that script in a project without issues so I probably have missed the flattening of the directories
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.