-
Notifications
You must be signed in to change notification settings - Fork 3
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
CMakeLists.txt assumes backscrub build directory layout #3
Comments
After patching backscrub to install its header into the prefix, this patch makes obs-backscrub get the header from its installed location. The link targets are still fetched from the backscrub build dir and that variable is renamed to indicate that it is only used for that purpose. Both variables can be overridden separately. See ali1234/backscrub@9dea13b and phlash#3
Good point. I'm not sure I want to insist on installing Right now I do neither and have this fragile dependency between my projects because I'm lazy and wanted to avoid re-compiling Tensorflow Lite everywhere. I'll try using |
It should be possible to make |
Here is https://github.com/ali1234/obs-backscrub/tree/bs-submodule Note that it points to my fork of Also note that I have patched the default model path in What has been done in
The above changes are not strictly necessary for this but they make the layout easier to understand, as a large amount of code can be removed from the top level
Again, these aren't strictly necessary and only affect installation which we don't use when
The effect of this is that when you add So after all this, you can now make one build directory and call
All of this builds, the backscrub executable works, and the OBS plugin works too as long as it can find the model. The next step would be to create an installable BackscrubConfig.cmake so that the install libraries and headers are usable without needing |
Good work! I've just been doing similar in my tree, but didn't want to munge the existing This finds and pulls in the Here I have just pushed a modified |
As long as you know where the backscrub source is you can just add it directly like this: This will work against backscrub main. You don't need to build it, just set You do not need to find and use BackscrubTargets.cmake at all. |
Yep, I'm aware that using Using a git sub-project reference to pull in |
OK! The top-level Some tidy-up to export the include path(s) in the |
The CMakeLists.txt allows to override the
BACKSCRUB
variable to specify the path to the backscrub repository:obs-backscrub/CMakeLists.txt
Lines 10 to 12 in de6c75f
Then it does two things with this variable. It sets LIBBACKSRUB_INCLUDE_DIR, which needs to point to the source repository:
obs-backscrub/CMakeLists.txt
Line 16 in de6c75f
and also it includes a file from the build directory:
obs-backscrub/CMakeLists.txt
Line 15 in de6c75f
Here the build directory is assumed to be within the source repository with no way to override. This is not necessarily the case. The cmake build directory can be anywhere, and in the case of building a snap package, it will be along side the source, not inside it.
The text was updated successfully, but these errors were encountered: