From: Alan W. I. <Ala...@gm...> - 2018-09-25 21:08:24
|
On 2018-09-25 22:05+0200 Laurent Berger wrote: > Hi, > > I want to use plplot in my own project using cmake and I miss something. my > cmakelists.txt is see below and it works. But in include_directories cmake > command I must write : > > include_directories(${plplot_DIR}/../../../include) and it is really weird. > what's variable name for include ? [...] > CMakeLists.txt > [...] > find_package(plplot) [...] > ADD_EXECUTABLE (${NomProjet} ${Projet_SRCS} ) [...] > if (plplot_FOUND) > > include_directories(${plplot_DIR}/../../../include) > target_link_libraries( ${NomProjet} PUBLIC PLPLOT::plplotwxwidgets) > else (plplot_FOUND) > message( " PROBLEME" ) > endif(plplot_FOUND) Hi Laurent: I have reviewed the redacted version above, and all seems well. For example, our installed examples are similarly built against the installed version of PLplot, and what you have implemented above follows that same method. For example, you can see "find_package(plplot)" (in the non-CORE_BUILD part of examples/CMakeLists.txt), and a combination of add_executable, include_directories (which refers to the installed location of PLplot for the non-CORE_BUILD case just like you apparently have implemented), and target_link_libraries in examples/c/CMakeLists.txt. However, you were right to question that include_directories command which is necessary now, but should not be necessary in future once I set up the export of PLplot to handle compile options properly. But that implementation is a little tricky so although it is on my ToDo list now, I am going to put it off until after the 5.14.0 release that is coming soon. Alan __________________________ Alan W. Irwin Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |