Merge r52051 and r52052 from cmake branch:
* Improve static libs creation in *nix. Dedicated to arty.
* Add a missing dependency.

svn path=/trunk/; revision=52053
This commit is contained in:
Amine Khaldi 2011-06-01 22:18:48 +00:00
parent 295bc5ef26
commit 316a7467b0
3 changed files with 8 additions and 4 deletions

View file

@ -154,6 +154,7 @@ endif()
set_source_files_properties(${FREELDR_ARCH_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_")
add_library(freeldr_arch ${FREELDR_ARCH_SOURCE})
add_dependencies(freeldr_arch bugcodes)
list(APPEND FREELDR_SOURCE
bootmgr.c

View file

@ -19,10 +19,6 @@ set(CMAKE_RC_COMPILE_OBJECT
"${WRC} -i <OBJECT> -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
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_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
set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")