Author: akhaldi
Date: Sat Sep 18 12:14:03 2010
New Revision: 48802
URL:
http://svn.reactos.org/svn/reactos?rev=48802&view=rev
Log:
[CMAKE]
- Generalize CMAKE_C_LINK_EXECUTABLE and CMAKE_EXE_LINKER_FLAGS, and use additional flags
per module.
- Fix usetup: make it depend on psdk and buildno_header, and also fix the entry point
(_NtProcessStartup -> _NtProcessStartup@4)
- Make ext2lib depend on psdk.
Modified:
branches/cmake-bringup/CMakeLists.txt
branches/cmake-bringup/base/applications/calc/CMakeLists.txt
branches/cmake-bringup/base/setup/usetup/CMakeLists.txt
branches/cmake-bringup/lib/fslib/ext2lib/CMakeLists.txt
branches/cmake-bringup/ntoskrnl/CMakeLists.txt
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] Sat Sep 18 12:14:03 2010
@@ -32,6 +32,8 @@
# Linking
link_directories("${REACTOS_SOURCE_DIR}/importlibs"
${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
+set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
+set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,--enable-auto-image-base
-Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds")
# Activate support for assembly source files
enable_language(ASM)
Modified: branches/cmake-bringup/base/applications/calc/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications…
==============================================================================
--- branches/cmake-bringup/base/applications/calc/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/applications/calc/CMakeLists.txt [iso-8859-1] Sat Sep 18
12:14:03 2010
@@ -1,6 +1,3 @@
-
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES> -Wl,-L${REACTOS_BINARY_DIR}/lib/3rdparty/mingw")
-set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,-entry,_WinMainCRTStartup
-Wl,--enable-stdcall-fixup -Wl,--enable-auto-image-base -Wl,--kill-at
-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds")
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-DDISABLE_HTMLHELP_SUPPORT=1)
@@ -20,4 +17,6 @@
-lgdi32
-lmsvcrt)
+set_target_properties(calc PROPERTIES LINK_FLAGS
"-Wl,-entry,_WinMainCRTStartup")
+
add_dependencies(calc psdk)
Modified: branches/cmake-bringup/base/setup/usetup/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/setup/usetup…
==============================================================================
--- branches/cmake-bringup/base/setup/usetup/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/base/setup/usetup/CMakeLists.txt [iso-8859-1] Sat Sep 18
12:14:03 2010
@@ -1,6 +1,3 @@
-
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES> -Wl,-L${REACTOS_BINARY_DIR}/lib/3rdparty/mingw")
-set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,-entry,_NtProcessStartup
-Wl,--enable-stdcall-fixup -Wl,--enable-auto-image-base -Wl,--kill-at
-Wl,-T,${REACTOS_SOURCE_DIR}/global.lds")
include_directories(${REACTOS_SOURCE_DIR}/lib/newinflib)
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/zlib)
@@ -40,3 +37,7 @@
vfatlib
mingw_common
-lmsvcrt)
+
+set_target_properties(usetup PROPERTIES LINK_FLAGS
"-Wl,-entry,_NtProcessStartup@4")
+
+add_dependencies(usetup psdk buildno_header)
Modified: branches/cmake-bringup/lib/fslib/ext2lib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/fslib/ext2lib…
==============================================================================
--- branches/cmake-bringup/lib/fslib/ext2lib/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/lib/fslib/ext2lib/CMakeLists.txt [iso-8859-1] Sat Sep 18
12:14:03 2010
@@ -1,4 +1,4 @@
-include_directories(.)
file(GLOB_RECURSE SOURCE "*.c")
add_library(ext2lib ${SOURCE})
+add_dependencies(ext2lib psdk)
Modified: branches/cmake-bringup/ntoskrnl/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/CMakeLis…
==============================================================================
--- branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] (original)
+++ branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] Sat Sep 18 12:14:03 2010
@@ -1,8 +1,5 @@
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE>
<CMAKE_C_LINK_FLAGS> <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 -I${REACTOS_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR}/include -O coff -o <OBJECT> ")
-
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS>
<CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET>
<LINK_LIBRARIES>")
-set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,-entry,_KiSystemStartup@4
-Wl,--image-base,0x80800000 -Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds
-Wl,--subsystem,native")
add_definitions(-D__NTOSKRNL__)
add_definitions(-D_NTOSKRNL_)
@@ -406,7 +403,7 @@
add_executable(ntoskrnl ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl_ntoskrnl.h.gch)
-set_target_properties(ntoskrnl PROPERTIES LINK_FLAGS
"-Wl,-entry,_KiSystemStartup@4")
+set_target_properties(ntoskrnl PROPERTIES LINK_FLAGS "-Wl,-entry,_KiSystemStartup@4
-Wl,--image-base,0x80800000 -Wl,--subsystem,native")
target_link_libraries(ntoskrnl
${CMAKE_CURRENT_SOURCE_DIR}/ntoskrnl_i386.def