Skip to content

Determine library type of build from CMake variables

Gabriele Cosmo requested to merge cmake_fix into master

As g4vecgeomnav may link to non-PIC static libs, allow it to be built as static or shared based on the standard CMake variables BUILD_{STATIC,SHARED}_LIBS. The rule for choosing is:

  • If neither are set, default to SHARED as now
  • If one is set, that will be used
  • If both are set, build a SHARED library

Fix provided by Ben Morgan.

Merge request reports