# Setup project. PROJECT(C++.Wrapper VERSION 1.0.0.0 LANGUAGES CSharp) # Setup project to use C# utilities. INCLUDE(CSharpUtilities) # Create assembly info with current version. CONFIGURE_FILE("Properties/AssemblyInfo.cs" "Properties/AssemblyInfo.cs") # Add shared library project. ADD_LIBRARY(${PROJECT_NAME} SHARED "../BLE.API/Core/BleApi.cs" "../BLE.API/Interfaces/IBleApi.cs" "../BLE.API/Interfaces/IDeviceInfoApi.cs" "../BLE.API/Interfaces/IIlluminationApi.cs" "../BLE.API/Interfaces/IMeasurements.cs" "../Plugin.BLE/Core/AttributeType.cs" "../Plugin.BLE/Core/BluetoothLE.cs" "../Plugin.BLE/Core/BluetoothLEAttributeDisplay.cs" "../Plugin.BLE/Core/BluetoothLEDeviceDisplay.cs" "../Plugin.BLE/Core/DataFormat.cs" "../Plugin.BLE/Core/DeviceWatcherHelper.cs" "../Plugin.BLE/Core/EnumGuidMapperAttribute.cs" "../Plugin.BLE/Core/GattNativeCharacteristicUuid.cs" "../Plugin.BLE/Core/GattNativeDescriptorUuid.cs" "../Plugin.BLE/Core/GattNativeServiceUuid.cs" "../Plugin.BLE/Core/TaskExtensions.cs" "../Plugin.BLE/Core/Utilities.cs" "../Plugin.BLE/Enums/CustomCharacteristics.cs" "../Plugin.BLE/Enums/CustomServices.cs" "../Plugin.BLE/Interfaces/IBluetoothLE.cs" "../Plugin.BLE/Interfaces/IDeviceInfo.cs" "../Plugin.BLE/Interfaces/IIllumination.cs" "../Plugin.BLE/Interfaces/IMeasurements.cs" "BleApiWrapper.cs" ) include(GenerateExportHeader) generate_export_header(${PROJECT_NAME}) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_PACKAGE_REFERENCES "Microsoft.Windows.SDK.Contracts_10.0.19041.1" ) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCE_Windows ${CMAKE_INSTALL_EXPORT_DIR}Windows.winmd) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCE_DllExport ${CMAKE_INSTALL_EXPORT_DIR}DllExport.1.7.4/gcache/metalib/C__.Wrapper/DllExport.dll) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCE_System.Runtime.WindowsRuntime ${CMAKE_INSTALL_EXPORT_DIR}system.runtime.windowsruntime/4.6.0/lib/netstandard2.0/System.Runtime.WindowsRuntime.dll) set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCE_System.Runtime.WindowsRuntime.UI.Xaml ${CMAKE_INSTALL_EXPORT_DIR}system.runtime.windowsruntime.ui.xaml/4.6.0/lib/netstandard2.0/System.Runtime.WindowsRuntime.UI.Xaml.dll) # Define dependencies. TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC CommonLib ) # Set CLR assembly properties. SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VS_DOTNET_REFERENCES "System;System.IO;System.Threading;" VS_GLOBAL_ROOTNAMESPACE ${PROJECT_NAME} ) # Setup installer. INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBRARY_DIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBRARY_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINARY_DIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDE_DIR} ) # Export config. INSTALL(EXPORT ${PROJECT_NAME}Config DESTINATION ${CMAKE_INSTALL_EXPORT_DIR}) EXPORT(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)