7123955ca881d66a7a606265f002dd694acea19d
[reactos.git] / include / dxsdk / CMakeLists.txt
1
2 MACRO (MACRO_ADD_DXSDK_INTERFACES)
3
4 FOREACH(_in_FILE ${ARGN})
5
6 GET_FILENAME_COMPONENT(FILE ${_in_FILE} NAME_WE)
7
8 ADD_CUSTOM_COMMAND(
9 OUTPUT ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h
10 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
11 DEPENDS native-widl
12 )
13
14 SET_SOURCE_FILES_PROPERTIES(
15 ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h
16 PROPERTIES
17 GENERATED TRUE
18 )
19
20 LIST(APPEND DXSDK_HEADERS ${REACTOS_BINARY_DIR}/include/dxsdk/${FILE}.h)
21
22 ENDFOREACH(_in_FILE ${ARGN})
23
24 ENDMACRO (MACRO_ADD_DXSDK_INTERFACES)
25
26 file(GLOB_RECURSE SOURCE "*.idl")
27
28 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/axcore.idl)
29 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/axextend.idl)
30 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/devenum.idl)
31 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/dshowasf.idl)
32 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/dyngraph.idl)
33 LIST(REMOVE_ITEM SOURCE ${REACTOS_SOURCE_DIR}/include/dxsdk/vmrender.idl)
34
35 MACRO_ADD_DXSDK_INTERFACES(${SOURCE})
36
37 ADD_CUSTOM_TARGET(dxsdk ALL DEPENDS ${DXSDK_HEADERS})