Author: akhaldi
Date: Wed Jun 1 22:18:48 2011
New Revision: 52053
URL:
http://svn.reactos.org/svn/reactos?rev=52053&view=rev
Log:
[CMAKE]
Merge r52051 and r52052 from cmake branch:
* Improve static libs creation in *nix. Dedicated to arty.
* Add a missing dependency.
Modified:
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
trunk/reactos/gcc.cmake
trunk/reactos/toolchain-mingw32.cmake
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Wed Jun 1 22:18:48
2011
@@ -154,6 +154,7 @@
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
Modified: trunk/reactos/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/gcc.cmake?rev=52053&r1…
==============================================================================
--- trunk/reactos/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/gcc.cmake [iso-8859-1] Wed Jun 1 22:18:48 2011
@@ -18,10 +18,6 @@
"<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1
<DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk
-I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos
-I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine
-I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E
<SOURCE> -o <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)
Modified: trunk/reactos/toolchain-mingw32.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/toolchain-mingw32.cmake?re…
==============================================================================
--- trunk/reactos/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ trunk/reactos/toolchain-mingw32.cmake [iso-8859-1] Wed Jun 1 22:18:48 2011
@@ -35,6 +35,13 @@
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")