[CMake] Doesn't support SHARED libraries during cross compiling using ARM RVCT40.
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Jun 15 13:14:11 EDT 2011
On Wednesday 15 June 2011, jianhua wrote:
> Hi All;
>
> No matter Linux or Windows, when try to build SHARED library, it will
> always get the following error message. ADD_LIBRARY(hello SHARED hello.c)
>
> ADD_LIBRARY for library hello is used with the SHARED option, but the
> target platform supports only STATIC libraries. Building it STATIC
> instead. This may lead to problems.
>
> My question:
> a) Why not support it? Is my CMakeLists any wrong for cross compiling?
> b) Is there any method available to support it?
>
> I have searched in google and found the following threat, but after
> SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE), it still
> got the same error message.
> http://web.archiveorange.com/archive/v/5y7PkYdzD3pM4MX0QSD9
>
> Anyone who has idea about it please help, thanks.
>
> >>>>>>>>>>>>>>>> brewmp-arm.cmake
>
> INCLUDE (CMakeForceCompiler)
Are you sure you need this ?
This is in general a bad idea.
>
> SET (CMAKE_SYSTEM_NAME Generic)
"Generic" operating system does not support shared libs.
Do you have an operation system on your target device ?
Alex
More information about the CMake
mailing list