Skip to content
  • Modestas Vainius's avatar
    Support building shared libraries or modules without soname (#13155) · e1409ac5
    Modestas Vainius authored and Brad King's avatar Brad King committed
    Add a boolean target property NO_SONAME which may be used to disable
    soname for the specified shared library or module even if the platform
    supports it.  This property should be useful for private shared
    libraries or various plugins which live in private directories and have
    not been designed to be found or loaded globally.
    
    Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and
    hard-coded -install_name flags with a conditional <SONAME_FLAG> which is
    expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG
    definition as long as soname supports is enabled for the target in
    question.  Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in
    rules in case third party projects still use it.  Such projects would
    not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be
    expanded.  Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well.  Since
    -install_name is soname on OS X, this should not be a problem i...
    e1409ac5