Author: akhaldi
Date: Tue Jul 27 23:55:52 2010
New Revision: 48319
URL:
http://svn.reactos.org/svn/reactos?rev=48319&view=rev
Log:
[CMAKE]
- Add rtl to build.
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/lib/CMakeLists.txt
branches/cmake-bringup/lib/rtl/CMakeLists.txt
branches/cmake-bringup/toolchain-mingw32.cmake
Modified: branches/cmake-bringup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
==============================================================================
--- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Tue Jul 27 23:55:52 2010
@@ -19,6 +19,9 @@
export(TARGETS widl wmc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE
native- )
else()
+
+# Activate support for asm source files
+enable_language(ASM)
set(IMPORT_EXECUTABLES "${REACTOS_SOURCE_DIR}/build/ImportExecutables.cmake"
CACHE FILEPATH "Host executables")
include(${IMPORT_EXECUTABLES})
@@ -68,3 +71,4 @@
add_subdirectory(lib)
endif()
+
Modified: branches/cmake-bringup/lib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/CMakeLists.tx…
==============================================================================
--- branches/cmake-bringup/lib/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/CMakeLists.txt [iso-8859-1] Tue Jul 27 23:55:52 2010
@@ -16,7 +16,7 @@
#add_subdirectory(pseh)
add_subdirectory(recyclebin)
add_subdirectory(rossym)
-#add_subdirectory(rtl)
+add_subdirectory(rtl)
add_subdirectory(sdk)
add_subdirectory(smlib)
add_subdirectory(tdilib)
Modified: branches/cmake-bringup/lib/rtl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rtl/CMakeList…
==============================================================================
--- branches/cmake-bringup/lib/rtl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/rtl/CMakeLists.txt [iso-8859-1] Tue Jul 27 23:55:52 2010
@@ -1,4 +1,28 @@
-file(GLOB_RECURSE SOURCE "*.c")
+include_directories(.)
-add_library(rtl ${SOURCE})
+add_definitions(-D_NTOSKRNL_)
+add_definitions(-DNO_RTL_INLINES)
+add_definitions(-D_NTSYSTEM_)
+add_definitions(-D_NTDLLBUILD_)
+
+file(GLOB_RECURSE ARCH_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/*.c
${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}/*.S)
+
+get_directory_property(defines COMPILE_DEFINITIONS)
+
+foreach(arg ${defines})
+ set(result_defs "${result_defs} -D${arg}")
+endforeach(arg ${defines})
+
+set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o
<OBJECT> ${result_defs} -D__ASM__ <FLAGS> -c <SOURCE>")
+
+file(GLOB SOURCE "*.c")
+
+list(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/avlsupp.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/mem.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/memgen.c
+ )
+
+add_library(rtl ${ARCH_SOURCE} ${SOURCE})
+add_dependencies(rtl psdk)
+
Modified: branches/cmake-bringup/toolchain-mingw32.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-mingw32…
==============================================================================
--- branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] Tue Jul 27 23:55:52 2010
@@ -1,3 +1,6 @@
+
+SET(ARCH i386)
+
# Choose the right MinGW prefix
if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set(MINGW_PREFIX "")
@@ -13,6 +16,8 @@
SET(CMAKE_C_COMPILER ${MINGW_PREFIX}gcc)
SET(CMAKE_CXX_COMPILER ${MINGW_PREFIX}g++)
+SET(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc)
+
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment