[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 27 Jul 2010 00:48:07 +0000 (00:48 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 27 Jul 2010 00:48:07 +0000 (00:48 +0000)
- Add dxsdk interfaces to build.

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

CMakeLists.txt
include/dxsdk/CMakeLists.txt [new file with mode: 0644]

index 85f1b72..5ffdc61 100644 (file)
@@ -50,6 +50,8 @@ add_definitions(-Os -fno-strict-aliasing -ftracer -momit-leaf-frame-pointer -mpr
 
 include_directories(./include)
 include_directories(./include/psdk)
 
 include_directories(./include)
 include_directories(./include/psdk)
+include_directories(./include/dxsdk)
+include_directories(${REACTOS_BINARY_DIR}/include/dxsdk)
 include_directories(${REACTOS_BINARY_DIR}/include/psdk)
 include_directories(${REACTOS_BINARY_DIR}/include/reactos)
 include_directories(./include/crt)
 include_directories(${REACTOS_BINARY_DIR}/include/psdk)
 include_directories(${REACTOS_BINARY_DIR}/include/reactos)
 include_directories(./include/crt)
@@ -60,6 +62,7 @@ include_directories(./include/reactos)
 include_directories(./include/reactos/libs)
 
 add_subdirectory(include/psdk)
 include_directories(./include/reactos/libs)
 
 add_subdirectory(include/psdk)
+add_subdirectory(include/dxsdk)
 add_subdirectory(include/reactos/mc)
 
 add_subdirectory(lib)
 add_subdirectory(include/reactos/mc)
 
 add_subdirectory(lib)
diff --git a/include/dxsdk/CMakeLists.txt b/include/dxsdk/CMakeLists.txt
new file mode 100644 (file)
index 0000000..7123955
--- /dev/null
@@ -0,0 +1,37 @@
+
+MACRO (MACRO_ADD_DXSDK_INTERFACES)
+
+ FOREACH(_in_FILE ${ARGN})
+
+   GET_FILENAME_COMPONENT(FILE ${_in_FILE} NAME_WE)
+
+   ADD_CUSTOM_COMMAND(
+     OUTPUT ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h
+     COMMAND native-widl -I${REACTOS_SOURCE_DIR}/include/dxsdk -I. -I${REACTOS_SOURCE_DIR}/include -I${REACTOS_SOURCE_DIR}/include/psdk -m32 --win32 -h -H ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h ${REACTOS_SOURCE_DIR}/include/dxsdk/${FILE}.idl
+     DEPENDS native-widl
+   )
+
+   SET_SOURCE_FILES_PROPERTIES(
+     ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h
+     PROPERTIES
+     GENERATED TRUE
+   )
+
+    LIST(APPEND DXSDK_HEADERS ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h)  
+
+ ENDFOREACH(_in_FILE ${ARGN})
+
+ENDMACRO (MACRO_ADD_DXSDK_INTERFACES)
+
+file(GLOB_RECURSE SOURCE "*.idl")
+
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/axcore.idl)
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/axextend.idl)
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/devenum.idl)
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/dshowasf.idl)
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/dyngraph.idl)
+LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/vmrender.idl)
+
+MACRO_ADD_DXSDK_INTERFACES(${SOURCE})
+
+ADD_CUSTOM_TARGET(dxsdk ALL DEPENDS ${DXSDK_HEADERS})