[CMake] Repair shared libraries for CMake < 3.0.
a) OBJECT is needed to avoid linking libdunegrid to itself. b) Linking a library to itself will become an error in CMake 3.0. c) Shared libraries build with OBJECT will fail for user code that links DUNE_LIBS but sets not the flags for the linked grids (e.g. in dune-localfunctions 2.3 or dune-pdelab). The order of libs is not correct, libdunegrid should be before the external grids. d) Staying compatible with CMake 2.8.6 forces us to not use the linking stuff introduced by 2.8.9 and 2.8.12. e) Maybe we can fix this in Dune's code, but not as fast as needed. Due to a) - e) you cannot build shared libraries with external grids and CMake 3.0. Static libs do work. (cherry picked from commit a21f4572) Signed-off-by: Christoph Grüninger <email@example.com>
Showing with 11 additions and 4 deletions