[CMake] Cross-compiling on OS X/x86 for Linux/ARM, linking a library
Hendrik Sattler
post at hendrik-sattler.de
Tue Oct 20 07:56:46 EDT 2009
Zitat von Vladimir Lebedev-Schmidthof <vlebedev at envionsoftware.com>:
> On Oct 19, 2009, at 23:18 PM, Alexander Neundorf wrote:
>>> I set CMAKE_SYSTEM to Linux, even added "SET(APPLE 0)" but
>>> install_name option is still generating.
>>
>> You should set "CMAKE_SYSTEM_NAME", not "CMAKE_SYSTEM" to "Linux". If you
>> really set CMAKE_SYSTEM instead of CMAKE_SYSTEM_NAME, this will fix your
>> problem (after a quick look it seems install_name is really only set in the
>> Modules/Platform/Darwin*.cmake files, which should not get loaded if
>> CMAKE_SYSTEM_NAME is set to Linux).
>>
> I tried. Setting CMAKE_SYSTEM_NAME to "Linux" does not seem to affect
> CMAKE_SYSTEM
WHERE are you try to set this? Setting this in a CMakeLists.txt file
will not work. Did you read the wiki page[1] about cross-compiling?
Check that CMAKE_CROSSCOMPILING is set to true.
HS
[1]: http://www.cmake.org/Wiki/CMake_Cross_Compiling
More information about the CMake
mailing list