[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 4 Nov 2010 20:46:27 +0000 (20:46 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 4 Nov 2010 20:46:27 +0000 (20:46 +0000)
- Improve base and bus drivers.

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

drivers/base/beep/CMakeLists.txt
drivers/base/bootvid/CMakeLists.txt
drivers/base/kdcom/CMakeLists.txt
drivers/base/kddll/CMakeLists.txt
drivers/base/nmidebug/CMakeLists.txt
drivers/base/null/CMakeLists.txt
drivers/battery/battc/CMakeLists.txt
drivers/bus/acpi/CMakeLists.txt
drivers/bus/acpi/cmbatt/CMakeLists.txt
drivers/bus/acpi/compbatt/CMakeLists.txt
drivers/bus/isapnp/CMakeLists.txt

index d2ed77c..8b88456 100644 (file)
@@ -1,13 +1,5 @@
 
 
-
-
 add_library(beep SHARED beep.c beep.rc)
 add_library(beep SHARED beep.c beep.rc)
-
-set_target_properties(beep PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols" SUFFIX ".sys")
-
-target_link_libraries(beep
-    -lntoskrnl
-    -lhal)
-
-add_dependencies(beep psdk bugcodes)
-add_cab_target(beep 2)
\ No newline at end of file
+set_module_type(beep kernelmodedriver)
+add_importlibs(beep ntoskrnl hal)
+add_cab_target(beep 2)
index 1f90098..ce9c1f1 100644 (file)
@@ -18,12 +18,11 @@ endif(ARCH MATCHES i386 OR ARCH MATCHES amd64)
 
 add_library(bootvid SHARED ${CMAKE_CURRENT_BINARY_DIR}/bootvid_precomp.h.gch ${SOURCE})
 
 
 add_library(bootvid SHARED ${CMAKE_CURRENT_BINARY_DIR}/bootvid_precomp.h.gch ${SOURCE})
 
-set_target_properties(bootvid PROPERTIES LINK_FLAGS "-Wl,-entry,0 -Wl,--image-base,0x00010000")
-
-target_link_libraries(bootvid
-    -lntoskrnl
-    -lhal)
+set_entrypoint(bootvid 0)
+set_subsystem(bootvid native)
+set_image_base(bootvid 0x00010000)
 
 
+add_importlibs(bootvid ntoskrnl hal)
 add_pch(bootvid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
 add_dependencies(bootvid psdk buildno_header bugcodes)
 add_minicd_target(bootvid reactos bootvid.dll)
 add_pch(bootvid ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE})
 add_dependencies(bootvid psdk buildno_header bugcodes)
 add_minicd_target(bootvid reactos bootvid.dll)
index 8b5e1a1..86f24c4 100644 (file)
@@ -12,12 +12,12 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
 
 add_library(kdcom SHARED ${SOURCE})
 
 
 add_library(kdcom SHARED ${SOURCE})
 
-set_target_properties(kdcom PROPERTIES LINK_FLAGS "-Wl,-entry,0 -Wl,--image-base,0x00010000")
+set_entrypoint(kdcom 0)
+set_subsystem(kdcom native)
+set_image_base(kdcom 0x00010000)
 
 
-target_link_libraries(kdcom
-    -lntoskrnl
-    -lhal)
+add_importlibs(kdcom ntoskrnl hal)
 
 add_dependencies(kdcom psdk buildno_header bugcodes)
 add_minicd_target(kdcom reactos kdcom.dll)
 
 add_dependencies(kdcom psdk buildno_header bugcodes)
 add_minicd_target(kdcom reactos kdcom.dll)
-add_livecd_target(kdcom reactos/system32)
\ No newline at end of file
+add_livecd_target(kdcom reactos/system32)
index aed491f..9909496 100644 (file)
@@ -7,10 +7,10 @@ add_library(kdcom SHARED
     kdserial.c
     ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
 
     kdserial.c
     ${CMAKE_CURRENT_BINARY_DIR}/kdcom.def)
 
-set_target_properties(kdcom PROPERTIES LINK_FLAGS "-Wl,-entry,0 -Wl,--image-base,0x00010000")
+set_entrypoint(kdcom 0)
+set_subsystem(kdcom native)
+set_image_base(kdcom 0x00010000)
 
 
-target_link_libraries(kdcom
-    -lntoskrnl
-    -lhal)
+add_importlibs(kdcom ntoskrnl hal)
 
 add_dependencies(kdcom psdk buildno_header bugcodes)
 
 add_dependencies(kdcom psdk buildno_header bugcodes)
index 45bff00..c817022 100644 (file)
@@ -1,14 +1,8 @@
 
 
-
-
 add_library(nmidebug SHARED nmidebug.c nmidebug.rc)
 
 add_library(nmidebug SHARED nmidebug.c nmidebug.rc)
 
-set_target_properties(nmidebug PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols" SUFFIX ".sys")
-
-target_link_libraries(nmidebug
-    -lntoskrnl
-    -lhal)
+set_module_type(nmidebug kernelmodedriver)
+add_importlibs(nmidebug ntoskrnl hal)
 
 
-add_dependencies(nmidebug psdk bugcodes)
 add_minicd_target(nmidebug reactos)
 add_cab_target(nmidebug 2)
 add_minicd_target(nmidebug reactos)
 add_cab_target(nmidebug 2)
index 896213b..0130b33 100644 (file)
@@ -1,14 +1,9 @@
 
 
-
-
 add_library(null SHARED null.c null.rc)
 
 add_library(null SHARED null.c null.rc)
 
-set_target_properties(null PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols" SUFFIX ".sys")
+target_link_libraries(null ${PSEH_LIB})
 
 
-target_link_libraries(null
-    ${PSEH_LIB}
-    -lntoskrnl
-    -lhal)
+set_module_type(null kernelmodedriver)
+add_importlibs(null ntoskrnl hal)
 
 
-add_dependencies(null psdk bugcodes)
-add_cab_target(null 2)
\ No newline at end of file
+add_cab_target(null 2)
index 51de629..00ed1bc 100644 (file)
@@ -1,14 +1,7 @@
 
 
-
-
 add_definitions(-D_BATTERYCLASS_)
 
 add_library(battc SHARED battc.c battc.rc)
 
 add_definitions(-D_BATTERYCLASS_)
 
 add_library(battc SHARED battc.c battc.rc)
 
-set_target_properties(battc PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
-
-target_link_libraries(battc
-    -lntoskrnl
-    -lhal)
-
-add_dependencies(battc psdk bugcodes)
+set_module_type(battc kernelmodedriver)
+add_importlibs(battc ntoskrnl hal)
index 428d79c..fd45f49 100644 (file)
@@ -1,6 +1,7 @@
 
 
-include_directories(include)
-include_directories(acpica/include)
+include_directories(
+    include
+    acpica/include)
 
 add_library(acpica
     acpica/dispatcher/dsfield.c
 
 add_library(acpica
     acpica/dispatcher/dsfield.c
@@ -137,14 +138,13 @@ add_library(acpi SHARED
     buspdo.c
     main.c)
 
     buspdo.c
     main.c)
 
-set_target_properties(acpi PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
+set_module_type(acpi kernelmodedriver)
 
 target_link_libraries(acpi
     wdmguid
     acpica)
 
 add_importlibs(acpi ntoskrnl hal)
 
 target_link_libraries(acpi
     wdmguid
     acpica)
 
 add_importlibs(acpi ntoskrnl hal)
-add_dependencies(acpi psdk bugcodes)
 
 add_minicd_target(acpi reactos acpi.sys)
 add_livecd_target(acpi reactos/system32/drivers)
 
 add_minicd_target(acpi reactos acpi.sys)
 add_livecd_target(acpi reactos/system32/drivers)
index 27dfba0..c5ce34a 100644 (file)
@@ -8,9 +8,7 @@ list(APPEND SOURCE
 
 add_library(cmbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/cmbatt_cmbatt.h.gch ${SOURCE})
 
 
 add_library(cmbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/cmbatt_cmbatt.h.gch ${SOURCE})
 
-set_target_properties(cmbatt PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
-
+set_module_type(cmbatt kernelmodedriver)
 add_importlibs(cmbatt ntoskrnl hal battc wmilib)
 
 add_pch(cmbatt ${CMAKE_CURRENT_SOURCE_DIR}/cmbatt.h ${SOURCE})
 add_importlibs(cmbatt ntoskrnl hal battc wmilib)
 
 add_pch(cmbatt ${CMAKE_CURRENT_SOURCE_DIR}/cmbatt.h ${SOURCE})
-add_dependencies(cmbatt psdk bugcodes)
index bfe5a05..7df54b1 100644 (file)
@@ -7,8 +7,7 @@ list(APPEND SOURCE
 
 add_library(compbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/compbatt_compbatt.h.gch ${SOURCE})
 
 
 add_library(compbatt SHARED ${CMAKE_CURRENT_BINARY_DIR}/compbatt_compbatt.h.gch ${SOURCE})
 
-set_target_properties(compbatt PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
-
+set_module_type(compbatt kernelmodedriver)
 add_importlibs(compbatt ntoskrnl hal battc)
 add_importlibs(compbatt ntoskrnl hal battc)
+
 add_pch(compbatt ${CMAKE_CURRENT_SOURCE_DIR}/compbatt.h ${SOURCE})
 add_pch(compbatt ${CMAKE_CURRENT_SOURCE_DIR}/compbatt.h ${SOURCE})
-add_dependencies(compbatt psdk bugcodes)
index 9fc61d9..509ba18 100644 (file)
@@ -6,9 +6,8 @@ add_library(isapnp SHARED
     hardware.c
     isapnp.rc)
 
     hardware.c
     isapnp.rc)
 
-set_target_properties(isapnp PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys")
-
+set_module_type(isapnp kernelmodedriver)
 add_importlibs(isapnp ntoskrnl hal)
 add_importlibs(isapnp ntoskrnl hal)
-add_dependencies(isapnp psdk bugcodes buildno_header)
+
 add_minicd_target(isapnp reactos isapnp.sys)
 add_minicd_target(isapnp reactos isapnp.sys)
-add_livecd_target(isapnp reactos/system32/drivers)
\ No newline at end of file
+add_livecd_target(isapnp reactos/system32/drivers)