[CMAKE]
authorJérôme Gardou <jerome.gardou@reactos.org>
Sun, 31 Oct 2010 22:41:31 +0000 (22:41 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Sun, 31 Oct 2010 22:41:31 +0000 (22:41 +0000)
  - improve class2 build file
  - set EXTERNAL_OBJECT properties to ntdll def file

svn path=/branches/cmake-bringup/; revision=49382

dll/ntdll/CMakeLists.txt
drivers/storage/class/class2/CMakeLists.txt

index eaac8df..9d84e53 100644 (file)
@@ -18,7 +18,10 @@ list(APPEND SOURCE
     ldr/actctx.c
     rtl/libsupp.c
     rtl/version.c
-    def/ntdll.rc)
+    def/ntdll.rc
+    def/ntdll.def)
+    
+set_source_files_properties(def/ntdll.def PROPERTIES EXTERNAL_OBJECT TRUE)
 
 if(ARCH MATCHES i386)
 list(APPEND SOURCE dispatch/i386/dispatch.S)
@@ -52,4 +55,4 @@ add_pch(ntdll ${CMAKE_CURRENT_SOURCE_DIR}/include/ntdll.h ${SOURCE})
 add_dependencies(ntdll ntstatus)
 
 add_minicd_target(ntdll reactos/system32 ntdll.dll)
-add_cab_target(ntdll 1)
+add_cab_target(ntdll 1)
\ No newline at end of file
index 6f0da74..9714427 100644 (file)
@@ -5,15 +5,12 @@ include_directories(..)
 
 spec2def(class2.sys class2.spec)
 
-add_library(class2 SHARED class2.c class2.rc)
+add_library(class2 SHARED class2.c class2.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/class2.def)
 
-set_target_properties(class2 PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+set_module_type(class2 kernelmodedriver)
 
-target_link_libraries(class2
-    ${CMAKE_CURRENT_BINARY_DIR}/class2.def
-    -lscsiport
-    -lntoskrnl
-    -lhal)
+add_importlibs(class2 scsiport ntoskrnl hal)
 
 add_dependencies(class2 psdk bugcodes)
 add_minicd_target(class2 reactos class2.sys)