[CMake] Doesn't support SHARED libraries during cross compiling using ARM RVCT40.
jianhua
yujianhua1982 at 126.com
Tue Jun 14 21:43:09 EDT 2011
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)
SET (CMAKE_SYSTEM_NAME Generic)
SET (CMAKE_SYSTEM_VERSION 1)
SET (CMAKE_SYSTEM_PROCESSOR arm)
SET (CMAKE_CROSSCOMPILING 1)
SET (RVCT40BIN $ENV{RVCT40BIN})
SET (BREWMP_PLATFORM $ENV{BREWMPSDK})
SET (_CMAKE_TOOLCHAIN_PREFIX arm)
SET (_CMAKE_TOOLCHAIN_LOCATION ${RVCT40BIN})
find_file(ARMCC armcc ${RVCT40BIN})
CMAKE_FORCE_C_COMPILER (${ARMCC} ArmBMPCross)
CMAKE_FORCE_CXX_COMPILER (${ARMCC} ArmBMPCross)
set (CMAKE_C_FLAGS "--cpu ARM9TDMI --apcs /noropi/interwork/norwpi --littleend --split_sections --fpu=softvfp --exceptions --no_implicit_include ${BREWMP_INCLUDE} ${BREWMP_DEFINE}" CACHE STRING "c flags" FORCE)
set (CMAKE_CXX_FLAGS "--cpu ARM9TDMI --apcs /noropi/interwork/norwpi --littleend --split_sections --fpu=softvfp --exceptions --no_implicit_include ${BREWMP_INCLUDE} ${BREWMP_DEFINE}" CACHE STRING "c++ flags" FORCE)
SET (CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <LINK_FLAGS> <TARGET> <OBJECTS>")
SET (CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <LINK_FLAGS> <TARGET> <OBJECTS>")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110615/79c1386c/attachment-0001.htm>
More information about the CMake
mailing list