Hi Alan

Thank you for your effort in debuging this.
I send some results here attached , and I'll keep trying other options later.
by the way, wxWidgets is also not detected.

I wonder, could this be a Windows only issue? Because you are trying on Linux, correct?

Tradionally I set the location of Qt with the environment
QTDIR=<path>
but I did some search on the detection of Qt by cmake on the official docs


http://doc.qt.io/qt-5/cmake-manual.html

and they say

"The easiest way to use CMake is to set the CMAKE_PREFIX_PATH environment variable to the install prefix of Qt 5."

so I tried that instead

also here

https://www.kdab.com/using-cmake-with-qt-5/

they specificaly say to *not* use the form

find_package(Qt5

but that is a resource from 2012, not sure if that is valid

I did

on Windows
git clone of plplot
using Visual Studio 2014
Qt 5.5.1 static build compiled by me
cmake 3.6.2
wxWidgets 3.1.0


cmake ".." -G "Visual Studio 14" -DPL_DOUBLE:BOOL=ON -DBUILD_TEST:BOOL=ON -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_BUILD_TYPE:STRING="Debug" -DBUILD_SHARED_LIBS:BOOL=OFF -DSTATIC_RUNTIME:BOOL=ON -DPLD_wxwidgets:BOOL=ON -DwxWidgets_ROOT_DIR:PATH=%WXWIN% -DwxWidgets_LIB_DIR:PATH=%WXWIN%\lib\vc_lib -DwxWidgets_CONFIGURATION=mswud -DENABLE_MIX_CXX=ON -DwxWidgets_EXCLUDE_COMMON_LIBRARIES:BOOL=OFF -DCMAKE_PREFIX_PATH:PATH=I:\qt-win32-msvc2015 -DPLPLOT_USE_QT5:BOOL=ON


I have some errors

first, the Qt location is detected

-- Qt5_library_fullpath_list = I:/qt-win32-msvc2015/lib/Qt5Cored.lib;I:/qt-win32-msvc2015/lib/Qt5Guid.lib;I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib;I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib;I:/qt-win32-msvc2015/lib/Qt5Svgd.lib -- Qt5_library_LINK_FLAGS = I:/qt-win32-msvc2015/lib/Qt5Cored.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib



but then the errors are


CMake Error at src/CMakeLists.txt:322 (target_link_libraries):
 The plain signature for target_link_libraries has already been used with
 the target "plplot".  All uses of target_link_libraries with a target must
 be either all-keyword or all-plain.

 The uses of the plain signature are here:

* I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries)



libplplot_LINK_FLAGS = C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/Gdi32.Lib;C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x86/ComDlg32.Lib;-lcsirocsa;-lqsastime;I:/qt-win32-msvc2015/lib/Qt5Cored.lib I:/qt-win32-msvc2015/lib/Qt5Guid.lib I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib
-- WARNING: Perl modules XML::Parser and/or XML::DOM not available
  so cannot check that swig_documentation.i is up to date.
CMake Error at bindings/qt_gui/CMakeLists.txt:57 (target_link_libraries):
 The plain signature for target_link_libraries has already been used with
 the target "plplotqt".  All uses of target_link_libraries with a target
 must be either all-keyword or all-plain.

 The uses of the plain signature are here:

* I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 (target_link_libraries)



-Pedro

----- Original Message ----- From: "Alan W. Irwin" <ir...@beluga.phys.uvic.ca> To: "Hazen Babcock" <hbabc...@mac.com>; "Pedro Vicente" <pedro.vice...@space-research.org>
Cc: "PLplot development list" <Plplot-devel@lists.sourceforge.net>
Sent: Saturday, October 15, 2016 6:50 PM
Subject: Re: [Plplot-devel] cmake error Qt build


On 2016-10-15 10:26-0700 Alan W. Irwin wrote:

Next Qt5 steps are for me to bump the minimum Qt5 version we support
to 5.3.2 (which _might_ solve Pedros problem with the Qt5 version he
is using), try out pyqt5, and completely change the method used to
configure Qt5 to the most modern variant possible.  I suspect all
target_link_libraries plain/keyword mixed signature issues will
disappear with that change, and if so and also assuming pyqt5 works,
then I _finally_ plan to remove the "experimental" description from
the PLPLOT_USE_QT5 option, and turn on that option by default, which
has been my goal for a very long time.

Actually, I bumped to 5.3.1 for the reason given in the commit message
for 536f94b.  I also added some test infrastructure for pyqt5 with
good build and run-time results (commit 10fe84b).  So I have now
cleared out the easy Qt5 topics, and the only topic left for me on the
Qt5 agenda is the fairly difficult one of converting to the latest Qt5
support method.

So those interested in Qt5 should stay tuned....

Same goes...

@Pedro: could you try the latest git version of PLplot with your
plain/keyword target_link_libraries fixes only?  I am interested to
know whether the bump of the minimum acceptable Qt5 version from 5.2.0
to 5.3.1 solves your version consistency issue with a much later
version of Qt5, and that requested test should answer that question.
By the way, I also tried locally decrementing the minimum version to
5.0.0 as an experiment, but that detected 5.3.2 (my system version of
Qt5) with no issues.  So I still don't understand why you were having
that version inconsistency issue when the minimum acceptable Qt5
version number was set to 5.2.0, but maybe setting it to 5.3.1 as in
the latest git master branch will solve that.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

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
__________________________

-- The C compiler identification is MSVC 19.0.24213.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMake version = 3.6.2
-- CMAKE_SYSTEM_NAME = Windows
-- SH_EXECUTABLE = SH_EXECUTABLE-NOTFOUND
-- WARNING: bash shell not found, ctest will not work properly
-- Checking whether system has ANSI C header files
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Performing Test memchrExists
-- Performing Test memchrExists - Success
-- Performing Test freeExists
-- Performing Test freeExists - Success
-- Check for whether ctype.h macros work on characters with the
  high bit set.
-- High-bit characters - work
-- ANSI C header files - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for include file termios.h
-- Looking for include file termios.h - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for crt_externs.h
-- Looking for crt_externs.h - not found
-- Performing Test HAVE_SYS_WAIT_H
-- Performing Test HAVE_SYS_WAIT_H - Failed
-- Looking for DIR symbol in sys/types.h;dirent.h
-- Looking for DIR symbol in sys/types.h;dirent.h - not found.
-- Looking for DIR symbol in sys/types.h;sys/ndir.h
-- Looking for DIR symbol in sys/types.h;sys/ndir.h - not found.
-- Looking for DIR symbol in sys/types.h;sys/dir.h
-- Looking for DIR symbol in sys/types.h;sys/dir.h - not found.
-- Looking for DIR symbol in sys/types.h;ndir.h
-- Looking for DIR symbol in sys/types.h;ndir.h - not found.
-- Check for signal return type in <signal.h>
-- Check for signal handler return type type void  - found
-- Looking for popen
-- Looking for popen - not found
-- Looking for usleep
-- Looking for usleep - not found
-- Looking for nanosleep
-- Looking for nanosleep - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - not found
-- Looking for mkfifo
-- Looking for mkfifo - not found
-- Looking for unlink
-- Looking for unlink - found
-- Looking for _NSGetArgc
-- Looking for _NSGetArgc - not found
-- Looking for isfinite
-- Looking for isfinite - found
-- Looking for finite
-- Looking for finite - not found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for snprintf
-- Looking for snprintf - found
-- SWIG was not found. Please specify Swig executable location
-- Could NOT find Perl (missing: PERL_EXECUTABLE) -- CMAKE_GENERATOR = Visual Studio 14 2015
-- The CXX compiler identification is MSVC 19.0.24213.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: M:/plplot-plplot/build/language_tests/CXX
-- The CXX compiler identification is MSVC 19.0.24213.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for using namespace support
-- Check for using namespace - found
-- Looking for C++ include cmath
-- Looking for C++ include cmath - found
-- Check for using stdint.h with CXX compiler
-- Check for using stdint.h with CXX compiler - ok
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Looking for pkg-config - not found
-- WARNING: Makefile+pkg-config version of examples build in the install tree 
will not work.
-- X11_FOUND = -- X11_INCLUDE_DIR = -- X11_COMPILE_FLAGS = -- X11_LIBRARIES = -- CMAKE_GENERATOR = Visual Studio 14 2015
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:18 (enable_language):
 No CMAKE_Fortran_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also 
"M:/plplot-plplot/build/language_tests/Fortran/CMakeFiles/CMakeOutput.log".
See also 
"M:/plplot-plplot/build/language_tests/Fortran/CMakeFiles/CMakeError.log".
-- WARNING: no working Fortran compiler so disabling f95 binding and examples.
-- WARNING: Java requires shared libraries. Disabling java binding
-- WARNING: Python binding fixup requires sed which was not found. Disabling 
Python binding
-- WARNING: swig not found. Disabling Octave binding
-- Start determining consistent system data for Tcl and friends
-- Could NOT find Tclsh (missing: TCL_TCLSH) -- Could NOT find TCL (missing: TCL_LIBRARY TCL_INCLUDE_PATH) -- Could NOT find TCLTK (missing: TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH) -- Could NOT find TK (missing: TK_LIBRARY TK_INCLUDE_PATH) -- Looking for Tcl - not found
-- WARNING: setting ENABLE_tcl to OFF
-- WARNING: ENABLE_tcl is OFF so disabling everything else that is Tcl/Tk 
related
-- CMAKE_GENERATOR = Visual Studio 14 2015
CMake Error at CMakeLists.txt:18 (enable_language):
 No CMAKE_Ada_COMPILER could be found.



-- CMAKE_Ada_COMPILER_ID = GNU
-- Configuring incomplete, errors occurred!
See also "M:/plplot-plplot/build/language_tests/Ada/CMakeFiles/CMakeOutput.log".
-- WARNING: no working Ada compiler so disabling Ada binding and examples.
-- WARNING: Lua requires shared libraries. Disabling Lua binding
-- WARNING: SHAPELIB not found.  Setting HAVE_SHAPELIB to OFF.
-- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Check for NaN awareness in C compiler
-- Check for NaN awareness in C compiler - found
-- Neither qhull/qhull_a.h header nor libqhull/qhull_a.h could be found
-- qhull library could not be found
-- Could NOT find QHULL (missing: QHULL_INCLUDE_DIRS QHULL_LIBRARIES QHULL_LIBRARY_DIRS) -- QHULL_INCLUDE_DIRS = -- QHULL_LIBRARIES = -- WARNING: at least one of QHULL_INCLUDE_DIRS or QHULL_LIBRARIES is false so setting PL_HAVE_QHULL to OFF.
-- WARNING: pango not found because pkg-config not available.
-- WARNING: Shared libraries not built. Setting ENABLE_DYNDRIVERS OFF.
-- WARNING: pkg-config not found. Setting cairo drivers to OFF.
-- WARNING: ENABLE_tk OFF.  Therefore turning off tk, tkwin, and ntk devices
-- WARNING: pkg-config not found. Setting PLD_psttf to OFF.
-- Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not 
support PostScript
-- Qt5_library_fullpath_list = 
I:/qt-win32-msvc2015/lib/Qt5Cored.lib;I:/qt-win32-msvc2015/lib/Qt5Guid.lib;I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib;I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib;I:/qt-win32-msvc2015/lib/Qt5Svgd.lib
-- Qt5_library_LINK_FLAGS = I:/qt-win32-msvc2015/lib/Qt5Cored.lib 
I:/qt-win32-msvc2015/lib/Qt5Guid.lib 
I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib 
I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib
-- WARNING: PLPLOT_USE_QT5 is ON so setting ENABLE_pyqt4 to OFF.
-- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt5 to OFF.
-- Looking for gdi32 header and library
-- Looking for gdi32 header and library - found
-- wxWidgets_FOUND           : FALSE
-- wxWidgets_INCLUDE_DIRS : -- wxWidgets_LIBRARY_DIRS : -- wxWidgets_LIBRARIES : -- wxWidgets_CXX_FLAGS : -- wxWidgets_USE_FILE : UsewxWidgets
-- WARNING: wxWidgets or its libraries not found so setting all wxwidgets 
devices to OFF.
-- WARNING: PLD_wxwidgets is OFF so setting ENABLE_wxwidgets to OFF.
-- WARNING: ENABLE_wxwidgets is OFF so setting all wxwidgets devices to OFF.
-- Looking for haru pdf header and library
-- Looking for haru pdf header and library - not found
-- WARNING: Setting PLD_pdf to OFF.
-- WARNING: Static build with ENABLE_ocaml_static false.  Therefore, disabling 
OCaml binding
-- WARNING: ENABLE_ocaml is OFF so disabling Plcairo module and lablgtk2 support
-- WARNING: validate target will not be available to check for syntax issues in 
the PLplot DocBook documentation because onsgmls (or env) was not found.
CMake Error at src/CMakeLists.txt:322 (target_link_libraries):
 The plain signature for target_link_libraries has already been used with
 the target "plplot".  All uses of target_link_libraries with a target must
 be either all-keyword or all-plain.

 The uses of the plain signature are here:

  * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 
(target_link_libraries)



libplplot_LINK_FLAGS = C:/Program Files (x86)/Windows 
Kits/8.1/Lib/winv6.3/um/x86/Gdi32.Lib;C:/Program Files (x86)/Windows 
Kits/8.1/Lib/winv6.3/um/x86/ComDlg32.Lib;-lcsirocsa;-lqsastime;I:/qt-win32-msvc2015/lib/Qt5Cored.lib
 I:/qt-win32-msvc2015/lib/Qt5Guid.lib 
I:/qt-win32-msvc2015/lib/Qt5PrintSupportd.lib 
I:/qt-win32-msvc2015/lib/Qt5Widgetsd.lib I:/qt-win32-msvc2015/lib/Qt5Svgd.lib
-- WARNING: Perl modules XML::Parser and/or XML::DOM not available
  so cannot check that swig_documentation.i is up to date.
CMake Error at bindings/qt_gui/CMakeLists.txt:57 (target_link_libraries):
 The plain signature for target_link_libraries has already been used with
 the target "plplotqt".  All uses of target_link_libraries with a target
 must be either all-keyword or all-plain.

 The uses of the plain signature are here:

  * I:/qt-win32-msvc2015/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:330 
(target_link_libraries)



-- WARNING: pkg-config not found so extXdrawable_demo, and ext-cairo-test not 
built.
-- WARNING: The test_c_qtwidget target can be run independently
  but is not reliable (see <https://sourceforge.net/p/plplot/bugs/158/>) when
  PLPLOT_USE_QT5 is set to ON.  So until this issue can be straightened out
  temporarily exclude this target from being a dependency of other more general 
interactive
  test targets
-- WARNING: The test_qt_example target can be run independently
  but is not reliable (see <https://sourceforge.net/p/plplot/bugs/158/>) when
  PLPLOT_USE_QT5 is set to ON.  So until this issue can be straightened out
  temporarily exclude this target from being a dependency of other more general 
interactive
  test targets

Summary of CMake build system results for PLplot

Install location variables which can be set by the user:
CMAKE_INSTALL_PREFIX:      C:/Program Files (x86)/plplot
CMAKE_INSTALL_EXEC_PREFIX  C:/Program Files (x86)/plplot
CMAKE_INSTALL_BINDIR       C:/Program Files (x86)/plplot/bin
CMAKE_INSTALL_DATADIR      C:/Program Files (x86)/plplot/share
CMAKE_INSTALL_LIBDIR       C:/Program Files (x86)/plplot/lib
CMAKE_INSTALL_INCLUDEDIR   C:/Program Files (x86)/plplot/include
CMAKE_INSTALL_INFODIR      C:/Program Files (x86)/plplot/share/info
CMAKE_INSTALL_MANDIR       C:/Program Files (x86)/plplot/share/man

Derived install location variables:
DATA_DIR        C:/Program Files (x86)/plplot/share/plplot5.11.1
LIB_DIR         C:/Program Files (x86)/plplot/lib
INCLUDE_DIR     C:/Program Files (x86)/plplot/include/plplot
BIN_DIR         C:/Program Files (x86)/plplot/bin
TCL_DIR         C:/Program Files (x86)/plplot/share/plplot5.11.1/tcl
ADA_INCLUDE_DIR C:/Program Files (x86)/plplot/share/ada/adainclude/plplotada
ADA_LIB_DIR     C:/Program Files (x86)/plplot/lib/ada/adalib/plplotada
PYTHON_INSTDIR  
DRV_DIR         C:/Program Files (x86)/plplot/lib/plplot5.11.1/drivers
DOC_DIR         C:/Program Files (x86)/plplot/share/doc/plplot
MAN_DIR         C:/Program Files (x86)/plplot/share/man
INFO_DIR        C:/Program Files (x86)/plplot/share/info

Other important CMake variables:

CMAKE_SYSTEM_NAME:      Windows
UNIX:                   
WIN32:                  1
APPLE:                  
MSVC:                   1       (MSVC_VERSION:  1900)
MINGW:                  
MSYS:                   
CYGWIN:                 
BORLAND:                
WATCOM:
SWIG_FOUND:             FALSE
PERL_FOUND:             FALSE
X11_FOUND:              

CMAKE_BUILD_TYPE:       Debug
CMAKE_C_COMPILER CMAKE_C_FLAGS:                 C:/Program Files 
(x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe  /DWIN32 /D_WINDOWS /W3
CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS:             C:/Program Files 
(x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe  /DWIN32 /D_WINDOWS /W3 /GR 
/EHsc

ENABLE_DYNDRIVERS:      OFF
DRIVERS_LIST: qt;mem;null;ps;svg;wingcc;xfig
DEVICES_LIST: 
pdfqt;qtwidget;bmpqt;jpgqt;pngqt;ppmqt;tiffqt;extqt;memqt;svgqt;mem;null;ps;svg;wingcc;xfig

Library options:
BUILD_SHARED_LIBS:      OFF             PL_DOUBLE:      ON

Optional libraries:
PL_HAVE_QHULL:          OFF             WITH_CSA:       ON
PL_HAVE_FREETYPE:                       PL_HAVE_PTHREAD:        
HAVE_AGG:                               HAVE_SHAPELIB:  OFF

Language Bindings:
ENABLE_ada:             OFF
ENABLE_cxx:             ON
ENABLE_d:               OFF
ENABLE_f95:             OFF
ENABLE_java:            OFF
ENABLE_lua:             OFF
ENABLE_ocaml:           OFF
ENABLE_octave:          OFF
ENABLE_pdl:             OFF
ENABLE_python:          OFF
ENABLE_qt:              ON
ENABLE_pyqt4:           OFF
ENABLE_pyqt5:           OFF
ENABLE_tcl:             OFF
ENABLE_itcl:            OFF
ENABLE_tk:              OFF
ENABLE_itk:             OFF
ENABLE_wxwidgets:       OFF

-- Configuring incomplete, errors occurred!
See also "M:/plplot-plplot/build/CMakeFiles/CMakeOutput.log".
See also "M:/plplot-plplot/build/CMakeFiles/CMakeError.log".
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to