The background of this question is that I want to build one BrewMP project, the compiler is ARM RVCT40.
Original build method is below: 1. Build many static libraries. 2. Link them to elf. 3. Create mod file, final one. Now What I need to do is to achieve these steps by CMAKE, any idea or support? Thanks. TARGET myapp.elf "C:\progra~1\ARM\RVCT\Programs\4.0\650\win_32-pentium"\armlink -o myapp.elf --vfemode=off --split --reloc --ro_base 0 --entry AEEMod_Load .\NavObj\AEEAppGen.o .\NavObj\AEEModGen.o .\NavObj\TeleNavAppUi.o .\NavObj\cpl.l .\NavObj\cis.l .\NavObj\cpf_ui.l .\NavObj\cpf_lbs.l .\NavObj\myapp.l --first AEEMod_Load --------------------------------------------------------------- TARGET myapp.mod ".\elf2mod" myapp.elf -output myapp.mod elf2mod: RelocMod ro-base=0x200 rw-base=0x126040 elf2mod: Created myapp.mod At 2011-06-15 09:43:09,jianhua <yujianhua1...@126.com> 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) SET (CMAKE_SYSTEM_NAME Generic) SET (CMAKE_SYST EM_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> --cr eate -cr <LINK_FLAGS> <TARGET> <OBJECTS>") SET (CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> --create -cr <LINK_FLAGS> <TARGET> <OBJECTS>")
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake