├── samples ├── Demo │ ├── GreeterLib │ │ ├── stdafx.cpp │ │ ├── GreeterLib.rgs │ │ ├── Export.def │ │ ├── Greeter.rc │ │ ├── Greeter.cpp │ │ ├── CMakeLists.txt │ │ ├── targetver.h │ │ ├── stdafx.h │ │ ├── Greeter.rgs │ │ ├── resource.h │ │ ├── Greeter.h │ │ └── dllmain.cpp │ ├── GreeterIDL │ │ ├── CMakeLists.txt │ │ └── Greeter.idl │ ├── GreeterIDLWithTLBIMP │ │ ├── CMakeLists.txt │ │ └── Greeter.idl │ ├── MainCpp │ │ ├── CMakeLists.txt │ │ └── Main.cpp │ ├── MainCsharp │ │ ├── CMakeLists.txt │ │ └── Main.cs │ └── CMakeLists.txt └── CMakeLists.txt ├── .editorconfig ├── appveyor.yml ├── LICENSE ├── cmake └── FindIDL.cmake └── README.md /samples/Demo/GreeterLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/GreeterLib.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /samples/Demo/GreeterIDL/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_idl(GreeterIDL Greeter.idl) -------------------------------------------------------------------------------- /samples/Demo/GreeterIDLWithTLBIMP/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_idl(GreeterIDLWithTLBIMP Greeter.idl TLBIMP GreeterInterop) -------------------------------------------------------------------------------- /samples/Demo/MainCpp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(MainCpp Main.cpp) 2 | target_link_libraries(MainCpp GreeterIDL) -------------------------------------------------------------------------------- /samples/Demo/GreeterIDL/Greeter.idl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apriorit/FindIDL/HEAD/samples/Demo/GreeterIDL/Greeter.idl -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/Export.def: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apriorit/FindIDL/HEAD/samples/Demo/GreeterLib/Export.def -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/Greeter.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apriorit/FindIDL/HEAD/samples/Demo/GreeterLib/Greeter.rc -------------------------------------------------------------------------------- /samples/Demo/MainCsharp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(MainCsharp Main.cs) 2 | target_link_libraries(MainCsharp GreeterInterop) -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 4 8 | -------------------------------------------------------------------------------- /samples/Demo/GreeterIDLWithTLBIMP/Greeter.idl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apriorit/FindIDL/HEAD/samples/Demo/GreeterIDLWithTLBIMP/Greeter.idl -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/Greeter.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Greeter.h" 3 | 4 | STDMETHODIMP CGreeter::greet() 5 | { 6 | std::cout << "Greet! "; 7 | return S_OK; 8 | } 9 | -------------------------------------------------------------------------------- /samples/Demo/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(GreeterIDL) 2 | add_subdirectory(GreeterIDLWithTLBIMP) 3 | add_subdirectory(GreeterLib) 4 | add_subdirectory(MainCpp) 5 | add_subdirectory(MainCsharp) -------------------------------------------------------------------------------- /samples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | 3 | project(FindIDL LANGUAGES C CXX CSharp) 4 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 5 | 6 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake") 7 | find_package(IDL REQUIRED) 8 | 9 | set(MIDL_FLAGS /target NT60) 10 | 11 | add_subdirectory(Demo) -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB src "*.h" "*.cpp" "*.def" "*.rc" "*.rgs") 2 | 3 | add_library(GreeterLib SHARED ${src}) 4 | target_link_libraries(GreeterLib GreeterIDL) 5 | 6 | set_target_properties(GreeterLib PROPERTIES COMPILE_FLAGS "/Yustdafx.h") 7 | set_source_files_properties(stdafx.cpp PROPERTIES COMPILE_FLAGS "/Ycstdafx.h") -------------------------------------------------------------------------------- /samples/Demo/MainCsharp/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using GreeterInterop; 3 | 4 | namespace Samples 5 | { 6 | class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | GreeterClass obj = new GreeterClass(); 11 | obj.greet(); 12 | Console.WriteLine(""); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef STRICT 4 | #define STRICT 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_APARTMENT_THREADED 10 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 11 | #define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW 12 | 13 | #include 14 | #include 15 | #include -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | image: Visual Studio 2015 2 | 3 | environment: 4 | matrix: 5 | - generator: "Visual Studio 14 2015" 6 | - generator: "Visual Studio 14 2015 Win64" 7 | 8 | matrix: 9 | fast_finish: true 10 | 11 | shallow_clone: true 12 | 13 | before_build: 14 | - cmake -Hsamples -Bbuild -G"%generator%" 15 | 16 | build_script: 17 | - cmake --build build --config Debug -- /m /v:m 18 | - cmake --build build --config RelWithDebInfo -- /m /v:m 19 | -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/Greeter.rgs: -------------------------------------------------------------------------------- 1 | HKCR 2 | { 3 | NoRemove CLSID 4 | { 5 | ForceRemove {abfb8f85-f719-48aa-9422-eefb5afe5d1e} = s 'Greeter class' 6 | { 7 | ForceRemove Programmable 8 | InprocServer32 = s '%MODULE%' 9 | { 10 | val ThreadingModel = s 'Apartment' 11 | } 12 | TypeLib = s '{8c546c0f-70c5-429e-be3b-6c14c92a7845}' 13 | Version = s '1.0' 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/resource.h: -------------------------------------------------------------------------------- 1 | #define IDS_PROJNAME 100 2 | #define IDR_GREETER 101 3 | #define IDR_GREETERLIB 102 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 201 10 | #define _APS_NEXT_COMMAND_VALUE 32768 11 | #define _APS_NEXT_CONTROL_VALUE 201 12 | #define _APS_NEXT_SYMED_VALUE 108 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /samples/Demo/MainCpp/Main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "Greeter_i.h" // generated from idl 4 | #include "Greeter_i.c" // generated from idl 5 | 6 | int main(int argc, char** argv) 7 | { 8 | CoInitialize(nullptr); 9 | 10 | { 11 | CComPtr greeter; 12 | if (FAILED(greeter.CoCreateInstance(CLSID_Greeter))) 13 | { 14 | std::cerr << "Failed to create CLSID_Greeter instance!" << std::endl; 15 | return -1; 16 | } 17 | 18 | greeter->greet(); 19 | } 20 | 21 | CoUninitialize(); 22 | 23 | return 0; 24 | } -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/Greeter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "resource.h" 3 | #include "Greeter_i.h" // generated from idl 4 | 5 | class ATL_NO_VTABLE CGreeter : 6 | public CComObjectRootEx, 7 | public CComCoClass, 8 | public IDispatchImpl 9 | { 10 | public: 11 | DECLARE_REGISTRY_RESOURCEID(IDR_GREETER) 12 | 13 | BEGIN_COM_MAP(CGreeter) 14 | COM_INTERFACE_ENTRY(IGreeter) 15 | COM_INTERFACE_ENTRY(IDispatch) 16 | END_COM_MAP() 17 | 18 | DECLARE_PROTECT_FINAL_CONSTRUCT() 19 | 20 | public: 21 | STDMETHOD(greet)(); 22 | }; 23 | 24 | OBJECT_ENTRY_AUTO(__uuidof(Greeter), CGreeter) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018, Apriorit Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | Redistributions in binary form must reproduce the above copyright notice, this 10 | list of conditions and the following disclaimer in the documentation and/or 11 | other materials provided with the distribution. 12 | 13 | Neither the name of the {organization} nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR 21 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 24 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /samples/Demo/GreeterLib/dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "resource.h" 3 | #include "Greeter_i.h" // generated from idl 4 | #include "Greeter_i.c" // generated from idl 5 | 6 | class GreeterLib : public CAtlDllModuleT 7 | { 8 | public: 9 | DECLARE_LIBID(LIBID_GreeterLib) 10 | DECLARE_REGISTRY_APPID_RESOURCEID(IDR_GREETERLIB, "{8c546c0f-70c5-429e-be3b-6c14c92a7845}") 11 | }; 12 | 13 | GreeterLib _AtlModule; 14 | 15 | // DLL Entry Point 16 | extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) 17 | { 18 | hInstance; 19 | return _AtlModule.DllMain(dwReason, lpReserved); 20 | } 21 | 22 | // Used to determine whether the DLL can be unloaded by OLE. 23 | _Use_decl_annotations_ 24 | STDAPI DllCanUnloadNow(void) 25 | { 26 | return _AtlModule.DllCanUnloadNow(); 27 | } 28 | 29 | // Returns a class factory to create an object of the requested type. 30 | _Use_decl_annotations_ 31 | STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID* ppv) 32 | { 33 | return _AtlModule.DllGetClassObject(rclsid, riid, ppv); 34 | } 35 | 36 | // DllRegisterServer - Adds entries to the system registry. 37 | _Use_decl_annotations_ 38 | STDAPI DllRegisterServer(void) 39 | { 40 | // registers object, typelib and all interfaces in typelib 41 | return _AtlModule.DllRegisterServer(); 42 | } 43 | 44 | // DllUnregisterServer - Removes entries from the system registry. 45 | _Use_decl_annotations_ 46 | STDAPI DllUnregisterServer(void) 47 | { 48 | return _AtlModule.DllUnregisterServer(); 49 | } 50 | 51 | // DllInstall - Adds/Removes entries to the system registry per user per machine. 52 | STDAPI DllInstall(BOOL bInstall, _In_opt_ LPCWSTR pszCmdLine) 53 | { 54 | HRESULT hr = E_FAIL; 55 | static const wchar_t szUserSwitch[] = L"user"; 56 | 57 | if (pszCmdLine != NULL) 58 | { 59 | if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0) 60 | { 61 | ATL::AtlSetPerUserRegistration(true); 62 | } 63 | } 64 | 65 | if (bInstall) 66 | { 67 | hr = DllRegisterServer(); 68 | if (FAILED(hr)) 69 | { 70 | DllUnregisterServer(); 71 | } 72 | } 73 | else 74 | { 75 | hr = DllUnregisterServer(); 76 | } 77 | 78 | return hr; 79 | } -------------------------------------------------------------------------------- /cmake/FindIDL.cmake: -------------------------------------------------------------------------------- 1 | # Redistribution and use is allowed under the OSI-approved 3-clause BSD license. 2 | # Copyright (c) 2018 Apriorit Inc. All rights reserved. 3 | 4 | set(IDL_FOUND TRUE) 5 | 6 | function(add_idl _target _idlfile) 7 | get_filename_component(IDL_FILE_NAME_WE ${_idlfile} NAME_WE) 8 | set(MIDL_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/Generated) 9 | set(MIDL_OUTPUT ${MIDL_OUTPUT_PATH}/${IDL_FILE_NAME_WE}_i.h) 10 | 11 | if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) 12 | set(MIDL_ARCH win32) 13 | else() 14 | set(MIDL_ARCH x64) 15 | endif() 16 | 17 | add_custom_command( 18 | OUTPUT ${MIDL_OUTPUT} 19 | COMMAND midl.exe ARGS /${MIDL_ARCH} /env ${MIDL_ARCH} /nologo ${CMAKE_CURRENT_LIST_DIR}/${_idlfile} /out ${MIDL_OUTPUT_PATH} ${MIDL_FLAGS} /h ${MIDL_OUTPUT} 20 | DEPENDS ${CMAKE_CURRENT_LIST_DIR}/${_idlfile} 21 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 22 | VERBATIM 23 | ) 24 | 25 | set(FINDIDL_TARGET ${_target}_gen) 26 | 27 | cmake_parse_arguments(FINDIDL "" "TLBIMP" "" ${ARGN}) 28 | 29 | if(FINDIDL_TLBIMP) 30 | file(GLOB TLBIMPv7_FILES "C:/Program Files*/Microsoft SDKs/Windows/v7*/bin/TlbImp.exe") 31 | file(GLOB TLBIMPv8_FILES "C:/Program Files*/Microsoft SDKs/Windows/v8*/bin/*/TlbImp.exe") 32 | file(GLOB TLBIMPv10_FILES "C:/Program Files*/Microsoft SDKs/Windows/v10*/bin/*/TlbImp.exe") 33 | 34 | list(APPEND TLBIMP_FILES ${TLBIMPv7_FILES} ${TLBIMPv8_FILES} ${TLBIMPv10_FILES}) 35 | 36 | if(TLBIMP_FILES) 37 | list(GET TLBIMP_FILES -1 TLBIMP_FILE) 38 | endif() 39 | 40 | if (NOT TLBIMP_FILE) 41 | message(FATAL_ERROR "Cannot found tlbimp.exe. Try to download .NET Framework SDK and .NET Framework targeting pack.") 42 | return() 43 | endif() 44 | 45 | message(STATUS "Found tlbimp.exe: " ${TLBIMP_FILE}) 46 | 47 | set(TLBIMP_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) 48 | 49 | if("${TLBIMP_OUTPUT_PATH}" STREQUAL "") 50 | set(TLBIMP_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) 51 | endif() 52 | 53 | set(TLBIMP_OUTPUT ${TLBIMP_OUTPUT_PATH}/${FINDIDL_TLBIMP}.dll) 54 | 55 | add_custom_command( 56 | OUTPUT ${TLBIMP_OUTPUT} 57 | COMMAND ${TLBIMP_FILE} "${MIDL_OUTPUT_PATH}/${IDL_FILE_NAME_WE}.tlb" "/out:${TLBIMP_OUTPUT}" ${TLBIMP_FLAGS} 58 | DEPENDS ${MIDL_OUTPUT_PATH}/${IDL_FILE_NAME_WE}.tlb 59 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 60 | VERBATIM 61 | ) 62 | 63 | add_custom_target(${FINDIDL_TARGET} DEPENDS ${MIDL_OUTPUT} ${TLBIMP_OUTPUT} SOURCES ${_idlfile}) 64 | 65 | add_library(${FINDIDL_TLBIMP} SHARED IMPORTED GLOBAL) 66 | add_dependencies(${FINDIDL_TLBIMP} ${FINDIDL_TARGET}) 67 | 68 | set_target_properties(${FINDIDL_TLBIMP} 69 | PROPERTIES 70 | IMPORTED_LOCATION "${TLBIMP_OUTPUT}" 71 | IMPORTED_COMMON_LANGUAGE_RUNTIME "CSharp" 72 | ) 73 | else() 74 | add_custom_target(${FINDIDL_TARGET} DEPENDS ${MIDL_OUTPUT} SOURCES ${_idlfile}) 75 | endif() 76 | 77 | add_library(${_target} INTERFACE) 78 | add_dependencies(${_target} ${FINDIDL_TARGET}) 79 | target_include_directories(${_target} INTERFACE ${MIDL_OUTPUT_PATH}) 80 | endfunction() 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FindIDL [![Build status](https://ci.appveyor.com/api/projects/status/github/apriorit/FindIDL?svg=true)](https://ci.appveyor.com/project/apriorit/findidl) 2 | CMake module for building IDL files with MIDL and generating CLR DLL using Tlbimp. 3 | 4 | * [Introduction](#introduction) 5 | * [Requirements](#requirements) 6 | * [Usage](#usage) 7 | * [find_package()](#find_package) 8 | * [add_idl()](#add_idl) 9 | * [add_idl() with tlbimp](#add_idl-with-tlbimp) 10 | * [MIDL flags](#midl-flags) 11 | * [TLBIMP flags](#tlbimp-flags) 12 | * [Samples](#samples) 13 | * [License](#license) 14 | * [Version History](#version-history) 15 | 16 | # Introduction 17 | IDL is used for creating COM servers. Unfortunately CMake has a limited support for IDL, so this module comes to rescue. The Type Library Importer (Tlbimp) converts the type definitions found within a COM type library (TLB) into equivalent definitions in a common language runtime assembly. The output of Tlbimp.exe is a binary file (an assembly) that contains runtime metadata for the types defined within the original type library. 18 | 19 | ## Requirements 20 | - [CMake 3.0](https://cmake.org/download/) or higher 21 | - MIDL compiler 22 | - Tlbimp.exe (optional) 23 | 24 | # Usage 25 | ## find_package() 26 | Add [FindIDL](https://github.com/apriorit/FindIDL) to the module search path and call `find_package`: 27 | ```cmake 28 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake") 29 | find_package(IDL REQUIRED) 30 | ``` 31 | [FindIDL](https://github.com/apriorit/FindIDL) will search for midl.exe and tlbimp.exe 32 | 33 | ## add_idl() 34 | Takes two arguments: the name of the target project and idl file. 35 | ```cmake 36 | add_idl( source) 37 | ``` 38 | Where: 39 | - `` - name of the target project 40 | - `source` - full path to idl file 41 | 42 | Example: 43 | ```cmake 44 | add_idl(GreeterIDL Greeter.idl) 45 | ``` 46 | 47 | The function does the same work as MIDL, specifically generates files: 48 | - Greeter_i.h 49 | - Greeter_i.c 50 | - Greeter_p.c 51 | - Greeter.tlb 52 | 53 | To use the generated files the idl project should be linked as following 54 | ```cmake 55 | target_link_libraries(Main GreeterIDL) 56 | ``` 57 | 58 | ## add_idl() with tlbimp 59 | Takes four arguments: the name of the target project, idl file, TLBIMP flag and the name of the tlbimp target. 60 | ```cmake 61 | add_idl( source TLBIMP ) 62 | ``` 63 | Where: 64 | - `` - name of the target project 65 | - `source` - full path to idl file 66 | - `TLBIMP` - flag to indicate to run tlbimp 67 | - `` - name of the tlbimp target 68 | 69 | Example: 70 | ```cmake 71 | add_idl(GreeterIDLWithTLBIMP Greeter.idl TLBIMP GreeterInterop) 72 | ``` 73 | 74 | The function does the same work as MIDL and tlbimp.exe, specifically generates files: 75 | - Greeter_i.h 76 | - Greeter_i.c 77 | - Greeter_p.c 78 | - Greeter.tlb 79 | - GreeterInterop.dll 80 | 81 | To use the generated files the idl project should be linked as following 82 | ```cmake 83 | target_link_libraries(MainCpp GreeterIDL) 84 | ``` 85 | Or if you want to use the file generated by tlbimp: 86 | ```cmake 87 | target_link_libraries(MainCsharp GreeterInterop) 88 | ``` 89 | 90 | ## MIDL flags 91 | To specify additional command-line options for midl set `MIDL_FLAGS` variabe. 92 | ```cmake 93 | set(MIDL_FLAGS /target NT60) # avoid MIDL2455 error 94 | ``` 95 | 96 | ## TLBIMP flags 97 | To specify additional command-line options for tlbimp set `TLBIMP_FLAGS` variabe. 98 | ```cmake 99 | set(TLBIMP_FLAGS /silence:3002) # importing a type library into a platform agnostic assembly 100 | ``` 101 | 102 | # Samples 103 | Take a look at the [samples](samples/) folder to see how to use [FindIDL](https://github.com/apriorit/FindIDL). 104 | 105 | # License 106 | [Apriorit](http://www.apriorit.com/) released [FindIDL](https://github.com/apriorit/FindIDL) under the OSI-approved 3-clause BSD license. You can freely use it in your commercial or opensource software. 107 | 108 | # Version History 109 | 110 | ## Version 1.0.2 (15 Aug 2019) 111 | - New: Add `TLBIMP_FLAGS` 112 | 113 | ## Version 1.0.1 (08 Aug 2019) 114 | - New: Add tlbimp 115 | 116 | ## Version 1.0.0 (26 Oct 2018) 117 | - Initial public release 118 | --------------------------------------------------------------------------------