* Prepare the CMake scripts for PCH.
CORE-7716

svn path=/trunk/; revision=62083
This commit is contained in:
Amine Khaldi 2014-02-09 21:43:42 +00:00
parent d37199d4cc
commit 110a90536d
22 changed files with 85 additions and 44 deletions

View file

@ -18,10 +18,12 @@ list(APPEND SOURCE
src/reply.c
src/setup.c
src/transmit.c
src/types.c)
src/types.c
src/internal.h)
add_library(adns ${SOURCE})
add_dependencies(adns psdk)
add_pch(adns src/internal.h SOURCE)
if(NOT MSVC)
add_target_compile_flags(adns "-Wno-unused-but-set-variable")

View file

@ -10,12 +10,14 @@ list(APPEND SOURCE
decompress.c
huffman.c
dllmain.c
${CMAKE_CURRENT_BINARY_DIR}/unbzip2.def)
bzlib_private.h)
add_library(bzip2 SHARED ${SOURCE})
add_library(bzip2 SHARED
${SOURCE}
${CMAKE_CURRENT_BINARY_DIR}/unbzip2.def)
set_module_type(bzip2 kernelmodedriver)
add_importlibs(bzip2 ntoskrnl)
target_link_libraries(bzip2 libcntpr)
add_pch(bzip2 bzlib_private.h SOURCE)
set_target_properties(bzip2 PROPERTIES OUTPUT_NAME "unbzip2")

View file

@ -12,10 +12,12 @@ list(APPEND SOURCE
cardrgnmouse.cpp
cardstack.cpp
cardwindow.cpp
dropzone.cpp)
dropzone.cpp
cardlib.h)
add_library(cardlib ${SOURCE})
add_dependencies(cardlib psdk)
add_pch(cardlib cardlib.h SOURCE)
if(NOT MSVC)
add_target_compile_flags(cardlib "-Wno-unused-but-set-variable")

View file

@ -3,7 +3,9 @@ list(APPEND SOURCE
samplerate.c
src_linear.c
src_sinc.c
src_zoh.c)
src_zoh.c
precomp.h)
add_library(libsamplerate ${SOURCE})
add_dependencies(libsamplerate psdk)
add_pch(libsamplerate precomp.h SOURCE)

View file

@ -55,10 +55,12 @@ list(APPEND SOURCE
xmlwriter.c
xpath.c
xpointer.c
xmlstring.c)
xmlstring.c
libxml.h)
add_library(libxml2 ${SOURCE})
target_link_libraries(libxml2 oldnames)
add_pch(libxml2 libxml.h SOURCE)
add_dependencies(libxml2 psdk)
if(NOT MSVC)

View file

@ -17,7 +17,9 @@ list(APPEND SOURCE
seeking.c
transform.c
video.c
window.c)
window.c
strmbase_private.h)
add_library(strmbase ${SOURCE})
add_pch(strmbase strmbase_private.h SOURCE)
add_dependencies(strmbase psdk dxsdk)

View file

@ -11,12 +11,13 @@ list(APPEND SOURCE
hivecell.c
hiveinit.c
hivesum.c
hivewrt.c)
hivewrt.c
cmlib.h)
if(CMAKE_CROSSCOMPILING)
add_library(cmlib ${SOURCE})
add_dependencies(cmlib bugcodes)
add_pch(cmlib cmlib.h)
add_pch(cmlib cmlib.h SOURCE)
else()
add_definitions(
-D__NO_CTYPE_INLINES

View file

@ -5,8 +5,9 @@ list(APPEND SOURCE
context.c
hidparser.c
parser.c
api.c)
api.c
parser.h)
add_library(hidparser ${SOURCE})
add_dependencies(hidparser bugcodes)
add_pch(hidparser parser.h SOURCE)

View file

@ -30,8 +30,9 @@ list(APPEND SOURCE
transport/tcp/event.c
transport/tcp/if.c
transport/tcp/tcp.c
transport/udp/udp.c)
transport/udp/udp.c
precomp.h)
add_library(ip ${SOURCE} ${ip_asm})
add_pch(ip precomp.h)
add_pch(ip precomp.h SOURCE)
add_dependencies(ip bugcodes)

View file

@ -15,7 +15,9 @@ list(APPEND SOURCE
misc.cpp
usb_device.cpp
purecall.cpp
libusb.cpp)
libusb.cpp
libusb.h)
add_library(libusb ${SOURCE})
add_dependencies(libusb bugcodes)
add_pch(libusb libusb.h SOURCE)

View file

@ -23,8 +23,9 @@ list(APPEND SOURCE
wave/wodMessage.c
wave/format.c
wave/header.c
wave/streaming.c)
wave/streaming.c
precomp.h)
add_library(mmebuddy ${SOURCE})
add_pch(mmebuddy precomp.h)
add_pch(mmebuddy precomp.h SOURCE)
add_dependencies(mmebuddy psdk)

View file

@ -8,8 +8,9 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/sound)
list(APPEND SOURCE
detect.c
registry.c
control.c)
control.c
precomp.h)
add_library(mment4 ${SOURCE})
add_pch(mment4 precomp.h)
add_pch(mment4 precomp.h SOURCE)
add_dependencies(mment4 psdk)

View file

@ -12,9 +12,10 @@ list(APPEND SOURCE
mixer.c
sup.c
wave.c
topology.c)
topology.c
precomp.h)
add_library(mmixer ${SOURCE})
add_pch(mmixer priv.h)
add_pch(mmixer precomp.h SOURCE)
add_dependencies(mmixer bugcodes)

View file

@ -1,8 +1,10 @@
add_library(epsapi
list(APPEND SOURCE
enum/drivers.c
enum/modules.c
enum/processes.c)
enum/processes.c
enum/precomp.h)
add_pch(epsapi enum/precomp.h)
add_library(epsapi ${SOURCE})
add_pch(epsapi enum/precomp.h SOURCE)
add_dependencies(epsapi psdk)

View file

@ -8,8 +8,10 @@ list(APPEND SOURCE
Memory.c
Mke2fs.c
Super.c
Uuid.c)
Uuid.c
Mke2fs.h)
add_library(ext2lib ${SOURCE})
add_pch(ext2lib Mke2fs.h)
add_pch(ext2lib Mke2fs.h SOURCE)
add_dependencies(ext2lib psdk)
allow_warnings(ext2lib)

View file

@ -10,7 +10,9 @@ list(APPEND SOURCE
fat12.c
fat16.c
fat32.c
vfatlib.c)
vfatlib.c
vfatlib.h)
add_library(vfatlib ${SOURCE})
add_pch(vfatlib vfatlib.h)
add_pch(vfatlib vfatlib.h SOURCE)
add_dependencies(vfatlib psdk)

View file

@ -1,6 +1,11 @@
add_library(vfatxlib fatx.c vfatxlib.c)
add_pch(vfatxlib vfatxlib.h)
list(APPEND SOURCE
fatx.c
vfatxlib.c
vfatxlib.h)
add_library(vfatxlib ${SOURCE})
add_pch(vfatxlib vfatxlib.h SOURCE)
target_link_libraries(vfatxlib chkstk)
if(NOT MSVC)

View file

@ -1,5 +1,5 @@
list(APPEND GLOBAL_FILES
list(APPEND SOURCE
infcore.c
infget.c
infput.c)
@ -8,10 +8,11 @@ if(CMAKE_CROSSCOMPILING)
list(APPEND SOURCE
infrosgen.c
infrosget.c
infrosput.c)
infrosput.c
inflib.h)
add_library(inflib ${GLOBAL_FILES} ${SOURCE})
add_pch(inflib inflib.h)
add_library(inflib ${SOURCE})
add_pch(inflib inflib.h SOURCE)
add_dependencies(inflib psdk)
else()
list(APPEND SOURCE
@ -21,7 +22,7 @@ else()
infhostrtl.c)
add_definitions(-D__NO_CTYPE_INLINES -DINFLIB_HOST)
add_library(inflibhost ${GLOBAL_FILES} ${SOURCE})
add_library(inflibhost ${SOURCE})
if(NOT MSVC)
add_target_compile_flags(inflibhost "-Wpointer-arith -Wwrite-strings")
endif()

View file

@ -1,12 +1,13 @@
list(APPEND SOURCE
guid.c
recyclebin.c
recyclebin_generic.c
recyclebin_generic_enumerator.c
recyclebin_v5.c
recyclebin_v5_enumerator.c)
recyclebin_v5_enumerator.c
recyclebin_private.h)
add_library(recyclebin ${SOURCE})
add_library(recyclebin ${SOURCE} guid.c)
add_pch(recyclebin recyclebin_private.h SOURCE)
add_dependencies(recyclebin psdk)

View file

@ -65,7 +65,8 @@ list(APPEND SOURCE
vectoreh.c
version.c
wait.c
workitem.c)
workitem.c
rtl.h)
if(ARCH STREQUAL "i386")
list(APPEND ASM_SOURCE
@ -108,5 +109,5 @@ endif()
add_asm_files(rtl_asm ${ASM_SOURCE})
add_library(rtl ${SOURCE} ${rtl_asm})
add_pch(rtl rtl.h)
add_pch(rtl rtl.h SOURCE)
add_dependencies(rtl psdk asm)

View file

@ -6,8 +6,9 @@ list(APPEND SOURCE
connect.c
execpgm.c
lookupss.c
smclient.c)
smclient.c
precomp.h)
add_library(smlib ${SOURCE})
add_pch(smlib precomp.h)
add_pch(smlib precomp.h SOURCE)
add_dependencies(smlib psdk)

View file

@ -1,5 +1,11 @@
# FIXFIX: You guys should move this header in include/reactos/libs/iphlpapi!
include_directories(${REACTOS_SOURCE_DIR}/dll/win32/iphlpapi)
add_library(tdilib enum.c handle.c)
list(APPEND SOURCE
enum.c
handle.c
precomp.h)
add_library(tdilib ${SOURCE})
add_pch(tdilib precomp.h SOURCE)
add_dependencies(tdilib psdk)