[ros-diffs] [akhaldi] 52051: [CMAKE] * Improve static libs creation in *nix. Dedicated to arty.

akhaldi at svn.reactos.org akhaldi at svn.reactos.org
Wed Jun 1 22:05:24 UTC 2011


Author: akhaldi
Date: Wed Jun  1 22:05:24 2011
New Revision: 52051

URL: http://svn.reactos.org/svn/reactos?rev=52051&view=rev
Log:
[CMAKE]
* Improve static libs creation in *nix. Dedicated to arty.

Modified:
    branches/cmake-bringup/gcc.cmake
    branches/cmake-bringup/toolchain-mingw32.cmake

Modified: branches/cmake-bringup/gcc.cmake
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=52051&r1=52050&r2=52051&view=diff
==============================================================================
--- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Wed Jun  1 22:05:24 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: branches/cmake-bringup/toolchain-mingw32.cmake
URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-mingw32.cmake?rev=52051&r1=52050&r2=52051&view=diff
==============================================================================
--- branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] Wed Jun  1 22:05:24 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")
 




More information about the Ros-diffs mailing list