[cmake-developers] Is there a way to disable soname versioning?
Nils Gladitz
nilsgladitz at gmail.com
Mon Feb 1 03:01:03 EST 2016
On 01.02.2016 00:09, Eric Wing wrote:
> This has been an ongoing nuisance for me, so I thought I would finally
> ask. Is there a way I can force soname versioning without modifying
> everybody's CMake build scripts?
>
> The main problem is Android. Using soname versioning on Android will
> basically cause things to break at runtime. It would be nice if the
> CMake commands that set the version would be ignored in the Android
> case. (I know Android is not officially supported by CMake and
> cross-compile toolchains are being used, but if I knew how to put this
> in the toolchain, that would be a big help.)
The "Android" platform file included with CMake contains:
set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
Which should do just that.
All you should have to do for this to take effect is have:
set(CMAKE_SYSTEM_NAME Android)
In your toolchain file (instead of what ever you've got it set to now).
Nils
More information about the cmake-developers
mailing list