1 2project(SHELL) 3 4add_definitions( 5 -D__WINESRC__ 6 -D_SHLWAPI_) 7 8spec2def(shlwapi.dll shlwapi.spec ADD_IMPORTLIB) 9 10list(APPEND SOURCE 11 clist.c 12 istream.c 13 msgbox.c 14 ordinal.c 15 path.c 16 reg.c 17 regstream.c 18 rosordinal.c 19 shlwapi_main.c 20 stopwatch.c 21 string.c 22 thread.c 23 url.c) 24 25list(APPEND PCH_SKIP_SOURCE 26 assoc.c 27 propbag.cpp 28 utils.cpp 29 wsprintf.c 30 ${CMAKE_CURRENT_BINARY_DIR}/shlwapi_stubs.c) 31 32add_library(shlwapi MODULE 33 ${SOURCE} 34 ${PCH_SKIP_SOURCE} 35 $<TARGET_OBJECTS:shlwapi_autocomp> 36 shlwapi.rc 37 ${CMAKE_CURRENT_BINARY_DIR}/shlwapi.def) 38 39# our C++ atlbase.h conflicts with the one from wine, so only use wine includes for C 40# Unfortunately, we can't use different includes for C & C++ in VS generator, so use an object library to achieve this 41target_include_directories(shlwapi BEFORE PRIVATE 42 ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine 43 ${REACTOS_SOURCE_DIR}/sdk/lib/atl) 44 45add_library(shlwapi_autocomp OBJECT autocomp.cpp) 46target_link_libraries(shlwapi_autocomp PRIVATE atl_classes) 47target_compile_definitions(shlwapi_autocomp PRIVATE $<TARGET_PROPERTY:shlwapi,COMPILE_DEFINITIONS>) 48target_compile_options(shlwapi_autocomp PRIVATE $<TARGET_PROPERTY:shlwapi,COMPILE_OPTIONS>) 49add_dependencies(shlwapi_autocomp psdk) 50 51set_module_type(shlwapi win32dll UNICODE) 52target_link_libraries(shlwapi uuid wine cpprt) 53add_delay_importlibs(shlwapi userenv oleaut32 ole32 comdlg32 mpr mlang urlmon shell32 winmm version) 54add_importlibs(shlwapi user32 gdi32 advapi32 wininet msvcrt kernel32 ntdll) 55add_pch(shlwapi precomp.h "${PCH_SKIP_SOURCE}") 56add_cd_file(TARGET shlwapi DESTINATION reactos/system32 FOR all) 57