[CMAKE]
[reactos.git] / dll / ntdll / CMakeLists.txt
index 9d84e53..f2027d0 100644 (file)
@@ -1,4 +1,6 @@
 
+spec2def(ntdll.dll def/ntdll.spec)
+
 add_definitions(
     -D__NTDLL__
     -D_NTOSKRNL_
@@ -13,16 +15,18 @@ list(APPEND SOURCE
     csr/capture.c
     csr/connect.c
     dbg/dbgui.c
+       ldr/actctx.c
+       ldr/ldrapi.c
+       ldr/ldrinit.c
+       ldr/ldrpe.c
+       ldr/ldrutils.c
     ldr/startup.c
     ldr/utils.c
-    ldr/actctx.c
     rtl/libsupp.c
     rtl/version.c
     def/ntdll.rc
-    def/ntdll.def)
+    ${CMAKE_CURRENT_BINARY_DIR}/ntdll.def)
     
-set_source_files_properties(def/ntdll.def PROPERTIES EXTERNAL_OBJECT TRUE)
-
 if(ARCH MATCHES i386)
 list(APPEND SOURCE dispatch/i386/dispatch.S)
 elseif(ARCH MATCHES amd64)
@@ -46,13 +50,13 @@ target_link_libraries(ntdll -Wl,--whole-archive rtl -Wl,--no-whole-archive)
 endif()
 
 target_link_libraries(ntdll
-    ${CMAKE_CURRENT_SOURCE_DIR}/def/ntdll.def
-    ntdllsys
-    libcntpr
-    pseh)
-                      
+                      ntdllsys
+                      libcntpr
+                      ${PSEH_LIB})
+
+set_image_base(ntdll ${baseaddress_ntdll})
 add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
-add_dependencies(ntdll ntstatus)
+add_dependencies(ntdll ntstatus asm)
 
-add_minicd_target(ntdll reactos/system32 ntdll.dll)
-add_cab_target(ntdll 1)
\ No newline at end of file
+add_cd_file(TARGET ntdll DESTINATION reactos/system32 NO_CAB)
+add_importlib_target(def/ntdll.spec)