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