[CMake] Loading Plugins

2014-10-31 Thread Aaron Boxer
Hello! I have a C CMake project, and I would like to add the following feature: 1) define an interface for a second dynamic library 2) look in a specified folder at runtime, and try to load this library 3) if loading fails, then get notified of this fact, so that I can use statically linked

Re: [CMake] Loading Plugins

2014-10-31 Thread Bradley Lowekamp
Hello, Yes, this can be done with ITK's object factory mechanism. I would study how it's done with ITK's ImageIO plugin mechanism[1], then figure out how to adapt the same framework for your interface. Brad [1] http://www.itk.org/Wiki/Plugin_IO_mechanisms On Oct 31, 2014, at 2:20 PM,

Re: [CMake] Loading Plugins

2014-10-31 Thread J Decker
really nothing at all to do with cmake; a couple macros and you can support cross-platform... a few less and you can init interfaces pretty easily at the end of init or during early discovery of functions, if they fail you can fillthe interface with static methods or return a different

Re: [CMake] Loading Plugins

2014-10-31 Thread Aaron Boxer
On Fri, Oct 31, 2014 at 5:48 PM, J Decker d3c...@gmail.com wrote: really nothing at all to do with cmake; a couple macros and you can support cross-platform... a few less and you can init interfaces pretty easily at the end of init or during early discovery of functions, if they fail