Issues compiling

It’s been awhile since I build my first driver for a focuser that I built for my RedCat. I’d thought I would start from scratch again to get to know things again. I need to build a focuser for my SkyWatcher telescope. Installed and built as per the directions given in the “INDI Technical Documentation” except that instead of ~/Projects it was places under ~/myProjects. Just thought I would start with the simpleDriver example and move my up but I can’t even compile that. When I try and run it it gets to line 11 of my CMakeLists.txt which is “find_package(INDI REQUIRED)” and stops, reporting “failed to detect INDI version”. If I run indiserver from the command line I can see that version 2.1.6 is installed. I’m not sure if the fact I have KSTARS installed aswell is an issue. Director structure under ~/myProjects is as follows:
myProjects/
|— build
| |— indi-core
|— indi
| |— cmake_modules
| |— debian
| |— docker
| |— driverDevelopment
| | |— simpleDevice
| | | |— build
| | | |— cmake_modules
| | | |— header file and cpp file located here
| |— drivers
| |— examples
| |— indiserver
…

Not exactly a programmer but know just enough to cause damage. Can anybody help me on this one?

Thanks

Eyon

If you’re building for indi-core and have no external dependencies, then place your files directly under drivers/focuser/

Then just edit the CMakelists.txt there and add your driver. No need to create a separate directory for it.

Thanks Jasem,
I can do that but I’m thinking I would like to develop more drivers. I like to tinker and create my own devices. It would also help me to better understand C and C++ programming. Looking at the pre-amble of FindINDI.cmake you say that I can set INDI_ROOT variable to the root installation of INDI. Just don’t know where that is exactly located. Would that be indi-core? I’ve tried to set that as the root directory using -DINDI_ROOT but that didn’t work. Slowly making my way through the CMAKE tutorials so if that answers a few things then a reply can wait.
Thanks again,
Eyon

So turns out that FindINDI in indi-core was out of date. I just pushed an update to it, it is now synchronized to indi-3rdparty FIndINDI.cmake which is what 3rd party drivers use to locate INDI. Regarding driver development, there is a simple rule:

  1. If there are not external library dependencies (not already provided and/or required by INDI Core), then include your driver in indi-core
  2. Otherwise, create a separate 3rd party driver.

Thanks again.

I understand the simple rule. I was really looking to keep my playing and learning in a separate area/directory so it wouldn’t clutter anything else up until I get a really good understanding of things and then follow the rules so to speak.

Cheers,

Eyon