diff --git a/dll/directx/ksproxy/CMakeLists.txt b/dll/directx/ksproxy/CMakeLists.txt index b30bcf0e744..4536cc39153 100644 --- a/dll/directx/ksproxy/CMakeLists.txt +++ b/dll/directx/ksproxy/CMakeLists.txt @@ -1,11 +1,13 @@ + spec2def(ksproxy.ax ksproxy.spec) add_definitions(-D_DLL -D__USE_CRTIMP) - include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport) - add_definitions( +add_definitions( -DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++ -DNATIVE_C_INCLUDE=${REACTOS_SOURCE_DIR}/include/crt) +include_directories(BEFORE ${REACTOS_SOURCE_DIR}/include/c++/stlport) + add_library(ksproxy SHARED allocator.cpp basicaudio.cpp @@ -36,14 +38,11 @@ else() #set_target_properties(ksproxy PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti") endif(MSVC) - target_link_libraries(ksproxy - stlport -lsupc++ -lgcc + stlport -lsupc++ -lgcc -lmingw32 -lcoldname strmiids) add_importlibs(ksproxy - mingw32 - coldname advapi32 ole32 setupapi @@ -54,4 +53,4 @@ add_importlibs(ksproxy add_dependencies(ksproxy psdk buildno_header) -add_cab_target(ksproxy 1) \ No newline at end of file +add_cab_target(ksproxy 1) diff --git a/dll/win32/advapi32/CMakeLists.txt b/dll/win32/advapi32/CMakeLists.txt index cb2aa80605d..6f24978c0b3 100644 --- a/dll/win32/advapi32/CMakeLists.txt +++ b/dll/win32/advapi32/CMakeLists.txt @@ -45,10 +45,6 @@ list(APPEND SOURCE advapi32.rc ${CMAKE_CURRENT_BINARY_DIR}/advapi32.def) -if(NOT MSVC) - set_source_files_properties(advapi32.def PROPERTIES EXTERNAL_OBJECT TRUE) -endif() - add_library(advapi32 SHARED ${CMAKE_CURRENT_BINARY_DIR}/advapi32_advapi32.h.gch ${SOURCE}) @@ -66,5 +62,4 @@ add_importlibs(advapi32 rpcrt4 kernel32 ntdll msvcrt) add_pch(advapi32 ${CMAKE_CURRENT_SOURCE_DIR}/advapi32.h ${SOURCE}) add_cab_target(advapi32 1) -add_importlib_target(advapi32.spec libntdll) - +add_importlib_target(advapi32.spec) diff --git a/dll/win32/browseui/CMakeLists.txt b/dll/win32/browseui/CMakeLists.txt index 43f5768f2fe..58f77327e6c 100644 --- a/dll/win32/browseui/CMakeLists.txt +++ b/dll/win32/browseui/CMakeLists.txt @@ -1,3 +1,4 @@ + set_unicode() set_cpp() @@ -13,6 +14,7 @@ include_directories( ${REACTOS_SOURCE_DIR}/lib/atl) set_rc_compiler() + spec2def(browseui.dll browseui.spec) list(APPEND SOURCE @@ -45,11 +47,11 @@ set_module_type(browseui win32dll) target_link_libraries(browseui atlnew uuid - wine) + wine + -lmingw32 + -lcoldname) add_importlibs(browseui - mingw32 - coldname shlwapi shell32 comctl32 diff --git a/dll/win32/cabinet/CMakeLists.txt b/dll/win32/cabinet/CMakeLists.txt index 508cf7c64cb..89546497d4d 100644 --- a/dll/win32/cabinet/CMakeLists.txt +++ b/dll/win32/cabinet/CMakeLists.txt @@ -20,5 +20,7 @@ set_entrypoint(cabinet 0) target_link_libraries(cabinet wine) add_importlibs(cabinet kernel32 ntdll) +add_importlib_target(cabinet.spec) + add_dependencies(cabinet psdk buildno_header) add_cab_target(cabinet 1) diff --git a/dll/win32/cryptui/CMakeLists.txt b/dll/win32/cryptui/CMakeLists.txt index 0b82ed87782..149164ec714 100644 --- a/dll/win32/cryptui/CMakeLists.txt +++ b/dll/win32/cryptui/CMakeLists.txt @@ -1,9 +1,12 @@ -add_definitions(-D__WINESRC__) -add_definitions(-D_WINE) +add_definitions( + -D__WINESRC__ + -D_WINE) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() + spec2def(cryptui.dll cryptui.spec) list(APPEND SOURCE @@ -33,5 +36,6 @@ add_importlibs(cryptui kernel32 ntdll) +add_importlib_target(cryptui.spec) add_cab_target(cryptui 1) diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index ae314262e41..7c7628d30ae 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -54,4 +54,6 @@ target_link_libraries(dbghelp add_importlibs(dbghelp psapi version msvcrt kernel32 ntdll) +add_importlib_target(dbghelp.spec) + add_cab_target(dbghelp 1) diff --git a/dll/win32/dhcpcsvc/CMakeLists.txt b/dll/win32/dhcpcsvc/CMakeLists.txt index be29e48cc7f..c0040ddc944 100644 --- a/dll/win32/dhcpcsvc/CMakeLists.txt +++ b/dll/win32/dhcpcsvc/CMakeLists.txt @@ -28,9 +28,9 @@ add_library(dhcpcsvc SHARED set_module_type(dhcpcsvc win32dll) - - add_importlibs(dhcpcsvc ws2_32 iphlpapi advapi32 msvcrt kernel32 ntdll) +add_importlib_target(dhcpcsvc.spec) + add_pch(dhcpcsvc ${CMAKE_CURRENT_SOURCE_DIR}/include/rosdhcp.h ${SOURCE}) add_cab_target(dhcpcsvc 1) diff --git a/dll/win32/gdiplus/CMakeLists.txt b/dll/win32/gdiplus/CMakeLists.txt index ec6e9f953d6..43750f41d0a 100644 --- a/dll/win32/gdiplus/CMakeLists.txt +++ b/dll/win32/gdiplus/CMakeLists.txt @@ -1,9 +1,12 @@ -add_definitions(-D__WINESRC__) -add_definitions(-D_DLL -D__USE_CRTIMP) +add_definitions( + -D__WINESRC__ + -D_DLL -D__USE_CRTIMP) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) set_rc_compiler() + spec2def(gdiplus.dll gdiplus.spec) list(APPEND SOURCE @@ -26,9 +29,7 @@ add_library(gdiplus SHARED ${SOURCE}) set_module_type(gdiplus win32dll) -target_link_libraries(gdiplus - uuid - wine) +target_link_libraries(gdiplus uuid wine) add_importlibs(gdiplus msvcrt @@ -41,9 +42,10 @@ add_importlibs(gdiplus kernel32 ntdll) +add_importlib_target(gdiplus.spec) + if(ARCH MATCHES amd64) target_link_libraries(gdiplus crt) endif(ARCH MATCHES amd64) - add_cab_target(gdiplus 1) diff --git a/dll/win32/imagehlp/CMakeLists.txt b/dll/win32/imagehlp/CMakeLists.txt index 5ed8b9613aa..8163a6e56aa 100644 --- a/dll/win32/imagehlp/CMakeLists.txt +++ b/dll/win32/imagehlp/CMakeLists.txt @@ -1,6 +1,7 @@ -add_definitions(-D_DLL -D__USE_CRTIMP) -add_definitions(-D_IMAGEHLP_SOURCE_) +add_definitions( + -D_DLL -D__USE_CRTIMP + -D_IMAGEHLP_SOURCE_) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) @@ -23,6 +24,8 @@ set_module_type(imagehlp win32dll) target_link_libraries(imagehlp wine) add_importlibs(imagehlp dbghelp msvcrt kernel32 ntdll) +add_importlib_target(imagehlp.spec) + add_pch(imagehlp ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) add_cab_target(imagehlp 1) diff --git a/dll/win32/iphlpapi/CMakeLists.txt b/dll/win32/iphlpapi/CMakeLists.txt index 1cc323ea776..d2d1d2c9c71 100644 --- a/dll/win32/iphlpapi/CMakeLists.txt +++ b/dll/win32/iphlpapi/CMakeLists.txt @@ -10,7 +10,7 @@ include_directories( spec2def(iphlpapi.dll iphlpapi.spec) -add_library(iphlpapi SHARED +list(APPEND SOURCE dhcp_reactos.c ifenum_reactos.c ipstats_reactos.c @@ -22,11 +22,11 @@ add_library(iphlpapi SHARED iphlpapi.rc ${CMAKE_CURRENT_BINARY_DIR}/iphlpapi.def) +add_library(iphlpapi SHARED ${SOURCE}) + set_module_type(iphlpapi win32dll) -target_link_libraries(iphlpapi - wine - tdilib) +target_link_libraries(iphlpapi wine tdilib) add_importlibs(iphlpapi dhcpcsvc advapi32 ws2_32 msvcrt kernel32 ntdll) diff --git a/dll/win32/mlang/CMakeLists.txt b/dll/win32/mlang/CMakeLists.txt index b2ac57a5993..707bd89277d 100644 --- a/dll/win32/mlang/CMakeLists.txt +++ b/dll/win32/mlang/CMakeLists.txt @@ -1,7 +1,9 @@ add_definitions(-D__WINESRC__) + remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) + include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(mlang.dll mlang.spec) @@ -15,9 +17,7 @@ add_library(mlang SHARED ${SOURCE}) set_entrypoint(mlang 0) -target_link_libraries(mlang - uuid - wine) +target_link_libraries(mlang uuid wine) add_importlibs(mlang ole32 @@ -28,5 +28,7 @@ add_importlibs(mlang kernel32 ntdll) +add_importlib_target(mlang.spec) + add_dependencies(mlang psdk buildno_header) -add_cab_target(mlang 1) \ No newline at end of file +add_cab_target(mlang 1) diff --git a/dll/win32/mscoree/CMakeLists.txt b/dll/win32/mscoree/CMakeLists.txt index 96678d09cdc..1d901d8e573 100644 --- a/dll/win32/mscoree/CMakeLists.txt +++ b/dll/win32/mscoree/CMakeLists.txt @@ -4,13 +4,16 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(mscoree.dll mscoree.spec) -add_library(mscoree SHARED corruntimehost.c mscoree_main.c ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def) +list(APPEND SOURCE + corruntimehost.c + mscoree_main.c + ${CMAKE_CURRENT_BINARY_DIR}/mscoree.def) + +add_library(mscoree SHARED ${SOURCE}) set_module_type(mscoree win32dll) -target_link_libraries(mscoree - wine - uuid) +target_link_libraries(mscoree wine uuid) add_importlibs(mscoree advapi32 shell32 msvcrt kernel32 ntdll) diff --git a/dll/win32/msvcrt40/CMakeLists.txt b/dll/win32/msvcrt40/CMakeLists.txt index f3ac72a82f6..a546da850c4 100644 --- a/dll/win32/msvcrt40/CMakeLists.txt +++ b/dll/win32/msvcrt40/CMakeLists.txt @@ -6,7 +6,11 @@ add_definitions(-DCRTDLL) spec2def(msvcrt40.dll msvcrt40.spec) -add_library(msvcrt40 SHARED msvcrt40.c ${CMAKE_CURRENT_BINARY_DIR}/msvcrt40.def) +list(APPEND SOURCE + msvcrt40.c + ${CMAKE_CURRENT_BINARY_DIR}/msvcrt40.def) + +add_library(msvcrt40 SHARED ${SOURCE}) set_module_type(msvcrt40 win32dll) diff --git a/dll/win32/psapi/CMakeLists.txt b/dll/win32/psapi/CMakeLists.txt index 85d1e458fe4..c13f086b6b5 100644 --- a/dll/win32/psapi/CMakeLists.txt +++ b/dll/win32/psapi/CMakeLists.txt @@ -20,6 +20,8 @@ target_link_libraries(psapi ${PSEH_LIB}) add_importlibs(psapi msvcrt kernel32 ntdll) +add_importlib_target(psapi.spec) + add_pch(psapi ${CMAKE_CURRENT_SOURCE_DIR}/precomp.h ${SOURCE}) add_cab_target(psapi 1) diff --git a/dll/win32/riched20/CMakeLists.txt b/dll/win32/riched20/CMakeLists.txt index af083571970..73eb77f7a6e 100644 --- a/dll/win32/riched20/CMakeLists.txt +++ b/dll/win32/riched20/CMakeLists.txt @@ -5,6 +5,8 @@ add_definitions( include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +spec2def(riched20.dll riched20.spec) + add_library(riched20 SHARED caret.c clipboard.c @@ -26,17 +28,11 @@ add_library(riched20 SHARED wrap.c writer.c version.rc - riched20.def) - -if(NOT MSVC) - set_source_files_properties(riched20.def PROPERTIES EXTERNAL_OBJECT TRUE) -endif() + ${CMAKE_CURRENT_BINARY_DIR}/riched20.def) set_module_type(riched20 win32dll) -target_link_libraries(riched20 - wine - uuid) +target_link_libraries(riched20 wine uuid) if(MSVC) set_target_properties(riched20 PROPERTIES COMPILE_FLAGS "/FIwine/typeof.h") @@ -52,4 +48,6 @@ add_importlibs(riched20 kernel32 ntdll) +add_importlib_target(riched20.spec) + add_cab_target(riched20 1) diff --git a/dll/win32/spoolss/CMakeLists.txt b/dll/win32/spoolss/CMakeLists.txt index 021cf6bfcf4..d071da2c2f2 100644 --- a/dll/win32/spoolss/CMakeLists.txt +++ b/dll/win32/spoolss/CMakeLists.txt @@ -16,5 +16,6 @@ set_module_type(spoolss win32dll) target_link_libraries(spoolss wine) add_importlibs(spoolss winspool msvcrt kernel32 ntdll) +add_importlib_target(spoolss.spec) add_cab_target(spoolss 1) diff --git a/dll/win32/ufatx/CMakeLists.txt b/dll/win32/ufatx/CMakeLists.txt index 1d5dc839260..fd0dc3d7bc9 100644 --- a/dll/win32/ufatx/CMakeLists.txt +++ b/dll/win32/ufatx/CMakeLists.txt @@ -1,14 +1,16 @@ -add_library(ufatx SHARED ufatx.rc ufatx.def) +spec2def(ufatx.dll ufatx.spec) -if(NOT MSVC) - set_source_files_properties(ufatx.def PROPERTIES EXTERNAL_OBJECT TRUE) -endif() +add_library(ufatx SHARED + ufatx.rc + ${CMAKE_CURRENT_BINARY_DIR}/ufatx.def) set_entrypoint(ufatx 0) -target_link_libraries(ufatx vfatxlib) +target_link_libraries(ufatx vfatxlib -lgcc) + +add_importlibs(ufatx kernel32 ntdll) +add_importlib_target(ufatx.spec) -add_importlibs(ufatx gcc kernel32 ntdll) add_dependencies(ufatx psdk buildno_header) -add_cab_target(ufatx 1) \ No newline at end of file +add_cab_target(ufatx 1) diff --git a/dll/win32/usp10/CMakeLists.txt b/dll/win32/usp10/CMakeLists.txt index 8a5851a815c..298c79e55c7 100644 --- a/dll/win32/usp10/CMakeLists.txt +++ b/dll/win32/usp10/CMakeLists.txt @@ -19,5 +19,6 @@ set_module_type(usp10 win32dll) target_link_libraries(usp10 wine) add_importlibs(usp10 gdi32 msvcrt kernel32 ntdll) +add_importlib_target(usp10.spec) add_cab_target(usp10 1) diff --git a/dll/win32/windowscodecs/CMakeLists.txt b/dll/win32/windowscodecs/CMakeLists.txt index 425ca8aef7a..01cfe445b02 100644 --- a/dll/win32/windowscodecs/CMakeLists.txt +++ b/dll/win32/windowscodecs/CMakeLists.txt @@ -41,8 +41,9 @@ add_library(windowscodecs SHARED ${SOURCE}) set_module_type(windowscodecs win32dll) -target_link_libraries(windowscodecs wine) +target_link_libraries(windowscodecs wine uuid) -add_importlibs(windowscodecs uuid ole32 shlwapi advapi32 msvcrt kernel32 ntdll) +add_importlibs(windowscodecs ole32 shlwapi advapi32 msvcrt kernel32 ntdll) +add_importlib_target(windowscodecs.spec) add_cab_target(windowscodecs 1) diff --git a/drivers/directx/dxgthk/CMakeLists.txt b/drivers/directx/dxgthk/CMakeLists.txt index 5d51d8a7ee8..99d75585263 100644 --- a/drivers/directx/dxgthk/CMakeLists.txt +++ b/drivers/directx/dxgthk/CMakeLists.txt @@ -9,4 +9,6 @@ add_library(dxgthk SHARED set_module_type(dxgthk kernelmodedriver) add_importlibs(dxgthk win32k) -add_cab_target(dxgthk 2) \ No newline at end of file +add_importlib_target(dxgthk.spec) + +add_cab_target(dxgthk 2)