* Improve static libs creation in *nix. Dedicated to arty.

svn path=/branches/cmake-bringup/; revision=52051
This commit is contained in:
Amine Khaldi 2011-06-01 22:05:24 +00:00
parent 7a6072bcfa
commit a57324a1d4
2 changed files with 7 additions and 4 deletions

View file

@ -19,10 +19,6 @@ set(CMAKE_RC_COMPILE_OBJECT
"${WRC} -i <OBJECT> -o <OBJECT>" "${WRC} -i <OBJECT> -o <OBJECT>"
"<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>") "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>")
if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
endif()
# Compiler Core # Compiler Core
add_definitions(-pipe -fms-extensions) add_definitions(-pipe -fms-extensions)

View file

@ -35,6 +35,13 @@ set(CMAKE_RC_COMPILER ${MINGW_PREFIX}windres)
set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc) set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>") set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>")
set(CMAKE_AR ${MINGW_PREFIX}ar)
if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
endif()
# Use stdcall fixups, and don't link with anything by default unless we say so # Use stdcall fixups, and don't link with anything by default unless we say so
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries") set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")