Notes |
|
(0034664)
|
Brad King
|
2013-12-02 09:29
|
|
|
|
(0034665)
|
Aleix Pol
|
2013-12-02 09:34
|
|
NO_SONAME is a per-target property, I need to set it to the whole project.
That's why I said I needed to do it from a Toolchain file.
Is it possible to set a property for all targets? |
|
|
(0034667)
|
Brad King
|
2013-12-02 09:56
|
|
The toolchain file and platform information modules need to be configured to set CMAKE_SHARED_LIBRARY_SONAME_C_FLAG to empty if the platform does not support it. The value is set by Modules/Platform/*.cmake files based on known capabilities of each platform. Therefore you must not be configuring CMake to load the proper platform information files. |
|
|
(0035178)
|
Aleix Pol
|
2014-02-24 19:20
|
|
Why does it make a difference when is it initialized?
Should I patch cmake to be able to disable so-names then? |
|
|
(0035179)
|
Stephen Kelly
|
2014-02-24 19:21
|
|
> NO_SONAME is a per-target property, I need to set it to the whole project.
But you said it doesn't work, even as a per-target property. |
|
|
(0035181)
|
Brad King
|
2014-02-25 07:58
|
|
Re 0014602:0035178: The CMAKE_SHARED_LIBRARY_SONAME_C_FLAG is not a cache entry, but a normal CMake language variable. The Modules/Platform/*.cmake files set the value and will override anything that you try to set in the toolchain file because they are loaded later. The problem is that your toolchain file is telling CMake to target a particular platform, and CMake knows that platform supports soname with a certain flag. If that is not true then you are telling CMake to target the wrong platform. |
|
|
(0035197)
|
Aleix Pol
|
2014-02-25 15:54
|
|
|
|
(0035198)
|
Brad King
|
2014-02-25 16:05
|
|
Add a Platform/Android.cmake file under a directory in your CMAKE_MODULE_PATH and set the CMAKE_SYSTEM_NAME to Android. In Android.cmake place the content
include(Platform/Linux)
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "")
and any other overrides you want. |
|
|
(0035199)
|
Brad King
|
2014-02-25 16:06
|
|
Re 0014602:0035198: Actually, even simpler is to just add a Platform/Linux.cmake file to your CMAKE_MODULE_PATH that does
include(${CMAKE_ROOT}/Modules/Platform/Linux.cmake)
set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "")
and any other overrides you want. Then you do not need to change CMAKE_SYSTEM_NAME. |
|
|
(0035200)
|
Aleix Pol
|
2014-02-25 19:58
|
|
That worked great, I didn't know I could have a different Platform/ directory.
Please, consider the bug fixed (I don't think I can close it).
I'll leave it like that for the moment. If you think the Toolchain file is worth contributing upstream, please tell me. I know there are things to polish still, but I think it could be a first step. |
|
|
(0035202)
|
Brad King
|
2014-02-26 07:59
|
|
Great, thanks for reporting back.
|
|
|
(0036914)
|
Robert Maynard
|
2014-10-06 10:32
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|