Author: tkreuzer
Date: Sat Jan 29 17:45:45 2011
New Revision: 50559
URL:
http://svn.reactos.org/svn/reactos?rev=50559&view=rev
Log:
[CMAKE]
- Add a macro add_iid_library to generate a static lib containing iids
- Fix get_includes and get_defines
Modified:
branches/cmake-bringup/cmake/idl-support.cmake
Modified: branches/cmake-bringup/cmake/idl-support.cmake
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/cmake/idl-support…
==============================================================================
--- branches/cmake-bringup/cmake/idl-support.cmake [iso-8859-1] (original)
+++ branches/cmake-bringup/cmake/idl-support.cmake [iso-8859-1] Sat Jan 29 17:45:45 2011
@@ -36,6 +36,7 @@
macro(get_includes OUTPUT_VAR)
+ set(${OUTPUT_VAR} "")
get_directory_property(_includes INCLUDE_DIRECTORIES)
foreach(arg ${_includes})
set(${OUTPUT_VAR} -I${arg} ${${OUTPUT_VAR}})
@@ -43,6 +44,7 @@
endmacro()
macro(get_defines OUTPUT_VAR)
+ set(${OUTPUT_VAR} "")
get_directory_property(_defines COMPILE_DEFINITIONS)
foreach(arg ${_defines})
set(${OUTPUT_VAR} ${${OUTPUT_VAR}} -D${arg})
@@ -149,3 +151,12 @@
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${IDL_FILE})
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${NAME}_i.c PROPERTIES
GENERATED TRUE)
endmacro()
+
+macro(add_iid_library TARGET)
+ foreach(IDL_FILE ${ARGN})
+ get_filename_component(NAME ${IDL_FILE} NAME_WE)
+ generate_idl_iids(${IDL_FILE})
+ list(APPEND IID_SOURCES ${NAME}_i.c)
+ endforeach()
+ add_library(${TARGET} ${IID_SOURCES})
+endmacro()