2010-12-07 11:40:10 +00:00
|
|
|
|
2018-03-04 23:31:58 +00:00
|
|
|
spec2def(custom.dll custom.spec)
|
2019-03-20 13:19:48 +00:00
|
|
|
add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def)
|
2018-03-04 23:31:58 +00:00
|
|
|
target_link_libraries(custom uuid)
|
|
|
|
set_module_type(custom win32dll)
|
2022-03-12 15:13:28 +00:00
|
|
|
add_importlibs(custom msi ole32 oleaut32 odbccp32 shell32 advapi32 msvcrt kernel32)
|
2018-03-04 23:31:58 +00:00
|
|
|
|
2022-03-12 15:17:14 +00:00
|
|
|
spec2def(selfreg.dll selfreg.spec)
|
|
|
|
add_library(selfreg MODULE selfreg.c ${CMAKE_CURRENT_BINARY_DIR}/selfreg.def)
|
|
|
|
set_module_type(selfreg win32dll)
|
|
|
|
add_importlibs(selfreg advapi32 msvcrt kernel32)
|
|
|
|
|
2010-12-07 11:40:10 +00:00
|
|
|
list(APPEND SOURCE
|
2012-01-21 17:21:57 +00:00
|
|
|
action.c
|
2010-12-07 11:40:10 +00:00
|
|
|
automation.c
|
|
|
|
db.c
|
|
|
|
format.c
|
|
|
|
install.c
|
|
|
|
msi.c
|
|
|
|
package.c
|
|
|
|
patch.c
|
|
|
|
record.c
|
|
|
|
source.c
|
2022-03-12 14:14:54 +00:00
|
|
|
suminfo.c
|
|
|
|
typelib.idl)
|
2020-05-09 21:37:40 +00:00
|
|
|
|
|
|
|
list(APPEND PCH_SKIP_SOURCE
|
2022-03-12 14:14:54 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/typelib_i.c
|
2020-05-09 21:37:40 +00:00
|
|
|
testlist.c)
|
2010-12-07 11:40:10 +00:00
|
|
|
|
2020-06-07 07:26:23 +00:00
|
|
|
# CMake 3.9 and higher requires to specify this dependency manually
|
|
|
|
# see https://gitlab.kitware.com/cmake/cmake/issues/19933
|
2022-03-12 15:17:14 +00:00
|
|
|
set_property(SOURCE msi_winetest.rc PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/custom.dll ${CMAKE_CURRENT_BINARY_DIR}/selfreg.dll ${CMAKE_CURRENT_BINARY_DIR}/typelib.tlb)
|
2019-12-13 01:15:57 +00:00
|
|
|
|
2020-05-09 21:37:40 +00:00
|
|
|
add_executable(msi_winetest
|
|
|
|
${SOURCE}
|
|
|
|
${PCH_SKIP_SOURCE}
|
|
|
|
msi_winetest.rc)
|
|
|
|
|
2022-03-12 14:14:54 +00:00
|
|
|
add_idl_headers(msi_winetest_idlheader typelib.idl)
|
|
|
|
generate_idl_iids(typelib.idl)
|
|
|
|
add_typelib(typelib.idl)
|
|
|
|
|
2020-09-21 10:16:02 +00:00
|
|
|
target_compile_definitions(msi_winetest PRIVATE __WINESRC__ USE_WINE_TODOS)
|
|
|
|
|
2021-04-09 00:58:19 +00:00
|
|
|
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
2022-03-14 20:24:16 +00:00
|
|
|
target_compile_options(msi_winetest PRIVATE -Wno-format-overflow -Wno-format)
|
|
|
|
target_compile_options(custom PRIVATE -Wno-format)
|
2020-09-21 10:16:02 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# msi_winetest.rc: let rc.exe find custom.dll in its subdirectory, i.e. Debug.
|
|
|
|
if (MSVC_IDE)
|
|
|
|
target_include_directories(msi_winetest PRIVATE $<$<COMPILE_LANGUAGE:RC>:$<TARGET_FILE_DIR:custom>>)
|
|
|
|
endif()
|
|
|
|
|
2013-09-22 16:30:59 +00:00
|
|
|
target_link_libraries(msi_winetest uuid)
|
2010-12-07 11:40:10 +00:00
|
|
|
set_module_type(msi_winetest win32cui)
|
2022-03-12 22:57:45 +00:00
|
|
|
add_importlibs(msi_winetest secur32 cabinet msi shell32 ole32 oleaut32 odbccp32 user32 advapi32 version msvcrt kernel32)
|
2020-05-09 21:37:40 +00:00
|
|
|
add_pch(msi_winetest precomp.h "${PCH_SKIP_SOURCE}")
|
2017-01-13 09:24:15 +00:00
|
|
|
add_rostests_file(TARGET msi_winetest)
|
2022-03-12 15:17:14 +00:00
|
|
|
add_dependencies(msi_winetest custom selfreg msi_winetest_idlheader stdole2)
|