Hi Alan,
I have finally successfully build gtk-fortran & PLplot>=5.13, as you can
see on this screenshot:
https://github.com/vmagnin/gtk-fortran/blob/gtk3/screenshots/hl_plplot8e_MSYS2_Windows7.png
But I used a workaround. Instead of using find_package(plplot), we use
pkg-config, which gives us everything we need to build the whole:
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLPLOT-FORTRAN REQUIRED plplot-fortran)
pkg_check_modules(PLPLOT REQUIRED plplot)
# Setup CMake to use PLplot, tell the compiler where to look for
headers
# and to the linker where to look for libraries:
include_directories(${PLPLOT-FORTRAN_INCLUDE_DIRS})
link_directories(${PLPLOT-FORTRAN_LIBRARY_DIRS})
# Add other flags to the compiler:
add_definitions(${PLPLOT-FORTRAN_CFLAGS_OTHER})
set(LIBRARIES ${LIBRARIES} ${PLPLOT_LIBRARIES})
include_directories(${PLPLOT_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES "${PLPLOT_LIBRARIES}")
set(CMAKE_REQUIRED_INCLUDES "${PLPLOT-FORTRAN_INCLUDE_DIRS}")
It was tested OK in:
* Kubuntu 18.10: gfortran 8.2.0, PLplot 5.13
* Fedora 29: gfortran 8.3.1, PLplot 5.13
* MSYS2 / Windows 7: gfortran 8.3.0, PLplot 5.14
* Ubuntu Sid with the PLplot 5.14 installed using CMake. The command
for building gtk-fortran was:
|PKG_CONFIG_PATH=/home/osboxes/myplplot/lib/pkgconfig cmake -D
CMAKE_BUILD_TYPE=debug -D CMAKE_PREFIX_PATH=/home/osboxes/myplplot ..|
Under FreeBSD 12.0, it does not work because PLplot is 5.12.0, and the
PLplot library have been renamed only in the 5.13 version.
I will still work on a purer CMake solution using find_package(plplot).
But at the moment, the pkg-config is very satisfying for the user since
it works on every tested platform.
Note also that two of our PLplot examples give harmless warnings:
|$ ./hl_plplot30e Plplot Fortran Warning: plscmap1la: inconsistent sizes
for intensity, coord1, coord2, coord3, alpha, and/or alt_hue_path ||$ ./hl_plplot4e Plplot Fortran Warning: pllegend: inconsistent sizes
for the following arrays: opt_array text_colors text ...|
Some of our arrays transmitted to PLplot functions seem to be declared
with an incorrect size.
Finally, thank you very much, Alan, for the help you gave me.
Best regards
Vincent
||
||
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general