[CMAKE]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 21 Nov 2010 00:55:46 +0000 (00:55 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 21 Nov 2010 00:55:46 +0000 (00:55 +0000)
Add EXTERNAL_OBJECT TRUE for generated def files on gcc builds. Fixes empty exports.
Add kernelmodedriver module type for MSVC

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

gcc.cmake
msc.cmake

index 538bd47..6d53201 100644 (file)
--- a/gcc.cmake
+++ b/gcc.cmake
@@ -161,7 +161,7 @@ macro(spec2def _dllname _spec_file)
         COMMAND native-spec2def --dll ${_dllname} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} ${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file})
     set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${_file}.def
-        PROPERTIES GENERATED TRUE)
+        PROPERTIES GENERATED TRUE EXTERNAL_OBJECT TRUE)
 endmacro()
 
 # Optional 3rd parameter: dllname
index 7ffb866..a256263 100644 (file)
--- a/msc.cmake
+++ b/msc.cmake
@@ -75,6 +75,13 @@ macro(set_module_type MODULE TYPE)
                target_link_libraries(${MODULE} mingw_common mingw_dllmain)\r
         add_linkerflag(${MODULE} "/DLL")\r
     endif()\r
+       if(${TYPE} MATCHES kernelmodedriver)\r
+           set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")\r
+           set_entrypoint(${MODULE} DriverEntry@8)\r
+               set_subsystem(${MODULE} native)\r
+        set_image_base(${MODULE} 0x00010000)\r
+               add_dependencies(${MODULE} bugcodes)\r
+       endif()\r
 \r
 endmacro()\r
 \r