[CMAKE]
[reactos.git] / dll / ntdll / CMakeLists.txt
1
2 ADD_CUSTOM_COMMAND(
3 OUTPUT ${REACTOS_BINARY_DIR}/dll/ntdll/ntsys.a
4 COMMAND ${MINGW_PREFIX}gcc ${CMAKE_C_FLAGS} -xc -E ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec > ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.spec
5 COMMAND native-winebuild -o ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.stubs.c --pedll ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.spec --filename ntdll.dll
6 COMMAND ${MINGW_PREFIX}gcc -o ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.stubs.o ${CMAKE_C_FLAGS} -c ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.stubs.c
7 COMMAND native-winebuild -o ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.auto.def --def -E ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.spec --filename ntdll.dll
8 COMMAND ${MINGW_PREFIX}dlltool --def ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.auto.def --kill-at --output-lib ${REACTOS_BINARY_DIR}/dll/ntdll/ntsys.a
9 COMMAND ${MINGW_PREFIX}ar -rc ${REACTOS_BINARY_DIR}/dll/ntdll/ntsys.a ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys_ntsys.stubs.o
10 DEPENDS native-winebuild
11 )
12
13 SET_SOURCE_FILES_PROPERTIES(${REACTOS_BINARY_DIR}/dll/ntdll/ntsys.a PROPERTIES GENERATED TRUE)
14
15 ADD_CUSTOM_TARGET(ntsys ALL DEPENDS ${REACTOS_BINARY_DIR}/dll/ntdll/ntsys.a)
16 add_dependencies(ntsys ntsys_pspec)