From: Amine Khaldi Date: Fri, 5 Nov 2010 12:02:12 +0000 (+0000) Subject: [CMAKE] X-Git-Tag: backups/GSoC_2011/GSoC_Themes@51550~599 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=30bb25e2f0f878206834761ffa399b3a819c308d [CMAKE] - Improve most of the static libraries. svn path=/branches/cmake-bringup/; revision=49479 --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7e6067508a1..c81ba16ffc6 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -13,7 +13,7 @@ add_subdirectory(drivers) add_subdirectory(epsapi) add_subdirectory(fslib) add_subdirectory(lsalib) -add_subdirectory(nls) +#add_subdirectory(nls) add_subdirectory(ntdllsys) add_subdirectory(ppcmmu) add_subdirectory(pseh) diff --git a/lib/epsapi/CMakeLists.txt b/lib/epsapi/CMakeLists.txt index 775a7127802..5f3a0a9a14e 100644 --- a/lib/epsapi/CMakeLists.txt +++ b/lib/epsapi/CMakeLists.txt @@ -1,4 +1,5 @@ -file(GLOB_RECURSE SOURCE "*.c") - -add_library(epsapi ${SOURCE}) \ No newline at end of file +add_library(epsapi + enum/drivers.c + enum/modules.c + enum/processes.c) diff --git a/lib/fslib/ext2lib/CMakeLists.txt b/lib/fslib/ext2lib/CMakeLists.txt index e5907c14dc0..c9122d3b788 100644 --- a/lib/fslib/ext2lib/CMakeLists.txt +++ b/lib/fslib/ext2lib/CMakeLists.txt @@ -1,4 +1,13 @@ -file(GLOB_RECURSE SOURCE "*.c") +list(APPEND SOURCE + Badblock.c + Bitmap.c + Disk.c + Group.c + Inode.c + Memory.c + Mke2fs.c + Super.c + Uuid.c) add_library(ext2lib ${SOURCE}) -add_dependencies(ext2lib psdk) \ No newline at end of file +add_dependencies(ext2lib psdk) diff --git a/lib/fslib/ntfslib/CMakeLists.txt b/lib/fslib/ntfslib/CMakeLists.txt index 8f42b0b5bbc..1712c128d03 100644 --- a/lib/fslib/ntfslib/CMakeLists.txt +++ b/lib/fslib/ntfslib/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(ntfslib ${SOURCE}) +add_library(ntfslib ntfslib.c) diff --git a/lib/fslib/vfatlib/CMakeLists.txt b/lib/fslib/vfatlib/CMakeLists.txt index 1426eff24c7..675bbbd16af 100644 --- a/lib/fslib/vfatlib/CMakeLists.txt +++ b/lib/fslib/vfatlib/CMakeLists.txt @@ -1,4 +1,15 @@ -file(GLOB_RECURSE SOURCE "*.c") +list(APPEND SOURCE + check/boot.c + check/check.c + check/common.c + check/fat.c + check/file.c + check/io.c + check/lfn.c + fat12.c + fat16.c + fat32.c + vfatlib.c) add_library(vfatlib ${SOURCE}) add_dependencies(vfatlib psdk) diff --git a/lib/fslib/vfatxlib/CMakeLists.txt b/lib/fslib/vfatxlib/CMakeLists.txt index 1e5e6bc9cf1..fc6da269793 100644 --- a/lib/fslib/vfatxlib/CMakeLists.txt +++ b/lib/fslib/vfatxlib/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(vfatxlib ${SOURCE}) +add_library(vfatxlib fatx.c vfatxlib.c) diff --git a/lib/host/wcsfuncs/CMakeLists.txt b/lib/host/wcsfuncs/CMakeLists.txt index 02eb6397325..5f16bcbfbbd 100644 --- a/lib/host/wcsfuncs/CMakeLists.txt +++ b/lib/host/wcsfuncs/CMakeLists.txt @@ -1,4 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(host_wcsfuncs ${SOURCE}) - +add_library(host_wcsfuncs wcsfuncs.c) diff --git a/lib/lsalib/CMakeLists.txt b/lib/lsalib/CMakeLists.txt index c544bccadc6..fad7b70a634 100644 --- a/lib/lsalib/CMakeLists.txt +++ b/lib/lsalib/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) - -file(GLOB_RECURSE SOURCE "*.c") -add_library(lsalib ${SOURCE}) \ No newline at end of file +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) +add_library(lsalib lsa.c) diff --git a/lib/nls/idna/CMakeLists.txt b/lib/nls/idna/CMakeLists.txt index 7b6d8e21ced..716f6651d85 100644 --- a/lib/nls/idna/CMakeLists.txt +++ b/lib/nls/idna/CMakeLists.txt @@ -5,6 +5,4 @@ include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line add_definitions(-DWINVER=0x600) # And now we add our own -file(GLOB_RECURSE SOURCE "*.cpp") - -add_library(idna ${SOURCE}) \ No newline at end of file +add_library(idna idna.cpp nameprep.cpp) diff --git a/lib/nls/normalize/CMakeLists.txt b/lib/nls/normalize/CMakeLists.txt index 3630a82ccbc..cf13b7ffa62 100644 --- a/lib/nls/normalize/CMakeLists.txt +++ b/lib/nls/normalize/CMakeLists.txt @@ -5,6 +5,4 @@ include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line add_definitions(-DWINVER=0x600) # And now we add our own -file(GLOB_RECURSE SOURCE "*.cpp") - -add_library(normalize ${SOURCE}) \ No newline at end of file +add_library(normalize normalize.cpp) diff --git a/lib/nls/scripts/CMakeLists.txt b/lib/nls/scripts/CMakeLists.txt index cfdcf45bad3..56e483bca0f 100644 --- a/lib/nls/scripts/CMakeLists.txt +++ b/lib/nls/scripts/CMakeLists.txt @@ -5,6 +5,4 @@ include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/icu4ros/icu/source/common remove_definitions(-DWINVER=0x502) # This removes a top-level definition: The compiler never gets it on the command-line add_definitions(-DWINVER=0x600) # And now we add our own -file(GLOB_RECURSE SOURCE "*.cpp") - -add_library(scripts ${SOURCE}) \ No newline at end of file +add_library(scripts scripts.cpp) diff --git a/lib/recyclebin/CMakeLists.txt b/lib/recyclebin/CMakeLists.txt index 1de0a2545ee..bfdb690662c 100644 --- a/lib/recyclebin/CMakeLists.txt +++ b/lib/recyclebin/CMakeLists.txt @@ -1,3 +1,10 @@ -file(GLOB_RECURSE SOURCE "*.c") +list(APPEND SOURCE + guid.c + recyclebin.c + recyclebin_generic.c + recyclebin_generic_enumerator.c + recyclebin_v5.c + recyclebin_v5_enumerator.c) + add_library(recyclebin ${SOURCE}) \ No newline at end of file diff --git a/lib/rtl/CMakeLists.txt b/lib/rtl/CMakeLists.txt index c9fbb2e8fb4..17e7925f689 100644 --- a/lib/rtl/CMakeLists.txt +++ b/lib/rtl/CMakeLists.txt @@ -1,8 +1,9 @@ -add_definitions(-D_NTOSKRNL_) -add_definitions(-DNO_RTL_INLINES) -add_definitions(-D_NTSYSTEM_) -add_definitions(-D_NTDLLBUILD_) +add_definitions( + -D_NTOSKRNL_ + -DNO_RTL_INLINES + -D_NTSYSTEM_ + -D_NTDLLBUILD_) list(APPEND SOURCE access.c @@ -97,6 +98,6 @@ list(APPEND SOURCE powerpc/thread.c) endif(ARCH MATCHES i386) -add_library(rtl ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/rtl_rtl.h.gch) +add_library(rtl ${CMAKE_CURRENT_BINARY_DIR}/rtl_rtl.h.gch ${SOURCE}) add_pch(rtl ${CMAKE_CURRENT_SOURCE_DIR}/rtl.h ${SOURCE}) add_dependencies(rtl psdk) diff --git a/lib/sdk/crt/CMakeLists.txt b/lib/sdk/crt/CMakeLists.txt index ff14fc3d8be..a710e267dfa 100644 --- a/lib/sdk/crt/CMakeLists.txt +++ b/lib/sdk/crt/CMakeLists.txt @@ -410,7 +410,7 @@ list(APPEND CRT_SOURCE math/amd64/tan.S) endif(ARCH MATCHES amd64) -add_library(crt ${CRT_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch) +add_library(crt ${CMAKE_CURRENT_BINARY_DIR}/crt_precomp.h.gch ${CRT_SOURCE}) set_property(TARGET crt PROPERTY COMPILE_DEFINITIONS __MINGW_IMPORT=extern USE_MSVCRT_PREFIX _MSVCRT_LIB_ _MSVCRT_ _MT) add_pch(crt ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${CRT_SOURCE}) diff --git a/lib/sdk/delayimp/CMakeLists.txt b/lib/sdk/delayimp/CMakeLists.txt index bc83659603a..9490a138648 100644 --- a/lib/sdk/delayimp/CMakeLists.txt +++ b/lib/sdk/delayimp/CMakeLists.txt @@ -1,4 +1,3 @@ add_definitions(-DUNICODE -D_UNICODE) -file(GLOB_RECURSE SOURCE "*.c") -add_library(delayimp ${SOURCE}) +add_library(delayimp delayimp.c) diff --git a/lib/sdk/dxguid/CMakeLists.txt b/lib/sdk/dxguid/CMakeLists.txt index d822e214747..9cbcaecc3c7 100644 --- a/lib/sdk/dxguid/CMakeLists.txt +++ b/lib/sdk/dxguid/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(dxguid ${SOURCE}) +add_library(dxguid dxguid-mingw.c) diff --git a/lib/sdk/ioevent/CMakeLists.txt b/lib/sdk/ioevent/CMakeLists.txt index c24bed38f73..2f7d583bc0b 100644 --- a/lib/sdk/ioevent/CMakeLists.txt +++ b/lib/sdk/ioevent/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(ioevent ${SOURCE}) +add_library(ioevent ioevent.c) diff --git a/lib/sdk/scrnsave/CMakeLists.txt b/lib/sdk/scrnsave/CMakeLists.txt index e0be0667c46..033eab286c2 100644 --- a/lib/sdk/scrnsave/CMakeLists.txt +++ b/lib/sdk/scrnsave/CMakeLists.txt @@ -1,6 +1,4 @@ add_definitions(-DUNICODE -D_UNICODE) -file(GLOB_RECURSE SOURCE "*.c") -add_library(scrnsave ${SOURCE}) - -add_dependencies(scrnsave psdk) \ No newline at end of file +add_library(scrnsave scrnsave.c) +add_dependencies(scrnsave psdk) diff --git a/lib/sdk/strmiids/CMakeLists.txt b/lib/sdk/strmiids/CMakeLists.txt index 69585eb07ee..e40f871d0ba 100644 --- a/lib/sdk/strmiids/CMakeLists.txt +++ b/lib/sdk/strmiids/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(strmiids ${SOURCE}) +add_library(strmiids strmiids.c) diff --git a/lib/sdk/wdmguid/CMakeLists.txt b/lib/sdk/wdmguid/CMakeLists.txt index 45f5b02a495..2203b0851f2 100644 --- a/lib/sdk/wdmguid/CMakeLists.txt +++ b/lib/sdk/wdmguid/CMakeLists.txt @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_library(wdmguid ${SOURCE}) +add_library(wdmguid wdmguid.c) diff --git a/lib/tdilib/CMakeLists.txt b/lib/tdilib/CMakeLists.txt index 760d0a3f42b..310fa4af02b 100644 --- a/lib/tdilib/CMakeLists.txt +++ b/lib/tdilib/CMakeLists.txt @@ -1,6 +1,5 @@ + # FIXFIX: You guys should move this header in include/reactos/libs/iphlpapi! include_directories(${REACTOS_SOURCE_DIR}/dll/win32/iphlpapi) - -file(GLOB_RECURSE SOURCE "*.c") - -add_library(tdilib ${SOURCE}) \ No newline at end of file +add_library(tdilib enum.c handle.c) +add_dependencies(tdilib psdk)