[CMAKE]: Use some CMAKE magic to have widl defined as a "host tool", and make the...
authorSir Richard <sir_richard@svn.reactos.org>
Sun, 25 Jul 2010 20:04:16 +0000 (20:04 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Sun, 25 Jul 2010 20:04:16 +0000 (20:04 +0000)
[CMAKE]: Add generated headers to the include path.

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

CMakeLists.txt
include/psdk/CMakeLists.txt

index 3e017f5..98b4ee4 100644 (file)
@@ -15,10 +15,14 @@ include_directories(./include/reactos)
 include_directories(./include/reactos/wine)
 
 add_subdirectory(tools)
-add_subdirectory(include/psdk)
+
+export(TARGETS widl FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- )
 
 else()
 
+set(IMPORT_EXECUTABLES "${REACTOS_SOURCE_DIR}/build/ImportExecutables.cmake" CACHE FILEPATH "Host executables")
+include(${IMPORT_EXECUTABLES})
+
 add_definitions(-DDBG=1)
 add_definitions(-D_SEH_ENABLE_TRACE)
 add_definitions(-DKDBG=1)
@@ -35,6 +39,7 @@ add_definitions(-D_USE_32BIT_TIME_T)
 
 include_directories(./include)
 include_directories(./include/psdk)
+include_directories(${REACTOS_BINARY_DIR}/include/psdk)
 include_directories(./include/crt)
 include_directories(./include/crt/mingw32)
 include_directories(./include/ddk)
@@ -42,6 +47,8 @@ include_directories(./include/ndk)
 include_directories(./include/reactos)
 include_directories(./include/reactos/libs)
 
+add_subdirectory(include/psdk)
+
 add_subdirectory(lib)
 
 endif()
index f609c13..3b9d85d 100644 (file)
@@ -7,8 +7,8 @@ MACRO (MACRO_ADD_INTERFACES)
 
    ADD_CUSTOM_COMMAND(
      OUTPUT ${REACTOS_BINARY_DIR}/include/psdk/${FILE}.h
-     COMMAND 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/psdk/${FILE}.h ${REACTOS_SOURCE_DIR}/include/psdk/${FILE}.idl
-     DEPENDS widl
+     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/psdk/${FILE}.h ${REACTOS_SOURCE_DIR}/include/psdk/${FILE}.idl
+     DEPENDS native-widl
    )
 
    SET_SOURCE_FILES_PROPERTIES(