Author: akhaldi
Date: Sat Aug 21 23:23:46 2010
New Revision: 48584
URL:
http://svn.reactos.org/svn/reactos?rev=48584&view=rev
Log:
[CMAKE]
- Add a macro to handle generating definition files from spec files (for Wine dlls)
Modified:
branches/cmake-bringup/CMakeMacros.cmake
Modified: branches/cmake-bringup/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeMacros.cmake…
==============================================================================
--- branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/CMakeMacros.cmake [iso-8859-1] Sat Aug 21 23:23:46 2010
@@ -40,3 +40,14 @@
DEPENDS ${_header_filename})
ENDMACRO(add_pch _target_name _header_filename _src_list)
+
+MACRO(spec2def _target_name _spec_file _def_file)
+
+ add_custom_command(
+ OUTPUT ${_def_file}
+ COMMAND native-winebuild -o ${_def_file} --def -E ${_spec_file} --filename
${_target_name}.dll
+ DEPENDS native-winebuild)
+ set_source_files_properties(${_def_file} PROPERTIES GENERATED TRUE)
+ add_custom_target(${_target_name}_def ALL DEPENDS ${_def_file})
+
+ENDMACRO(spec2def _target_name _spec_file _def_file)