[CMAKE]
[reactos.git] / drivers / storage / classpnp / CMakeLists.txt
index 9daf745..aa6f958 100644 (file)
@@ -7,8 +7,17 @@ add_definitions(
     -DCLASS_GLOBAL_USE_DELAYED_RETRY=1
     -DCLASS_GLOBAL_BUFFERED_DEBUG_PRINT=0
     -DCLASS_GLOBAL_BUFFERED_DEBUG_PRINT_BUFFER_SIZE=512
-    -DCLASS_GLOBAL_BUFFERED_DEBUG_PRINT_BUFFERS=512
-)
+    -DCLASS_GLOBAL_BUFFERED_DEBUG_PRINT_BUFFERS=512)
+
+if(ARCH MATCHES i386)
+    if(MSVC)
+        add_definitions(/Gz)
+    else()
+        add_definitions(-mrtd -fno-builtin -w)
+    endif()
+endif()
+
+spec2def(classpnp.sys class.spec)
 
 list(APPEND SOURCE
     autorun.c
@@ -26,17 +35,12 @@ list(APPEND SOURCE
     utils.c
     xferpkt.c
     class.rc
-)
-
-spec2def(classpnp ${CMAKE_CURRENT_SOURCE_DIR}/class.spec ${CMAKE_CURRENT_BINARY_DIR}/class.def)
+    ${CMAKE_CURRENT_BINARY_DIR}/class.def)
 
 add_library(classpnp SHARED ${SOURCE})
-target_link_libraries(classpnp ${CMAKE_CURRENT_BINARY_DIR}/class.def pseh libcntpr)
-
+target_link_libraries(classpnp ${PSEH_LIB} libcntpr)
 
 set_module_type(classpnp kernelmodedriver)
-
 add_importlibs(classpnp hal ntoskrnl)
 
-add_minicd_target(classpnp reactos classpnp.sys)
-add_livecd_target(classpnp reactos/system32/drivers)
\ No newline at end of file
+add_cd_file(TARGET classpnp DESTINATION reactos/system32/drivers NO_CAB)