[CMAKE] Fix host tools build on x86-64 mingw

Dynamically check for sys/types.h and pid_t in wine config.h
Use TARGET_xxx defines instead of _X86_ as this is undefined by GCC
Add some sense in include directories management by using interface
libraries
This commit is contained in:
Jérôme Gardou 2019-11-15 14:07:46 +01:00 committed by Jérôme Gardou
parent 15748cf03a
commit 493ceb7ade
19 changed files with 64 additions and 30 deletions

View file

@ -1,11 +1,4 @@
add_definitions(-DMKHIVE_HOST)
include_directories(
${REACTOS_SOURCE_DIR}/sdk/lib/inflib
${REACTOS_SOURCE_DIR}/sdk/lib/cmlib
${REACTOS_SOURCE_DIR}/sdk/lib/rtl)
list(APPEND SOURCE
binhive.c
cmi.c
@ -15,9 +8,10 @@ list(APPEND SOURCE
rtl.c)
add_host_tool(mkhive ${SOURCE})
target_include_directories(mkhive PRIVATE ${REACTOS_SOURCE_DIR}/sdk/lib/rtl)
target_compile_definitions(mkhive PRIVATE -DMKHIVE_HOST)
if(NOT MSVC)
add_target_compile_flags(mkhive "-fshort-wchar")
endif()
target_link_libraries(mkhive unicode cmlibhost inflibhost)
target_link_libraries(mkhive PRIVATE host_includes unicode cmlibhost inflibhost)