[CMAKE]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 28 Aug 2011 18:28:18 +0000 (18:28 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 28 Aug 2011 18:28:18 +0000 (18:28 +0000)
- Remove some hacks from ntdll and msvcrt build files
- Bring msvcrt* files in better sync

svn path=/trunk/; revision=53483

reactos/dll/ntdll/CMakeLists.txt
reactos/dll/win32/msvcrt/CMakeLists.txt
reactos/dll/win32/msvcrt20/CMakeLists.txt
reactos/dll/win32/msvcrt40/CMakeLists.txt

index 9fd4bab..5e1c751 100644 (file)
@@ -15,23 +15,23 @@ list(APPEND SOURCE
     csr/capture.c
     csr/connect.c
     dbg/dbgui.c
-       ldr/ldrapi.c
-       ldr/ldrinit.c
-       ldr/ldrpe.c
-       ldr/ldrutils.c
+    ldr/ldrapi.c
+    ldr/ldrinit.c
+    ldr/ldrpe.c
+    ldr/ldrutils.c
     rtl/libsupp.c
     rtl/version.c
     def/ntdll.rc
     ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
-    
+
 if(ARCH MATCHES i386)
-list(APPEND SOURCE dispatch/i386/dispatch.S)
+    list(APPEND SOURCE dispatch/i386/dispatch.S)
 elseif(ARCH MATCHES amd64)
-list(APPEND SOURCE dispatch/amd64/stubs.c)
+    list(APPEND SOURCE dispatch/amd64/stubs.c)
 elseif(ARCH MATCHES arm)
-list(APPEND SOURCE dispatch/arm/stubs_asm.s)
+    list(APPEND SOURCE dispatch/arm/stubs_asm.s)
 else()
-list(APPEND SOURCE dispatch/dispatch.c)
+    list(APPEND SOURCE dispatch/dispatch.c)
 endif(ARCH MATCHES i386)
 
 add_library(ntdll SHARED ${SOURCE})
@@ -39,13 +39,11 @@ add_library(ntdll SHARED ${SOURCE})
 set_entrypoint(ntdll 0)
 
 if(MSVC)
-target_link_libraries(ntdll rtl)
-add_linkerflag(ntdll /RELEASE)
-else()
-target_link_libraries(ntdll -Wl,--whole-archive rtl -Wl,--no-whole-archive)
+    add_linkerflag(ntdll /RELEASE)
 endif()
 
 target_link_libraries(ntdll
+                      rtl
                       ntdllsys
                       libcntpr
                       ${PSEH_LIB})
index df950e5..4335e1e 100644 (file)
@@ -23,20 +23,15 @@ list(APPEND SOURCE
 
 add_library(msvcrt SHARED ${SOURCE})
 
-if(NOT MSVC)
-    set_target_properties(msvcrt PROPERTIES LINK_FLAGS "-u __seh_longjmp_unwind@4")
-endif()
-
 add_dependencies(msvcrt psdk)
 set_entrypoint(msvcrt DllMain 12)
 set_image_base(msvcrt ${baseaddress_msvcrt})
 
-target_link_libraries(msvcrt crt wine)
+target_link_libraries(msvcrt crt wine ${PSEH_LIB})
 
 if(MSVC)
+    # export of deleting destructor "name"
     add_linkerflag(msvcrt "/ignore:4102")
-else()
-    target_link_libraries(msvcrt pseh)
 endif()
 
 add_importlibs(msvcrt kernel32 ntdll)
index 0d4714a..d9737a6 100644 (file)
@@ -1,4 +1,6 @@
 
+spec2def(msvcrt20.dll msvcrt20.spec)
+
 add_definitions(
     -DUSE_MSVCRT_PREFIX
     -D_MSVCRT_
@@ -11,8 +13,6 @@ add_definitions(
 
 include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
 
-spec2def(msvcrt20.dll msvcrt20.spec)
-
 list(APPEND SOURCE
     msvcrt20.c
     stubs.c
@@ -20,17 +20,18 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/msvcrt20.def)
 
 add_library(msvcrt20 SHARED ${SOURCE})
+
+add_dependencies(msvcrt20 psdk)
 set_entrypoint(msvcrt20 DllMain 12)
 set_image_base(msvcrt20 ${baseaddress_msvcrt20})
 
-target_link_libraries(msvcrt20 crt wine)
+target_link_libraries(msvcrt20 crt wine ${PSEH_LIB})
 
 if(MSVC)
+    # export of deleting destructor "name"
     add_linkerflag(msvcrt20 "/ignore:4102")
-else()
-    target_link_libraries(msvcrt20 pseh)
 endif()
 
 add_importlibs(msvcrt20 kernel32 ntdll)
-add_dependencies(msvcrt20 psdk)
+
 add_cd_file(TARGET msvcrt20 DESTINATION reactos/system32 FOR all)
index 009f05d..eb67cd7 100644 (file)
@@ -1,4 +1,6 @@
 
+spec2def(msvcrt40.dll msvcrt40.spec)
+
 add_definitions(
     -DUSE_MSVCRT_PREFIX
     -D_MSVCRT_
@@ -11,8 +13,6 @@ add_definitions(
 
 include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
 
-spec2def(msvcrt40.dll msvcrt40.spec)
-
 list(APPEND SOURCE
     msvcrt40.c
     stubs.c
@@ -20,15 +20,16 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/msvcrt40.def)
 
 add_library(msvcrt40 SHARED ${SOURCE})
-set_image_base(msvcrt40 ${baseaddress_msvcrt40})
+
+add_dependencies(msvcrt40 psdk)
 set_entrypoint(msvcrt40 DllMain 12)
+set_image_base(msvcrt40 ${baseaddress_msvcrt40})
 
-target_link_libraries(msvcrt40 crt wine)
+target_link_libraries(msvcrt40 crt wine ${PSEH_LIB})
 
 if(MSVC)
+    # export of deleting destructor "name"
     add_linkerflag(msvcrt40 "/ignore:4102")
-else()
-    target_link_libraries(msvcrt40 pseh)
 endif()
 
 add_importlibs(msvcrt40 kernel32 ntdll)