Install dependencies on Windows, support >2 configs, and fix rpath#3
Install dependencies on Windows, support >2 configs, and fix rpath#3ethanbb wants to merge 2 commits intoopen-ephys-plugins:masterfrom
Conversation
|
I've confirmed that the TNE Lab's version of CMakeLists.txt for libraries (from "OpenEphysFFTW") and for plugins (from "PhaseCalculator") work when used to build other plugins that depend on custom libraries (the "TTL Conditional Trigger" plugin and "Retro Icons" library that I'm working on for our lab (https://github.com/orgs/att-circ-contrl/repositories). The Open Ephys v5 templates for library and plugin development do not play nicely in that situation (symbols offered by the library aren't resolved at run-time, so the library might not actually be loaded). I do not have enough expertise with CMake to determine exactly why this is happening (I spent about a day trying). The only functional difference I found was that the TNE config files result in a library named "libFOO" while the Open Ephys template config files result in a library named "FOO" without the "lib" prefix. The conditional trigger and retro icons plugins have both versions of the config file (selected by symlink) if any of you want to do side-by-side diffs on them (I already did, and couldn't find salient differences with my limited knowledge of CMake). |
This fixes a couple of issues that came up when I was testing on Windows and Linux (including #2 and things discussed in #1):
libsfolder weren't being installed on Windows. They need to be in thesharedfolder to be used during runtime. (Not an issue on other platforms since the dependency libraries should be linked from standard search locations.)CONFIGURATION_FOLDERto"Release"or"Debug"prevented building the other 2 configurations into their own directories, which you might want to do if you find them useful and don't want to overwrite the release build. To fix that we can just use$<CONFIG>directly.rpathvalue of$$ORIGINdoes not work at least on Ubuntu 18.04, where transitive dependencies of an .so are loaded at runtime - changed it to$ORIGINinstead. (This is more of an issue for plugins).Let me know of any issues/concerns.