Building C++ Plugin


Recommended Posts

Ok so first before i get into this honestly kudos to unigine team on the documentation so far it's better than most i've seen.  But am a bit of a newb with cmake despite having tons of years of experience with C++.  And am stuck on something i assume is either an error or something that should've been put in the plugin creation documentation here:

Well while building the project there's at least a couple path variables i need to set.  One called Engine_INCLUDE_DIR and another called Engine_LIBRARY.  I've already set Engine_INCLUDE_DIR through cmake GUI and don't see an option to set the other as can be seen in this image.  Is this simple enough a fix i should just spend a week or so learning CMake from the ground up?  Or is there something missing in the docs?  Or is this perhaps a bug of some sort?  Thank you for taking the time to read and potentially helping me get through this ^-^  Am helping design a plugin that'll hopefully bring more people to the community and love the potential this engine has.image.thumb.png.3bae2862228f59f2b96e2be83f7c4369.png

Link to post

Hi paul,

don't give up, I have experienced that cmake seems to be a little bit frustrating to work on in Windows. I recognized in the past

that CMAKE doesn't always override your custom setup, even if ENVIRONMENT and PATH-variables are set. So what you can first try is to set the engines include-dir manually and see if the problem could be solved. If not, please post your CMAKEList.txt file here, so I and others may have a look.



Link to post
  • 2 weeks later...


You shouldn't set this variables manually, they are computed and presented by FindEngine.cmake (it is used by cmake's `find_package` function internally) module file - the module expects that your plugin project file layout is correct according to the documentation.

The error you get means that some engine's binary files are missing in `bin/lib` dirs.

You can read more about `find_package` here.


Link to post