1 2add_definitions( 3 -DUSE_WINE_TODOS 4 -D__WINESRC__) 5 6if(MSVC_IDE) 7 # msi_winetest.rc: let rc.exe find custom.dll in its subdirectory, i.e. Debug. 8 include_directories($<TARGET_FILE_DIR:custom>) 9endif() 10 11if(GCC) 12 add_compile_flags("-Wno-format-overflow") 13endif() 14 15spec2def(custom.dll custom.spec) 16add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def) 17target_link_libraries(custom uuid) 18set_module_type(custom win32dll) 19add_importlibs(custom msi ole32 msvcrt kernel32) 20 21list(APPEND SOURCE 22 action.c 23 automation.c 24 db.c 25 format.c 26 install.c 27 msi.c 28 package.c 29 patch.c 30 record.c 31 source.c 32 suminfo.c) 33 34list(APPEND PCH_SKIP_SOURCE 35 testlist.c) 36 37# CMake 3.9 and higher requires to specify this dependency manually 38# see https://gitlab.kitware.com/cmake/cmake/issues/19933 39set_property(SOURCE msi_winetest.rc PROPERTY OBJECT_DEPENDS custom.dll) 40 41add_executable(msi_winetest 42 ${SOURCE} 43 ${PCH_SKIP_SOURCE} 44 msi_winetest.rc) 45 46target_link_libraries(msi_winetest uuid) 47set_module_type(msi_winetest win32cui) 48add_importlibs(msi_winetest cabinet msi shell32 ole32 oleaut32 user32 advapi32 version msvcrt kernel32) 49add_pch(msi_winetest precomp.h "${PCH_SKIP_SOURCE}") 50add_rostests_file(TARGET msi_winetest) 51add_dependencies(msi_winetest custom) 52