From e7caf66239ff0843a9c7904c69e64a38e3038f58 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sat, 2 Oct 2010 17:09:48 +0000 Subject: [PATCH] [CMAKE] - Improve the IDL macro, along with some dependencies. svn path=/branches/cmake-bringup/; revision=48965 --- dll/win32/xmllite/CMakeLists.txt | 2 +- include/reactos/idl/CMakeLists.txt | 61 +++++++++++++++--------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/dll/win32/xmllite/CMakeLists.txt b/dll/win32/xmllite/CMakeLists.txt index f7166473c20..e2b310ab6eb 100644 --- a/dll/win32/xmllite/CMakeLists.txt +++ b/dll/win32/xmllite/CMakeLists.txt @@ -12,6 +12,6 @@ target_link_libraries(xmllite ${CMAKE_CURRENT_BINARY_DIR}/xmllite.def wine) -add_importlibs(xmllite msvcrt kernel32 ntdll) +add_importlibs(xmllite kernel32 ntdll) add_dependencies(xmllite xmllite_def psdk buildno_header) diff --git a/include/reactos/idl/CMakeLists.txt b/include/reactos/idl/CMakeLists.txt index c226ccb50d3..2ae12a98409 100644 --- a/include/reactos/idl/CMakeLists.txt +++ b/include/reactos/idl/CMakeLists.txt @@ -8,44 +8,45 @@ get_directory_property(defines COMPILE_DEFINITIONS) get_directory_property(includes INCLUDE_DIRECTORIES) foreach(arg ${defines}) - set(result_defs ${result_defs} -D${arg}) + set(result_defs ${result_defs} -D${arg}) endforeach(arg ${defines}) foreach(arg ${includes}) - set(result_incs -I${arg} ${result_incs}) + set(result_incs -I${arg} ${result_incs}) endforeach(arg ${includes}) -MACRO (MACRO_IDL_FILES) +macro (MACRO_IDL_FILES) - FOREACH(_in_FILE ${ARGN}) - - get_filename_component(FILE ${_in_FILE} NAME_WE) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c - COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl - DEPENDS native-widl - ) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c - PROPERTIES GENERATED TRUE - ) - add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c) + foreach(_in_FILE ${ARGN}) + get_filename_component(FILE ${_in_FILE} NAME_WE) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c + COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h -s -S ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl + DEPENDS native-widl) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c + PROPERTIES GENERATED TRUE) + add_library(${FILE}_server ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_s.c) + add_dependencies(${FILE}_server psdk) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c - COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl - DEPENDS native-widl - ) - set_source_files_properties( - ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c - PROPERTIES GENERATED TRUE - ) - add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c + COMMAND native-widl ${result_incs} ${result_defs} -m32 --win32 -h -H ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h -c -C ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.idl + DEPENDS native-widl) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.h ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c + PROPERTIES GENERATED TRUE) + add_library(${FILE}_client ${CMAKE_CURRENT_BINARY_DIR}/${FILE}_c.c) + add_dependencies(${FILE}_client psdk) + endforeach(_in_FILE ${ARGN}) - ENDFOREACH(_in_FILE ${ARGN}) +endmacro (MACRO_IDL_FILES) -ENDMACRO (MACRO_IDL_FILES) +list(APPEND SOURCE + eventlogrpc.idl + lsa.idl + pnp.idl + svcctl.idl + wlansvc.idl) -file(GLOB_RECURSE SOURCE "*.idl") -LIST(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ms-dtyp.idl) MACRO_IDL_FILES(${SOURCE})