master
txt 29 lines 1.6 KB
Raw
1 set(SOURCES
2 ${CMAKE_CURRENT_BINARY_DIR}/inc/${TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}/WslDeviceHost_i_${TARGET_PLATFORM}.c
3 ${CMAKE_CURRENT_BINARY_DIR}/inc/${TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}/WslDeviceHost_p_${TARGET_PLATFORM}.c
4 ${CMAKE_CURRENT_BINARY_DIR}/inc/${TARGET_PLATFORM}/${CMAKE_BUILD_TYPE}/dlldata_${TARGET_PLATFORM}.c
5 ${CMAKE_CURRENT_LIST_DIR}/WslDeviceHostProxyStub.def
6 ${CMAKE_CURRENT_LIST_DIR}/WslDeviceHostProxyStub.rc)
7
8 set_source_files_properties(${SOURCES} PROPERTIES GENERATED TRUE)
9
10 add_library(wsldevicehostproxystub SHARED ${SOURCES})
11 add_dependencies(wsldevicehostproxystub wsldevicehostidl)
12
13 # The generated dlldata.c uses ENTRY_PREFIX/REGISTER_PROXY_DLL only when those
14 # macros are pre-defined. midl-generated proxy code resolves IIDs via the _i.c
15 # definitions and links against rpcrt4/ole32 like classic-COM proxies.
16 target_link_libraries(wsldevicehostproxystub ${COMMON_LINK_LIBRARIES})
17
18 # The proxy/stub file uses `#define REGISTER_PROXY_DLL` so DllRegisterServer is
19 # emitted. This lets `regsvr32` work for developer/ad-hoc registration; the
20 # production install drives registration via MSI tables (see msipackage/package.wix.in).
21 target_compile_definitions(wsldevicehostproxystub PRIVATE
22 REGISTER_PROXY_DLL
23 PROXY_CLSID_IS={0x6D32A4B7,0x9E1F,0x4C82,{0xA5,0x73,0xF8,0xB1,0xC4,0xD2,0x9E,0x60}})
24
25 set_target_properties(wsldevicehostproxystub PROPERTIES FOLDER windows)
26
27 # MIDL generated proxy files each define their own MIDL_TYPE_FORMAT_STRING and
28 # related symbols, so they can't share a translation unit.
29 set_target_properties(wsldevicehostproxystub PROPERTIES UNITY_BUILD OFF)