From: Amine Khaldi Date: Wed, 28 Jul 2010 10:13:27 +0000 (+0000) Subject: [CMAKE] X-Git-Tag: backups/GSoC_2011/GSoC_Themes@51550~959 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a7d2ad6334a9bb1e2a45bdbcd52c20e52ed8f6ca [CMAKE] - Rename ncitool to nci and mark it as an exported native tool. - Add nci generated intermediate files to build. svn path=/branches/cmake-bringup/; revision=48325 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 574a4913527..27b176779cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ include_directories(./include/reactos/wine) add_subdirectory(tools) add_subdirectory(lib) -export(TARGETS widl wmc FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) +export(TARGETS widl wmc nci FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) else() @@ -70,5 +70,42 @@ add_subdirectory(include/reactos/mc) add_subdirectory(lib) +# nci generated intermediate files + +set(nci_output + ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h + ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h + ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S + ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S + ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S + ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec +) + +# stupid nci tool can't create folders itself, se we're gonna create them for it +set(nci_folders + dll\\ntdll\\def + lib\\ntdllsys\\ntdll + lib\\win32ksys + ntoskrnl\\include\\internal + ntoskrnl\\ex + subsystems\\win32\\win32k\\include +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${nci_folders} + COMMAND mkdir ${MKDIR_ARG} ${nci_folders} + WORKING_DIRECTORY ${REACTOS_BINARY_DIR} +) + +ADD_CUSTOM_COMMAND( + OUTPUT ${nci_output} + COMMAND native-nci -arch ${ARCH} ${REACTOS_SOURCE_DIR}/ntoskrnl/sysfuncs.lst ${REACTOS_SOURCE_DIR}/subsystems/win32/win32k/w32ksvc.db ${nci_output} + DEPENDS native-nci ${nci_folders} +) + +SET_SOURCE_FILES_PROPERTIES(${nci_output} PROPERTIES GENERATED TRUE) + +ADD_CUSTOM_TARGET(nci_resources ALL DEPENDS ${nci_output}) + endif() diff --git a/toolchain-mingw32.cmake b/toolchain-mingw32.cmake index 7deaee26fde..3695f4d9cce 100644 --- a/toolchain-mingw32.cmake +++ b/toolchain-mingw32.cmake @@ -4,8 +4,10 @@ SET(ARCH i386) # Choose the right MinGW prefix if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows) set(MINGW_PREFIX "") +set(MKDIR_ARG "") else() set(MINGW_PREFIX "mingw32-") +set(MKDIR_ARG "-p") endif() # the name of the target operating system