{"id":20834531,"url":"https://github.com/apriorit/findidl","last_synced_at":"2025-03-12T08:46:47.770Z","repository":{"id":45311064,"uuid":"144862518","full_name":"apriorit/FindIDL","owner":"apriorit","description":"CMake module for building IDL files with MIDL and generating CLR DLL using Tlbimp","archived":false,"fork":false,"pushed_at":"2024-10-02T16:16:35.000Z","size":33,"stargazers_count":27,"open_issues_count":3,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-18T21:31:51.437Z","etag":null,"topics":["cmake","cmake-module","com-interop","com-object","idl","tlb","tlbimp"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apriorit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-15T14:20:10.000Z","updated_at":"2024-10-30T21:42:43.000Z","dependencies_parsed_at":"2025-01-18T21:39:23.961Z","dependency_job_id":null,"html_url":"https://github.com/apriorit/FindIDL","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apriorit%2FFindIDL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apriorit%2FFindIDL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apriorit%2FFindIDL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apriorit%2FFindIDL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apriorit","download_url":"https://codeload.github.com/apriorit/FindIDL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243188199,"owners_count":20250453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cmake-module","com-interop","com-object","idl","tlb","tlbimp"],"created_at":"2024-11-18T00:19:34.593Z","updated_at":"2025-03-12T08:46:47.751Z","avatar_url":"https://github.com/apriorit.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FindIDL [![Build status](https://ci.appveyor.com/api/projects/status/github/apriorit/FindIDL?svg=true)](https://ci.appveyor.com/project/apriorit/findidl)\nCMake module for building IDL files with MIDL and generating CLR DLL using Tlbimp.\n\n* [Introduction](#introduction)\n  * [Requirements](#requirements)\n* [Usage](#usage)\n  * [find_package()](#find_package)\n  * [add_idl()](#add_idl)\n  * [add_idl() with tlbimp](#add_idl-with-tlbimp)\n  * [MIDL flags](#midl-flags)\n  * [TLBIMP flags](#tlbimp-flags)\n* [Samples](#samples) \n* [License](#license) \n* [Version History](#version-history)\n\n# Introduction\nIDL 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.\n\n## Requirements\n- [CMake 3.0](https://cmake.org/download/) or higher\n- MIDL compiler\n- Tlbimp.exe (optional)\n\n# Usage\n## find_package()\nAdd [FindIDL](https://github.com/apriorit/FindIDL) to the module search path and call `find_package`:\n```cmake\nlist(APPEND CMAKE_MODULE_PATH \"${CMAKE_CURRENT_LIST_DIR}/../cmake\")\nfind_package(IDL REQUIRED)\n```\n[FindIDL](https://github.com/apriorit/FindIDL) will search for midl.exe and tlbimp.exe\n\n## add_idl()\nTakes two arguments: the name of the target project and idl file.\n```cmake\nadd_idl(\u003cname\u003e source)\n```\nWhere:\n- `\u003cname\u003e` - name of the target project\n- `source` - full path to idl file\n\nExample:\n```cmake\nadd_idl(GreeterIDL Greeter.idl)\n```\n\nThe function does the same work as MIDL, specifically generates files:\n- Greeter_i.h\n- Greeter_i.c\n- Greeter_p.c\n- Greeter.tlb\n\nTo use the generated files the idl project should be linked as following\n```cmake\ntarget_link_libraries(Main GreeterIDL)\n```\n\n## add_idl() with tlbimp\nTakes four arguments: the name of the target project, idl file, TLBIMP flag and the name of the tlbimp target. \n```cmake\nadd_idl(\u003cname\u003e source TLBIMP \u003ctlbimp name\u003e)\n```\nWhere:\n- `\u003cname\u003e` - name of the target project\n- `source` - full path to idl file\n- `TLBIMP` - flag to indicate to run tlbimp\n- `\u003ctlbimp name\u003e` - name of the tlbimp target\n\nExample:\n```cmake\nadd_idl(GreeterIDLWithTLBIMP Greeter.idl TLBIMP GreeterInterop)\n```\n\nThe function does the same work as MIDL and tlbimp.exe, specifically generates files:\n- Greeter_i.h\n- Greeter_i.c\n- Greeter_p.c\n- Greeter.tlb\n- GreeterInterop.dll\n\nTo use the generated files the idl project should be linked as following\n```cmake\ntarget_link_libraries(MainCpp GreeterIDL)\n```\nOr if you want to use the file generated by tlbimp:\n```cmake\ntarget_link_libraries(MainCsharp GreeterInterop)\n```\n\n## MIDL flags\nTo specify additional command-line options for midl set `MIDL_FLAGS` variabe.\n```cmake\nset(MIDL_FLAGS /target NT60) # avoid MIDL2455 error\n```\n\n## TLBIMP flags\nTo specify additional command-line options for tlbimp set `TLBIMP_FLAGS` variabe.\n```cmake\nset(TLBIMP_FLAGS /silence:3002) # importing a type library into a platform agnostic assembly\n```\n\n# Samples \nTake a look at the [samples](samples/) folder to see how to use [FindIDL](https://github.com/apriorit/FindIDL).\n\n# License\n[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.\n\n# Version History\n\n## Version 1.0.2 (15 Aug 2019)\n- New: Add `TLBIMP_FLAGS`\n\n## Version 1.0.1 (08 Aug 2019)\n- New: Add tlbimp\n\n## Version 1.0.0 (26 Oct 2018)\n- Initial public release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapriorit%2Ffindidl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapriorit%2Ffindidl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapriorit%2Ffindidl/lists"}