[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 10 Mar 2012 20:16:56 +0000 (20:16 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 10 Mar 2012 20:16:56 +0000 (20:16 +0000)
* Addendum to my previous commit.

svn path=/trunk/; revision=56107

reactos/drivers/storage/class/cdrom_new/CMakeLists.txt
reactos/drivers/storage/class/disk_new/CMakeLists.txt
reactos/drivers/storage/classpnp/CMakeLists.txt
reactos/drivers/usb/usbehci/CMakeLists.txt
reactos/drivers/usb/usbohci/CMakeLists.txt
reactos/drivers/usb/usbuhci/CMakeLists.txt
reactos/drivers/wdm/audio/backpln/portcls/CMakeLists.txt

index 0cc8df7..467aff4 100644 (file)
@@ -1,13 +1,24 @@
 include_directories(..)
 
-add_library(cdrom_new SHARED cdrom.c data.c ioctl.c mmc.c sec.c)
+list(APPEND SOURCE
+    cdrom.c
+    data.c
+    ioctl.c
+    mmc.c
+    sec.c)
+
+add_library(cdrom_new SHARED ${SOURCE})
 
 target_link_libraries(cdrom_new libcntpr wdmguid)
+
 if(ARCH MATCHES i386)
+    # FIXME: http://www.cmake.org/Bug/view.php?id=12998
     if(MSVC)
-        add_target_compile_flags(cdrom_new "/Gz")
+        #add_target_compile_flags(cdrom_new "/Gz")
+        set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
     else()
-        add_target_compile_flags(cdrom_new "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign")
+        #add_target_compile_flags(cdrom_new "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign")
+        set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign")
     endif()
 endif()
 
index 02c7dbf..3d91ad8 100644 (file)
@@ -15,10 +15,12 @@ add_library(disk_new SHARED
 
 target_link_libraries(disk_new libcntpr wdmguid)
 if(ARCH MATCHES i386)
+    # FIXME: http://www.cmake.org/Bug/view.php?id=12998
     if(MSVC)
-        add_target_compile_flags(disk_new "/Gz")
+        #add_target_compile_flags(disk_new "/Gz")
+        set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
     else()
-        # FIXME: http://www.cmake.org/Bug/view.php?id=12998
+        
         #add_target_compile_flags(disk_new "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign")
         set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-mrtd -fno-builtin -Wno-unused-variable -Wno-pointer-sign")
     endif()
index df2a557..c3968a0 100644 (file)
@@ -33,10 +33,12 @@ add_library(classpnp SHARED
     class.rc)
 
 if(ARCH MATCHES i386)
+    # FIXME: http://www.cmake.org/Bug/view.php?id=12998
     if(MSVC)
-        add_target_compile_flags(classpnp "/Gz")
+        #add_target_compile_flags(classpnp "/Gz")
+        set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/Gz")
     else()
-        # FIXME: http://www.cmake.org/Bug/view.php?id=12998        
+        
         #add_target_compile_flags(classpnp "-mrtd -fno-builtin -w")
         set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-mrtd -fno-builtin -w")
     endif()
index fef3b86..effa808 100644 (file)
@@ -4,16 +4,16 @@ set_cpp()
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x600)
 
+include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
 
-include_directories(
-    ${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
-
-
-add_library(usbehci SHARED
+list(APPEND SOURCE
     usbehci.cpp
     usb_request.cpp
     usb_queue.cpp
-    hardware.cpp
+    hardware.cpp)
+
+add_library(usbehci SHARED
+    ${SOURCE}
     usbehci.rc)
 
 target_link_libraries(usbehci
@@ -21,12 +21,15 @@ target_link_libraries(usbehci
     libcntpr
     ${PSEH_LIB})
 
+# FIXME: http://www.cmake.org/Bug/view.php?id=12998
 if(MSVC)
-    set_target_properties(usbehci PROPERTIES COMPILE_FLAGS "/GR-")
+    #add_target_compile_flags(usbehci "/GR-")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
 else()
     target_link_libraries(usbehci -lgcc)
-    set_target_properties(usbehci PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
-endif(MSVC)
+    #add_target_compile_flags(usbehci "-fno-exceptions -fno-rtti")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
+endif()
 
 set_module_type(usbehci kernelmodedriver)
 add_importlibs(usbehci ntoskrnl hal usbd)
index 02512e7..ead60c3 100644 (file)
@@ -4,14 +4,16 @@ set_cpp()
 remove_definitions(-D_WIN32_WINNT=0x502)
 add_definitions(-D_WIN32_WINNT=0x600)
 
-include_directories(
-    ${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
+include_directories(${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
 
-add_library(usbohci SHARED
+list(APPEND SOURCE
     usbohci.cpp
     usb_request.cpp
     usb_queue.cpp
-    hardware.cpp
+    hardware.cpp)
+
+add_library(usbohci SHARED
+    ${SOURCE}
     usbohci.rc)
 
 target_link_libraries(usbohci
@@ -19,14 +21,17 @@ target_link_libraries(usbohci
     libcntpr
     ${PSEH_LIB})
 
+# FIXME: http://www.cmake.org/Bug/view.php?id=12998
 if(MSVC)
-    set_target_properties(usbohci PROPERTIES COMPILE_FLAGS "/GR-")
+    #add_target_compile_flags(usbohci "/GR-")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
 else()
     target_link_libraries(usbohci -lgcc)
-    set_target_properties(usbohci PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
-endif(MSVC)
+    #add_target_compile_flags(usbohci "-fno-exceptions -fno-rtti")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
+endif()
 
 set_module_type(usbohci kernelmodedriver)
 add_importlibs(usbohci ntoskrnl hal usbd)
 
-add_cd_file(TARGET usbohci DESTINATION reactos/system32/drivers NO_CAB FOR all)
\ No newline at end of file
+add_cd_file(TARGET usbohci DESTINATION reactos/system32/drivers NO_CAB FOR all)
index 5bd4eca..bc31a5f 100644 (file)
@@ -7,11 +7,14 @@ add_definitions(-D_WIN32_WINNT=0x600)
 include_directories(
     ${REACTOS_SOURCE_DIR}/lib/drivers/libusb)
 
-add_library(usbuhci SHARED
+list(APPEND SOURCE
     usbuhci.cpp
     usb_request.cpp
     usb_queue.cpp
-    hardware.cpp
+    hardware.cpp)
+
+add_library(usbuhci SHARED
+    ${SOURCE}
     usbuhci.rc)
 
 target_link_libraries(usbuhci
@@ -19,12 +22,15 @@ target_link_libraries(usbuhci
     libcntpr
     ${PSEH_LIB})
 
+# FIXME: http://www.cmake.org/Bug/view.php?id=12998
 if(MSVC)
-    set_target_properties(usbuhci PROPERTIES COMPILE_FLAGS "/GR-")
+    #add_target_compile_flags(usbuhci "/GR-")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
 else()
     target_link_libraries(usbuhci -lgcc)
-    set_target_properties(usbuhci PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
-endif(MSVC)
+    #add_target_compile_flags(usbuhci "-fno-exceptions -fno-rtti")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
+endif()
 
 set_module_type(usbuhci kernelmodedriver)
 add_importlibs(usbuhci ntoskrnl hal usbd)
index c5db609..18fba7a 100644 (file)
@@ -58,10 +58,11 @@ target_link_libraries(portcls
     libcntpr
     ${PSEH_LIB})
 
+# FIXME: http://www.cmake.org/Bug/view.php?id=12998
 if(MSVC)
-    add_target_compile_flags(portcls "/GR-")
+    #add_target_compile_flags(portcls "/GR-")
+    set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
 else()
-    # FIXME: http://www.cmake.org/Bug/view.php?id=12998        
     #add_target_compile_flags(portcls "-fno-exceptions -fno-rtti")
     set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
 endif()
@@ -70,4 +71,3 @@ set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
 add_pch(portcls private.hpp)
 add_importlibs(portcls ntoskrnl ks drmk hal)
 add_cd_file(TARGET portcls DESTINATION reactos/system32/drivers FOR all)
-