- We won't be using mkdir to create folders since cmake has a command for it.
- Split nci generated files into separate targets, so that modules can depend on each one of them separately if needed.
- Add win32ksys to build.

svn path=/branches/cmake-bringup/; revision=48329
This commit is contained in:
Amine Khaldi 2010-07-28 12:58:37 +00:00
parent 0de1055529
commit 0d72b49f46
5 changed files with 24 additions and 15 deletions

View file

@ -83,19 +83,15 @@ set(nci_output
# 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
${CMAKE_CURRENT_BINARY_DIR}/dll/ntdll/def
${CMAKE_CURRENT_BINARY_DIR}/lib/ntdllsys/ntdll
${CMAKE_CURRENT_BINARY_DIR}/lib/win32ksys
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/include/internal
${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/ex
${CMAKE_CURRENT_BINARY_DIR}/subsystems/win32/win32k/include
)
ADD_CUSTOM_COMMAND(
OUTPUT ${nci_folders}
COMMAND mkdir ${MKDIR_ARG} ${nci_folders}
WORKING_DIRECTORY ${REACTOS_BINARY_DIR}
)
file(MAKE_DIRECTORY ${nci_folders})
ADD_CUSTOM_COMMAND(
OUTPUT ${nci_output}
@ -105,7 +101,8 @@ ADD_CUSTOM_COMMAND(
SET_SOURCE_FILES_PROPERTIES(${nci_output} PROPERTIES GENERATED TRUE)
ADD_CUSTOM_TARGET(nci_resources ALL DEPENDS ${nci_output})
ADD_CUSTOM_TARGET(ntdll_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S)
ADD_CUSTOM_TARGET(win32k_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S)
endif()

View file

@ -21,6 +21,7 @@ add_subdirectory(rtl)
add_subdirectory(sdk)
add_subdirectory(smlib)
add_subdirectory(tdilib)
add_subdirectory(win32ksys)
else()

View file

@ -10,4 +10,4 @@ set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJ
set_source_files_properties(${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S PROPERTIES GENERATED TRUE)
add_library(ntdllsys ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S)
add_dependencies(ntdllsys nci_resources)
add_dependencies(ntdllsys ntdllsys_S)

View file

@ -0,0 +1,13 @@
get_directory_property(defines COMPILE_DEFINITIONS)
foreach(arg ${defines})
set(result_defs "${result_defs} -D${arg}")
endforeach(arg ${defines})
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> ${result_defs} -D__ASM__ <FLAGS> -c <SOURCE>")
set_source_files_properties(${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S PROPERTIES GENERATED TRUE)
add_library(win32ksys ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S)
add_dependencies(win32ksys win32k_S)

View file

@ -4,10 +4,8 @@ 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