CL_INSTALL_PLUGIN macro problem when making plugin

CodeLite installation/troubleshooting forum
Androiders
CodeLite Curious
Posts: 3
Joined: Sun Nov 24, 2019 1:19 am
Genuine User: Yes
IDE Question: c++
Contact:

CL_INSTALL_PLUGIN macro problem when making plugin

Post by Androiders » Sun Nov 24, 2019 1:25 am

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

User avatar
eranif
CodeLite Plugin
Posts: 6081
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CL_INSTALL_PLUGIN macro problem when making plugin

Post by eranif » Sun Nov 24, 2019 8:55 pm

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
Make sure you have read the HOW TO POST thread

Androiders
CodeLite Curious
Posts: 3
Joined: Sun Nov 24, 2019 1:19 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: CL_INSTALL_PLUGIN macro problem when making plugin

Post by Androiders » Mon Nov 25, 2019 12:12 am

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.

Post Reply