MantisBT - CMake
View Issue Details
0011547CMakeCMakepublic2010-11-30 22:282011-01-12 07:56
George Staikos 
Brad King 
normalmajoralways
closedfixed 
Apple MacOS X10.4.10
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011547: Cross compile on Mac Host to non-Mac Target generates invalid soname
The soname generation code is compile-time selected instead of runtime selected. The result is that a Mac compiled cmake used to crosscompile Mac->Unix generates SOs of the form libfoo.x.y.so instead of libfoo.so.x.y as expected. Attached patch fixes it.
No tags attached.
patch cmake-cross-apple.patch (2,462) 2010-11-30 22:28
https://public.kitware.com/Bug/file/3541/cmake-cross-apple.patch
Issue History
2010-11-30 22:28George StaikosNew Issue
2010-11-30 22:28George StaikosFile Added: cmake-cross-apple.patch
2010-12-09 11:34Brad KingAssigned To => Brad King
2010-12-09 11:34Brad KingStatusnew => assigned
2010-12-09 11:35Brad KingNote Added: 0023848
2010-12-09 11:35Brad KingStatusassigned => closed
2010-12-09 11:35Brad KingResolutionopen => fixed
2011-01-12 07:56David ColeFixed in Version => CMake 2.8.4
2011-01-12 07:56David ColeTarget Version => CMake 2.8.4

Notes
(0023848)
Brad King   
2010-12-09 11:35   
Thanks. I created a simpler fix:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b7f9014 [^]

The soname applies to MODULE_LIBRARY as well as SHARED_LIBRARY targets. The code is also used for the "realname" which may affect EXECUTABLE targets too. Really the only fix needed was to use a runtime test for an APPLE target platform instead of a compile-time test for an __APPLE__ host platform.