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 ?

Another strange behavior: in debug and release lib generated by cmake installation are the same plplot.lib  and it should be something like plplot.lib and plplotd.lib. I can find export_plplot-debug.cmake and export_plplot-release.cmake so i think it could be possible to add a d in export_plplot-debug.cmake for all libs


CMakeLists.txt

cmake_minimum_required(VERSION 3.0)

set(NomProjet examplePlplot)
PROJECT (${NomProjet})
find_package(OpenCV  REQUIRED)
find_package(wxWidgets COMPONENTS core base net adv aui html  qa richtext stc ribbon xml gl REQUIRED)
find_package(plplot)

file(GLOB Projet_SRCS
    "*.h"
    "*.cpp")

ADD_EXECUTABLE (${NomProjet} ${Projet_SRCS} )

if (wxWidgets_FOUND)
    include_directories(${wxWidgets_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
    target_link_libraries (${NomProjet} LINK_PUBLIC ${OpenCV_LIBS} ${wxWidgets_LIBRARIES} )
endif (wxWidgets_FOUND)
if (plplot_FOUND)

    include_directories(${plplot_DIR}/../../../include)
    target_link_libraries( ${NomProjet} PUBLIC PLPLOT::plplotwxwidgets)
else (plplot_FOUND)
message( " PROBLEME" )
endif(plplot_FOUND)


SET(wxWidgets_DEFINITIONS WXUSINGDLL)
set_target_properties(${NomProjet} PROPERTIES  COMPILE_DEFINITIONS "${wxWidgets_DEFINITIONS};__WXMSW__;_CRT_SECURE_NO_WARNINGS") set_target_properties(${NomProjet} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE") set_target_properties(${NomProjet} PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:CONSOLE")




Le 23/09/2018 à 12:12, Laurent Berger a écrit :
Hi,

https://sourceforge.net/p/plplot/plplot/ci/4a5f94a70ac259d696dfaa8117cead7ad89b13f3/ : It works thanks!


New file is now

// Headers needed for Rand
#ifdef _WIN32
// This include must occur before any other include of stdlib.h due to
// the #define _CRT_RAND_S
#define _CRT_RAND_S
#include <stdlib.h>
#else
#include <fstream>
#endif

// wxwidgets headers
#include <wx/wx.h>
#include <wx/dir.h>
#include <wx/ustring.h>
// PLplot headers
#include "plDevs.h"
#include "wxwidgets.h" // includes wx/wx.h


// std and driver headers
#include <cmath>
#include <limits>


Le 23/09/2018 à 02:23, Alan W. Irwin a écrit :
On 2018-09-22 23:16+0100 Phil Rosenberg wrote:

Hi Laurent

I have implemented your first solution. If you could let me know that
things now work for you that would be great.

Hi Phil:

Although your question was addressed to Laurent, it should interest
you to know your fix causes no issues for Linux (i.e., building the
test_c_wxwidgets and test_wxPLplotDemo targets caused no obvious build
or run-time issues).

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
__________________________



_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel



_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to