Logic to install plugins for cmake netcdf-c builds #2887
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.
While plugin installation support is provided for the autotools build method, this was apparently not implemented for CMake builds of
netcdf-c. This PR aims to rectify this inconsistency. As with many configurations, the process for turning plugin install on changed in 4.9.3.From 4.9.0 to 4.9.2, setting
PLUGIN_INSTALL_DIRto the desired directory is all that is required (assuming we are building a shared library).Meanwhile, in 4.9.3, a new variable is introduced and documented which serves the same purpose -
NETCDF_WITH_PLUGIN_DIR. However, setting this doesn't seem to be sufficient as there is no logic in the top-level CMakeLists.txt to setENABLE_PLUGIN_INSTALL, which is required for plugin libraries to be installed in thepluginssubdirectory. This seems like a bug, but we can work around it by setting this manually.