Page 1 of 1

CL_INSTALL_PLUGIN macro problem when making plugin

Posted: Sun Nov 24, 2019 1:25 am
by Androiders
Hello!

I am trying to develop a plugin for codelite but i got stuck on running cmake.
I get the error:
Make Error at CMakeLists.txt:60 (CL_INSTALL_PLUGIN):
Unknown CMake command "CL_INSTALL_PLUGIN".

I created the plugin skeleton from the new plugin wizard and the plugin project is in my workspace.
I use Codelite 13

Edit:
I think i need to add some clarifications. I am using linux (codelite installed from ine of the official PPAs) and the workspace is not the same as the Codelite source dir itself if that matters.

Trying to build the plugin code generated from the wizard by building from within codelite results in error "plugin.h" not found.


Br
--Anders

Re: CL_INSTALL_PLUGIN macro problem when making plugin

Posted: Sun Nov 24, 2019 8:55 pm
by eranif
Did you checkout CodeLite sources?
Usually its best to build plugins with the latest CodeLite sources.
This command is part of the source tree and it defines how CodeLite installs the plugin when running `make install` or when creating deb file

Re: CL_INSTALL_PLUGIN macro problem when making plugin

Posted: Mon Nov 25, 2019 12:12 am
by Androiders
Thanks for the reply.

Yes i did check out the source.

I did more research though and finally got the plugin-skeleton to compile in CodeLIte.

Here is what i did:
* First i noticed that the Codelite root dir that i entered in the plugins wizard got an extra "CodeLite" appended to it. After i removed that extra level from the include directories compiler option it found all include files.
..but the it didnt link correctly...

* The libray path to the linker was also wrong. I needed to change this as well. After i followed the "build codelite from source" instructions i had the libraries somewhere in the source tree. Not at the locations the plugin was configured with.

*One of the libraries it tries to link against was libplugin_sdk. There was no such lib but I linked agains libplugin instead... don't know if this is intended...
*The plugin was also missing the -fPIC compiler option.

*The post-build step of copying file also failed.... i removed this step.
*These steps allowed me to compile and link an empty plugin. I have not tested if it works yet :)

*Side note: I am building this plugin on linux but the build configurations are named Win_x64_Debug/release and the generated file is named as .DLL

But this is all without the cmakefile issue from my OP.