×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Steps to adding a custom driver to my git copy

  • Posts: 32
  • Thank you received: 0
Hi,
Steps to adding a custom driver to my git copy.
all in the title. I already have it compiled and tested, but I probably messed up with a bunch of files from the indi tree
to get things working...
So I'd like to make that cleanly from a brand new and unspoiled git tree.
The code comes in two parts, one for a (relatively small) dedicated library, and the code for the driver itself.
I'd like to add that to the tree so that the standard indi build procedure also takes care of my lib and driver.
Is there a guide describing the proper way to do that ?

Thank you in advance
best regards
7 years 1 month ago #14512

Please Log in or Create an account to join the conversation.

I'm not sure I exactly follow what you're trying to do here. You want to create a 3rd party driver and host it in your own git repo? and what do you mean INDI standard build procedure? CMake stuff?
7 years 1 month ago #14515

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 0
> I'm not sure I exactly follow what you're trying to do here.
> You want to create a 3rd party driver
yep. It already exists (I mean, not in the 3rparty drivers, somewhere in my home directory)
> and host it in your own git repo?
Not really (I never understood the philosophy of git... I'm too old, I'm afraid :) ) ;
what I want to achieve is to be able to build the driver inside the indi tree, to make
updates easier.
> and what do you mean INDI standard build procedure? CMake stuff?
yes.
Last edit: 7 years 1 month ago by François Meyer.
7 years 1 month ago #14517

Please Log in or Create an account to join the conversation.

I can't help you with the details of GIT. But to get started, clone INDI GIT repo, then make your modification to it. That's pretty much it.
7 years 1 month ago #14518

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 0
Ok. Lets get pragmatic, I have a libmcmt32 that comes with a few C files, a Makefile and some requirements :
and an indi_mcmt32 driver that comes with pretty much the same things.
In the 3rdparty directory, I create a libmcmt32 directory with the related code in it ; then I do the same
with indi-mcmt32 and the driver code. My question is, from here what do I need to modify/create so
that those two (lib and driver) are known and built by the cmake standard build procedure.
7 years 1 month ago #14527

Please Log in or Create an account to join the conversation.

Two ways to do this:

1. Include libmcm32 in your git tree.
2. Just build it outside and install it, and make your driver depend on it like any other system library.

For #1, include the library source code at 3rdparty and make a CMakelists.txt for it. You can still use Makefile stuff, but better use CMakelists.txt
For #2, just install it yourself outside of the tree.

For both options above, You then need to make a Findlibmcm.cmake file in cmake_modules directory to locate the library once it is installed in your system (include & library stuff). Then in your indi-mcm32, you call find_package(libmcm REQUIRED) and then link to it. Just look at how indi-qsi does it for example, this is very close to your own case. Hope this helps.
7 years 1 month ago #14544

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 0
> Hope this helps.
I bet it does :)
I had exactly #1 in mind. I will check that soon (and might well be back for some details).
Thanks again.
7 years 1 month ago #14630

Please Log in or Create an account to join the conversation.

Time to create page: 0.262 seconds