You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ai...@us...> - 2014-03-16 00:27:03
|
Revision: 13063 http://sourceforge.net/p/plplot/code/13063 Author: airwin Date: 2014-03-16 00:26:59 +0000 (Sun, 16 Mar 2014) Log Message: ----------- Prepend README.release for 5.10.0 to this file to preserve the historical record. Modified Paths: -------------- trunk/OLD-README.release Modified: trunk/OLD-README.release =================================================================== --- trunk/OLD-README.release 2014-03-15 21:06:52 UTC (rev 13062) +++ trunk/OLD-README.release 2014-03-16 00:26:59 UTC (rev 13063) @@ -1,3 +1,337 @@ +PLplot Release 5.10.0 +~~~~~~~~~~~~~~~~~~~~ +This is a release of the PLplot plotting package. It represents the +ongoing best efforts of the PLplot community to improve this +package, and it is the only version of PLplot that we attempt +to support. Releases in the 5.x.y series should be available several +times per year. + +If you encounter a problem that is not already documented in the +PROBLEMS file or on our bug tracker, then please send bug reports to +PLplot developers via the mailing lists at +<http://sourceforge.net/p/plplot/mailman/> (preferred for initial +discussion of issues) and, if no quick resolution is possible, then the +issue should be placed on our +bug tracker at <http://sourceforge.net/p/plplot/bugs/>. + +Please see the license under which this software is distributed +(LGPL), and the disclaimer of all warranties, given in the COPYING.LIB +file. + +INDEX + +1. OFFICIAL NOTICES FOR USERS + +2. Changes relative to the previous release + +3. Tests made for the current release + +4. Tests made for the prior release + +1. OFFICIAL NOTICES FOR USERS + +The distinction we made prior to 5.10.0 between stable and development +releases was essentially completely artificial and has now been +dropped. In each case, the latest release was "stable" in the sense +that it was the PLplot team's best effort with substantial testing on +the computer platforms available to our test team. And that tradition +continues for the release of 5.10.0. Note we have bumped the minor +number in this release triplet compared to the previous 5.9.11 release +because from now on we want to reserve the patch number in that +triplet only for those (rare) releases that contain emergency fixes +compared to the previous release. Note especially that 5.10.0 is not +that different from the prior release 5.9.11, and we don't ordinarily +require such emergency releases so our forthcoming release numbers are +likely to be 5.11.0, 5.12.0, etc. + +2. Changes relative to the previous release + +2.1 Update the parts of the build system that find Tcl-related software. + +The build system now checks extensively for the consistency of the +Tcl/Tk/Itcl/Itk/Iwidgets components that are found. + +2.2 Update the Tcl-related epa_build configurations. + +The epa_build subproject of PLplot design goal is to make it easy to +build PLplot dependencies on all platforms. + +Previously version 8.6 of Tcl/Tk and version 3 of Itcl/Itk, version 4 +of Itcl/Itk, and versions 4.0 and 4.1 of Iwidgets could be epa_built +on Linux, but now the epa_build configuration files have been updated +so these builds also succeed on MinGW/MSYS. + +2.3 Update the PLplot build system so that the Tcl/Tk/Itcl/Itk/Iwidgets +bindings and examples work on MinGW/MSYS. + +2.4 Make many minor build-system fixes so that comprehensive tests (see +test summaries below) finally work almost completely on MinGW/MSYS. + +2.5 Update api.xml to be consistent with our public API defined by plplot.h. + +This substantial improvement to our DocBook documentation for our +public API has been made possible by the "check" application written +by Hǎiliàng Wáng (see +https://github.com/hailiang/go-plplot/tree/master/c/check) which uses +gccxml to convert the API information in plplot.h into XML and +compares those results (names of functions in our public API, and for +each of those functions, number of arguments, names of arguments, and +types of arguments) with the corresponding information in api.xml. +The original report from the check_api_xml_consistency target (which +runs the check programme) showed ~150 inconsistencies between api.xml +and our public API including several functions in our public API that +were not documented at all in api.xml. That number of inconsistencies +has now been reduced to zero which constitutes a substantial upgrade +in the quality of our API documentation. + +3. Tests made for the current release. + +The "comprehensive tests" below refers to running +scripts/comprehensive_test.sh in default mode (i.e., not dropping any +tests). For each of our three major configurations (shared +libraries/dynamic devices, shared libraries/nondynamic devices, and +static libraries/nondynamic devices) this test script runs ctest in +the build tree and runs the test_noninteractive and test_interactive +targets in the build tree, the installed examples tree configured with +a CMake-based build system for the examples, and an installed examples +tree configured with our traditional (Make + pkg-config) build system +for the examples. Testers can run that script directly or there are +convenient options called -DCOMPREHENSIVE_PLPLOT_TEST_INTERACTIVE=ON +and -DCOMPREHENSIVE_PLPLOT_TEST_NONINTERACTIVE=ON for +epa_build (see cmake/epa_build/README) that automatically runs that +script for the build_plplot_lite case (The cairo, qt, and wxwidgets +device drivers are dropped) or the usual build_plplot case (no components +of PLplot dropped) for either/both the interactive and noninteractive +subsets of the tests. + +Note that all tests mentioned below were successful ones unless +noted differently. + +* Alan W. Irwin ran both interactive and noninteractive comprehensive +tests via epa_build of plplot (as opposed to plplot_lite) on a 64-bit +Debian Wheezy Linux platform on AMD-64 hardware. That system has +virtually every relevant PLplot dependency either epa_built or +system-installed. So these tests are virtually complete test of all +aspects of PLplot. + +* Alan W. Irwin ran both interactive and noninteractive comprehensive +tests via epa_build of plplot_lite (as opposed to plplot) on a 64-bit +Debian Wheezy Linux platform on AMD-64 hardware. These tests show +that the remaining components of PLplot work well when some important +components (i.e., cairo, qt, and wxwidgets device drivers) are +dropped. + +* Alan W. Irwin ran both interactive and noninteractive comprehensive +tests of plplot_lite on 32-bit MinGW/MSYS/Wine for AMD-64 hardware. +(This test is only for plplot_lite since currently some of the +additional dependencies of plplot do not build on MinGW/MSYS/Wine. It +is not clear whether this is due to a Wine issue or an epa_build +configuration issue for MinGW/MSYS.) The language bindings and +examples tested were ada, c, c++, f95, lua, python, tcl, tk, itcl, +itk. and iwidgets. The device drivers tested were ntk, pdf, ps, svg, +wingcc, and xfig. So this test is less complete than the equivalent +Linux test above due to lack of PLplot dependencies on MinGW/MSYS. +But the epa_build project has already closed some of that dependency +gap for this platform (e.g., by providing builds of pkg-config, swig, +libagg, libharu, shapelib, libqhull, and everything Tcl-related), and +it is hoped it will close even more of that dependency gap in the +future. + +The Wine version for this test was 1.6.1 which was built on Debian +Wheezy; the compiler was (MinGW) gcc-4.7.2; the Windows binary version +of CMake was downloaded from Kitware and was version 2.8.12.1; the +CMake generator was "MSYS Makefiles"; and the build command was "make" +(i.e., the MSYS version, not the MinGW version). + +The above noninteractive comprehensive tests finished without issues. + +In contrast the interactive comprehensive tests failed. In +particular, all interactive tests for the shared library/dynamic +devices case for the build tree succeeded except for the +test_pltcl_standard_examples target which failed close to Tcl exit +from that particular test. This failure near Tcl exit is similar to +the Tcl exit issue reported at +http://sourceforge.net/p/plplot/bugs/139/. Because of this test +failure, the remaining configurations are untested on MinGW/MSYS/Wine +for the interactive case. + +* Arjen Markus was unable to confirm the good noninteractive test +results obtained above for MinGW/MSYS using his Windows platform +consisting of MinGW-4.8.1 and MSYS on 64-bit +Windows 7, service pack 1 for AMD-64 hardware. The long-standing MSYS +bug for parallel builds was worked around by using the epa_build +-DNUMBER_PARALLEL_JOBS:STRING=1 cmake option. The build failure occurred +with an "undefined reference to `tclStubsPtr'" that occurred during +the course of the Itk epa_build. It is not clear at this point if his +setup of epa_build (creating appropriate values for the + +INSTALL_PREFIX +EPA_BUILD_SOURCE_PATH +CFLAGS +CXXFLAGS +FFLAGS +CMAKE_INCLUDE_PATH +CMAKE_LIBRARY_PATH +PATH +PKG_CONFIG_PATH +BUILD_COMMAND +GENERATOR_STRING + +environment variables) or MinGW-4.8.1 (as opposed to MinGW-4.7.2 used +in the above successful test), or some other issue is causing failure +of the Itk build on this platform. + +4. Tests made for the prior release + +To remind the test team of the tests that were run for the +last release (5.9.11) here are the complete notes on +those tests from the previous release announcement. + +Note that "comprehensive tests" below refers to running +scripts/comprehensive_test.sh in default mode (i.e., not dropping any +tests). For each of our three major configurations (shared +libraries/dynamic devices, shared libraries/nondynamic devices, and +static libraries/nondynamic devices) this test script runs ctest in +the build tree and runs the test_noninteractive and test_interactive +targets in the build tree, the installed examples tree configured with +a CMake-based build system for the examples, and an installed examples +tree configured with our traditional (Make + pkg-config) build system +for the examples. + +Note that all tests mentioned below were successful ones unless +noted differently. + +* Alan W. Irwin ran comprehensive tests for a complete system build +environment on 64-bit Debian Wheezy Linux for AMD-64 hardware. + +* Alan W. Irwin ran comprehensive tests for a limited (qt, cairo, wxwidgets, +and octave PLplot components were dropped) epa_build environment on +64-bit Debian Wheezy Linux for AMD-64 hardware. + +* Alan W. Irwin ran comprehensive tests for an almost complete epa_build +environment (only the wxwidgets and octave components of PLplot were +dropped) on 64-bit Debian Wheezy Linux for AMD-64 hardware. + +* Alan W. Irwin ran fairly comprehensive tests (i.e, for the shared +library/dynamic devices case run ctest and also the +test_noninteractive and test_interactive targets in the build tree) +for a quite limited (qt, cairo, wxwidgets, octave, Tcl/Tk, and Java +PLplot components were dropped) epa_build environment for 32-bit +MinGW/MSYS/Wine for AMD-64 hardware. The Wine version was a release +candidate for Wine-1.6 that was built on Debian Wheezy Linux, the +compiler was gcc-4.7.2, the CMake generator was "MSYS Makefiles", and +the build command was "make" (i.e., the MSYS version, not the MinGW +version). An attempt was made to extend this successful test result +to the installed examples built with the CMake-based build system, but +for that case the Ada examples all failed at run time with a return +code of 3 so no further attempt was made to widen the scope of these +MinGW/MSYS/Wine tests. + +* Andrew Ross ran fairly comprehensive tests (i.e., for the shared +library/dynamic devices case use the test_noninteractive and +test_interactive targets in the build tree) for a complete system +build environment on 64-bit Debian unstable Linux for AMD-64 hardware. + +* Andrew Ross ran comprehensive tests for a complete system build +environment on 64-bit Ubuntu Saucy (13.10) Linux for AMD-64 hardware. +The only issue was a segmentation fault on the c++ qt_example for +the nondynamic devices case only. This is reproducible on this +system, but not on other Linux platforms so may be specific to the +Ubuntu version of the Qt libraries. This is unlikely to affect most +users since the default is to use dynamically loaded devices. + +* Andrew Ross ran limited tests with a limited number of nondynamic +devices (mem, null, psc, svg, xfig, xwin) and limited language +bindings (C / C++ / F95) for a CentOS 5.10 system with AMD64 hardware. +The build passed "make test_diff psc". The java version was too old +and java support had to be disabled. Ada support had to be +disabled due to a bug (now fixed). Cairo support also had to be +disabled due to too old a version of the library being installed. + +* Andrew Ross ran limited tests for an epa_build environment on CentOS +5.10. The buildtools and plplot_lite targets were built (with +nondynamic devices), again after disabling java, ada and cairo support. +This build added support for tcl / tk bindings and the pdf and tk based +devices. The build passed make test_noninteractive in the install tree, +but failed make test_interactive due to missing rpath information for the +itcl and itk libraries. This bug can be worked around by setting +LD_LIBRARY_PATH to point to the libraries, in which case the interactive +test works fine. + +* Arjen Markus ran a fairly comprehensive test (i.e., for the shared +library/dynamic devices case use the test_noninteractive target) for a +incomplete system build environment (the Ada, D, itcl/itk, Lua, ocaml, +octave, Java, and wxwidgets components of PLplot were dropped) on +64-bit Cygwin with gcc-4.8.2. That platform was installed on top of +64-bit Windows 7, service pack 1 for AMD-64 hardware. Java and +wxwidgets were dropped because of build errors for those on Cygwin +that have not been resolved yet. The remaining components were +dropped due to lack of time to investigate them so far. There was +close to complete success with the qt and cairo (aside from wincairo) +device drivers which is an excellent Windows result since those +device drivers add a lot of important capability to PLplot. + +* Arjen Markus ran build tests and limited run-time tests (checking by +hand that some components of PLplot worked) for the shared +libraries/dynamic devices case for a limited build environment (the +qt, cairo, wxwidgets, pdf and the components mentioned above of PLplot +were dropped except for Java which was included in this test) on +32-bit MinGW. That platform was installed on top of 64-bit Windows 7, +service pack 1 for AMD-64 hardware. The compiler was gcc-4.7.0, the +CMake generator was "MinGW Makefiles", and the build command was +mingw32-make. + +* Arjen Markus ran build tests and limited run-time tests (checking by +hand that some components of PLplot worked) for the shared +libraries/dynamic devices case for a limited build environment (the +same limitations as for his MinGW tests above) for MSVC/C++ 2010 and Intel +Fortran 2011 compilers on 64-bit Windows 7, service pack 1 for AMD-64 +hardware. In general, the CMake generator "NMake Makefiles" and +the corresponding build command "nmake" worked well for this platform. +The attempted use of Visual Studio generators combined with the +Visual Studio 2010 IDE available on that platform was more problematic. + +* Phil Rosenberg ran build tests and limited run-time tests (checking +by hand that some components of PLplot worked) for the static +libraries/nondynamic devices case for a limited build environment +(virtually all PLplot components dropped other than C, C++ and +wxwidgets 2.8) for the Visual Studio 2008 IDE (with associated MSVC +compiler) on 32-bit Windows 7 for AMD-64 hardware. The "Visual Studio +9 2008" generator yielded good results. + +* Phil Rosenberg ran build tests and limited run-time tests (checking +by hand that some components of PLplot worked) for the static +libraries/nondynamic devices case for a limited build environment +(virtually all PLplot components dropped other than C, CXX, and +wxwidgets 3.0) for the Visual Studio 2012 IDE (with associated MSVC +compiler) on Windows 8 for AMD-64 hardware. Both x86 and x64 builds +were tested. The combination of "NMake Makefiles" generator and MSVC +compiler yielded good build results if CMake patches (available at +http://www.cmake.org/Bug/view.php?id=14587 and +http://www.cmake.org/Bug/view.php?id=14642) to allow use of +wxwidgets-3.0 were applied. With those patches some run-time problems +with the use of Plplot's wxWidgetsApp with wxWidgets 3.0 were observed +in the examples, however plots embedded in wxWidgets apps seem to work +fine. The "Visual Studio 11" and "Visual Studio 11 Win64" generators +had some additional issues which could be worked around but which +nevertheless indicated there are some CMake bugs for those generators +that need to be addressed. + +* Jerry Bauck ran build tests of PLplot for the C core library, the +Ada, C++, Java, Lua, and Python bindings, and a fairly complete list +of device drivers (including qt and cairo) for PLplot on Mac OS X +Mountain Lion for AMD64 hardware. Extremely narrow run-time tests of +the Ada examples were a success, but all the standard testing scripts +failed because for unknown reasons the lena.pgm file that is used in +conjunction with our standard example 20 was not properly copied by +our build and test system from the source tree to the correct +locations in the build tree. + +* Felipe Gonzalez ran build tests of PLplot for the C core library and +the C++, Fortran 95, and OCaml-4.01.0 bindings on Mac OS X Mountain +Lion. The report from Felipe stated the compiler suite used was +probably from MacPorts, and did not state anything about the hardware +type. PLplot Release 5.9.11 ~~~~~~~~~~~~~~~~~~~~ This is a development release of PLplot. It represents the ongoing efforts This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2014-03-15 21:06:56
|
Revision: 13062 http://sourceforge.net/p/plplot/code/13062 Author: andrewross Date: 2014-03-15 21:06:52 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Changes to qt_example so it works (in the build tree) with Qt5. Still need to fix the install tree case. Modified Paths: -------------- trunk/examples/c++/CMakeLists.txt trunk/examples/c++/qt_PlotWindow.h Modified: trunk/examples/c++/CMakeLists.txt =================================================================== --- trunk/examples/c++/CMakeLists.txt 2014-03-15 20:23:02 UTC (rev 13061) +++ trunk/examples/c++/CMakeLists.txt 2014-03-15 21:06:52 UTC (rev 13062) @@ -142,14 +142,17 @@ target_link_libraries(wxPLplotDemo plplotwxwidgets${LIB_TAG} plplotcxx${LIB_TAG} ${wxwidgets_LINK_FLAGS} ${MATH_LIB}) endif(ENABLE_wxwidgets) -## FIXME for the case when PLPLOT_USE_QT5 is ON. - if(ENABLE_qt AND NOT PLPLOT_USE_QT5) + if(ENABLE_qt) if(CORE_BUILD) set(BUILD_qt_example ON) - if(NOT QT_LIBRARIES) + if(NOT PLPLOT_USE_QT5 AND NOT QT_LIBRARIES) message(FATAL_ERROR "include(${QT_USE_FILE}) failed in core build examples/c++ subdirectory.") - endif(NOT QT_LIBRARIES) + endif(NOT PLPLOT_USE_QT5 AND NOT QT_LIBRARIES) else(CORE_BUILD) + if(PLPLOT_USE_QT5) + message(STATUS "WARNING: Not currently checking for Qt5 in install tree. qt_example not built") + set(BUILD_qt_example OFF) + else(PLPLOT_USE_QT5) # Must find Qt4 all over again here rather than simply copying variables # from the core build to this installed examples build so that we can # access the qt4_wrap_cpp macro here. @@ -166,8 +169,22 @@ message(STATUS "WARNING: Qt4 not found or wrong version. qt_example not built") set(BUILD_qt_example OFF) endif(QT4_FOUND AND QT_VERSION_MAJOR STREQUAL "${CORE_QT_VERSION_MAJOR}" AND QT_VERSION_MINOR STREQUAL "${CORE_QT_VERSION_MINOR}" AND QT_VERSION_PATCH STREQUAL "${CORE_QT_VERSION_PATCH}") + endif(PLPLOT_USE_QT5) endif(CORE_BUILD) if(BUILD_qt_example) + if(PLPLOT_USE_QT5) + qt5_wrap_cpp( + QT_MOC_OUTFILES + ${CMAKE_CURRENT_SOURCE_DIR}/qt_PlotWindow.h + ) + set_source_files_properties( + ${QT_MOC_OUTFILES} + PROPERTIES GENERATED "ON" + ) + add_executable(qt_example qt_example.cpp qt_PlotWindow.cpp ${QT_MOC_OUTFILES}) + qt5_use_modules(qt_example Svg Gui PrintSupport) + target_link_libraries(qt_example ${QT_LIBRARIES} plplotqt${LIB_TAG} plplot${LIB_TAG} ${qt_example_TARGETS}) + else(PLPLOT_USE_QT5) qt4_wrap_cpp( QT_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/qt_PlotWindow.h @@ -181,6 +198,7 @@ target_link_libraries(qt_example ${QT_LIBRARIES} plplotqt${LIB_TAG} plplot${LIB_TAG}) # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES set_qt_target_properties(qt_example) + endif(PLPLOT_USE_QT5) endif(BUILD_qt_example) - endif(ENABLE_qt AND NOT PLPLOT_USE_QT5) + endif(ENABLE_qt) endif(BUILD_TEST) Modified: trunk/examples/c++/qt_PlotWindow.h =================================================================== --- trunk/examples/c++/qt_PlotWindow.h 2014-03-15 20:23:02 UTC (rev 13061) +++ trunk/examples/c++/qt_PlotWindow.h 2014-03-15 21:06:52 UTC (rev 13062) @@ -28,14 +28,14 @@ #define PLD_qtwidget -#include <QtGui/QApplication> -#include <QtGui/QMainWindow> -#include <QtGui/QAction> -#include <QtGui/QMenuBar> -#include <QtGui/QFileDialog> -#include <QtGui/QPrintDialog> -#include <QtGui/QPrinter> -#include <QtGui/QMessageBox> +#include <QApplication> +#include <QMainWindow> +#include <QAction> +#include <QMenuBar> +#include <QFileDialog> +#include <QPrintDialog> +#include <QPrinter> +#include <QMessageBox> #include "qt.h" class PlotWindow : public QMainWindow This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2014-03-15 20:23:04
|
Revision: 13061 http://sourceforge.net/p/plplot/code/13061 Author: andrewross Date: 2014-03-15 20:23:02 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Lower minimum qt5 version requirements based on tests with Debian unstable. Modified Paths: -------------- trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2014-03-15 17:39:59 UTC (rev 13060) +++ trunk/cmake/modules/qt.cmake 2014-03-15 20:23:02 UTC (rev 13061) @@ -68,7 +68,7 @@ option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF) if(PLPLOT_USE_QT5) - find_package(Qt5Core 5.2.1) + find_package(Qt5Core 5.2.0) if(Qt5Core_FOUND) message(STATUS "Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript") set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-15 17:40:02
|
Revision: 13060 http://sourceforge.net/p/plplot/code/13060 Author: airwin Date: 2014-03-15 17:39:59 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Rename update_pango_packages.sh ==> update_gtk+_packages.sh in preparation for changes in that script that will configure all of gtk+ and its dependencies. Added Paths: ----------- trunk/cmake/epa_build/update_gtk+_packages.sh Removed Paths: ------------- trunk/cmake/epa_build/update_pango_packages.sh Copied: trunk/cmake/epa_build/update_gtk+_packages.sh (from rev 13058, trunk/cmake/epa_build/update_pango_packages.sh) =================================================================== --- trunk/cmake/epa_build/update_gtk+_packages.sh (rev 0) +++ trunk/cmake/epa_build/update_gtk+_packages.sh 2014-03-15 17:39:59 UTC (rev 13060) @@ -0,0 +1,64 @@ +#!/bin/bash +# Update build configurations of pango packages that are described by +# GTK+ jhbuild build configuration + +# Chose this latest version (as of August 2013) because it probably has +# improved build and dependency instructions compared to previous versions. +# For example, the glib version (2.37.4) is known to solve a build issue +# that I ran into for earlier glib versions. +export GTK_VERSION=3.9.4 +rm -rf $GTK_VERSION +mkdir $GTK_VERSION +cd $GTK_VERSION +# This downloads all the relevant xml build configuration files +# for the given version of GTK +wget -nd ftp://ftp.acc.umu.se/pub/GNOME/teams/releng/$GTK_VERSION/* +cd .. +./gtk_xml_recursive_process.py \ +$GTK_VERSION/gnome-apps-$GTK_VERSION.modules \ +>| gtk_packages_$GTK_VERSION.xml + +rm -rf $GTK_VERSION + +# Patch this result to correct errors I have discovered in the jhbuild +# configuration or else to use new versions of packages. + +patch --no-backup-if-mismatch <patch_gtk_packages.xml + +# To create the schema for gtk_packages.xml use +trang -I xml gtk_packages_$GTK_VERSION.xml gtk_packages_$GTK_VERSION.rnc + +# That resulting schema file is quite helpful in figuring out +# how to process gtk_packages_$GTK_VERSION.xml as below. + +# Transform the xml form to a form that can be used by a cmake script. +# Note, there will be some information messages sent to stderr by this +# script that typically relate to good packages (ones that can be +# transformed by this script) and bad packages. Currently the list of +# bad packages are confined just to those which are completely missing +# from the jhbuild data for gtk. The first command-line argument is +# the starting package name and the second command-line argument is a +# control variable where the least significant bit is ON for following (hard) +# "dependencies" dependencies, the next least significant bit is ON +# for following (soft) "suggests", dependencies, and the next least +# significant bit is ON for following (would be nice) "after" +# dependencies. Currently I use a command variable of 1 to keep +# the number of packages configured for building pango and +# (hard) dependencies to a minimum. +./gtk_transform.py "pango" 1 <gtk_packages_$GTK_VERSION.xml 1>| pango_packages.data 2>|pango_packages.stderr + +# Finally to actually generate build configurations for build_packages run +# the following command. + +cmake -DFILENAME:FILEPATH=pango_packages.data -P configure_epa.cmake + +# Patch generated configuration files. This patch file contains +# additional changes that cannot be done via a patch to the *.xml file. +# Typically, these changes are hand edits which are tested then committed. +# So typically the patch is created by rerunning the above cmake +# command then using "svn diff" >| configured_pango.patch" to generate +# the reverse form of the patch to change the result created by the +# above cmake command into the svn committed form which is done with +# the following patch command. + +patch --reverse --no-backup-if-mismatch -p0 <configured_pango.patch Deleted: trunk/cmake/epa_build/update_pango_packages.sh =================================================================== --- trunk/cmake/epa_build/update_pango_packages.sh 2014-03-15 01:40:59 UTC (rev 13059) +++ trunk/cmake/epa_build/update_pango_packages.sh 2014-03-15 17:39:59 UTC (rev 13060) @@ -1,64 +0,0 @@ -#!/bin/bash -# Update build configurations of pango packages that are described by -# GTK+ jhbuild build configuration - -# Chose this latest version (as of August 2013) because it probably has -# improved build and dependency instructions compared to previous versions. -# For example, the glib version (2.37.4) is known to solve a build issue -# that I ran into for earlier glib versions. -export GTK_VERSION=3.9.4 -rm -rf $GTK_VERSION -mkdir $GTK_VERSION -cd $GTK_VERSION -# This downloads all the relevant xml build configuration files -# for the given version of GTK -wget -nd ftp://ftp.acc.umu.se/pub/GNOME/teams/releng/$GTK_VERSION/* -cd .. -./gtk_xml_recursive_process.py \ -$GTK_VERSION/gnome-apps-$GTK_VERSION.modules \ ->| gtk_packages_$GTK_VERSION.xml - -rm -rf $GTK_VERSION - -# Patch this result to correct errors I have discovered in the jhbuild -# configuration or else to use new versions of packages. - -patch --no-backup-if-mismatch <patch_gtk_packages.xml - -# To create the schema for gtk_packages.xml use -trang -I xml gtk_packages_$GTK_VERSION.xml gtk_packages_$GTK_VERSION.rnc - -# That resulting schema file is quite helpful in figuring out -# how to process gtk_packages_$GTK_VERSION.xml as below. - -# Transform the xml form to a form that can be used by a cmake script. -# Note, there will be some information messages sent to stderr by this -# script that typically relate to good packages (ones that can be -# transformed by this script) and bad packages. Currently the list of -# bad packages are confined just to those which are completely missing -# from the jhbuild data for gtk. The first command-line argument is -# the starting package name and the second command-line argument is a -# control variable where the least significant bit is ON for following (hard) -# "dependencies" dependencies, the next least significant bit is ON -# for following (soft) "suggests", dependencies, and the next least -# significant bit is ON for following (would be nice) "after" -# dependencies. Currently I use a command variable of 1 to keep -# the number of packages configured for building pango and -# (hard) dependencies to a minimum. -./gtk_transform.py "pango" 1 <gtk_packages_$GTK_VERSION.xml 1>| pango_packages.data 2>|pango_packages.stderr - -# Finally to actually generate build configurations for build_packages run -# the following command. - -cmake -DFILENAME:FILEPATH=pango_packages.data -P configure_epa.cmake - -# Patch generated configuration files. This patch file contains -# additional changes that cannot be done via a patch to the *.xml file. -# Typically, these changes are hand edits which are tested then committed. -# So typically the patch is created by rerunning the above cmake -# command then using "svn diff" >| configured_pango.patch" to generate -# the reverse form of the patch to change the result created by the -# above cmake command into the svn committed form which is done with -# the following patch command. - -patch --reverse --no-backup-if-mismatch -p0 <configured_pango.patch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-15 01:41:05
|
Revision: 13059 http://sourceforge.net/p/plplot/code/13059 Author: airwin Date: 2014-03-15 01:40:59 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Use improved placement for the block of CMake code that might in the future create a dependency on the moc_outfile_generated target which is now available for both the Qt4 and Qt5 cases. Note this changed placement currently has no practical effect and is only for didactic reasons since this actual block of code is currently not executed (ANY_QT_DEVICE and NOT ENABLE_qt cannot currently be simultanously true). Modified Paths: -------------- trunk/drivers/CMakeLists.txt Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2014-03-15 00:28:58 UTC (rev 13058) +++ trunk/drivers/CMakeLists.txt 2014-03-15 01:40:59 UTC (rev 13059) @@ -118,14 +118,6 @@ ${${SOURCE_ROOT_NAME}_TARGETS} ) else(PLPLOT_USE_QT5) - if(NOT ENABLE_qt) - # Note this code is never executed considering the way the - # build system is set up now (see cmake/modules/qt.cmake), - # but nevertheless keep it for the future in case we ever - # want to deal with the case where we want to build the qt - # device without building the plplotqtd library - add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) - endif(NOT ENABLE_qt) if(NOT QT_LIBRARIES) message(FATAL_ERROR "Internal build system inconsistency. QT_LIBRARIESis empty but it should be populated") endif(NOT QT_LIBRARIES) @@ -140,6 +132,14 @@ # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES set_qt_target_properties(${SOURCE_ROOT_NAME}) endif(PLPLOT_USE_QT5) + if(NOT ENABLE_qt) + # Note this code is never executed considering the way the + # build system is set up now (see cmake/modules/qt.cmake), + # but nevertheless keep it for the future in case we ever + # want to deal with the case where we want to build the qt + # device without building the plplotqtd library + add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) + endif(NOT ENABLE_qt) else(ANY_QT_DEVICE) message(FATAL_ERROR "Internal build system inconsistency. Attempt to build dynamic qt device when ANY_QT_DEVICE is false.") endif(ANY_QT_DEVICE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2014-03-15 00:29:03
|
Revision: 13058 http://sourceforge.net/p/plplot/code/13058 Author: andrewross Date: 2014-03-15 00:28:58 +0000 (Sat, 15 Mar 2014) Log Message: ----------- Update qt5 support so moc is properly called on qt.h. Modified Paths: -------------- trunk/include/CMakeLists.txt trunk/include/moc_files.h.in Modified: trunk/include/CMakeLists.txt =================================================================== --- trunk/include/CMakeLists.txt 2014-03-14 23:17:42 UTC (rev 13057) +++ trunk/include/CMakeLists.txt 2014-03-15 00:28:58 UTC (rev 13058) @@ -120,23 +120,28 @@ list(APPEND MOC_OPTIONS -DPLD_extqt) endif(PLD_extqt) if(MOC_OPTIONS) - # Use entirely different method for Qt5. - if(NOT PLPLOT_USE_QT5) - # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. + # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. + if(PLPLOT_USE_QT5) + qt5_wrap_cpp( + QT_MOC_OUTFILES + ${CMAKE_SOURCE_DIR}/include/qt.h + OPTIONS ${MOC_OPTIONS} + ) + else(PLPLOT_USE_QT5) qt4_wrap_cpp( QT_MOC_OUTFILES ${CMAKE_SOURCE_DIR}/include/qt.h OPTIONS ${MOC_OPTIONS} ) - # Use custom target to force correct target dependencies in - # various directories. This target is used in three possible - # places (qt_gui, drivers, or src) depending on build options. - # The CMake dependency parser creates the necessary file - # dependency on qt.h for all qt-related source code so there is no - # need to add the ${QT_MOC_OUTFILES} file dependencies for any - # target dependency on moc_outfiles_generated. - add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) - endif(NOT PLPLOT_USE_QT5) + endif(PLPLOT_USE_QT5) + # Use custom target to force correct target dependencies in + # various directories. This target is used in three possible + # places (qt_gui, drivers, or src) depending on build options. + # The CMake dependency parser creates the necessary file + # dependency on qt.h for all qt-related source code so there is no + # need to add the ${QT_MOC_OUTFILES} file dependencies for any + # target dependency on moc_outfiles_generated. + add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) # #include ${QT_MOC_OUTFILES}) indirectly via the configured moc_files.h # header. Modified: trunk/include/moc_files.h.in =================================================================== --- trunk/include/moc_files.h.in 2014-03-14 23:17:42 UTC (rev 13057) +++ trunk/include/moc_files.h.in 2014-03-15 00:28:58 UTC (rev 13058) @@ -1,7 +1,5 @@ // Configured header file listing the moc-generated files to include in plqt.cpp. #ifndef __MOC_FILES_H__ #define __MOC_FILES_H__ -#ifndef PLPLOT_USE_QT5 #include "@QT_MOC_OUTFILES@" -#endif #endif // __MOC_FILES_H__ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2014-03-14 23:17:46
|
Revision: 13057 http://sourceforge.net/p/plplot/code/13057 Author: andrewross Date: 2014-03-14 23:17:42 +0000 (Fri, 14 Mar 2014) Log Message: ----------- Some more minor fixes to get plplot compiling with Qt5. These were required for Linux with Qt 5.2.0. Modified Paths: -------------- trunk/bindings/qt_gui/CMakeLists.txt trunk/bindings/qt_gui/plqt.cpp trunk/drivers/CMakeLists.txt trunk/src/CMakeLists.txt Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2014-03-14 17:24:49 UTC (rev 13056) +++ trunk/bindings/qt_gui/CMakeLists.txt 2014-03-14 23:17:42 UTC (rev 13057) @@ -45,7 +45,7 @@ # According to advice from Steve Kelly on the Cmake list, the Qt5 # Gui component is a dependency of the Qt5 Svg component so is not # needed here, but I will leave it in since it is informative. - qt5_use_modules(plplotqt${LIB_TAG} Svg Gui) + qt5_use_modules(plplotqt${LIB_TAG} Svg Gui PrintSupport) target_link_libraries( plplotqt${LIB_TAG} Modified: trunk/bindings/qt_gui/plqt.cpp =================================================================== --- trunk/bindings/qt_gui/plqt.cpp 2014-03-14 17:24:49 UTC (rev 13056) +++ trunk/bindings/qt_gui/plqt.cpp 2014-03-14 23:17:42 UTC (rev 13057) @@ -614,7 +614,9 @@ setOutputFileName( QString( fileName ) ); if ( ifeps ) { +#ifndef PLPLOT_USE_QT5 setOutputFormat( QPrinter::PostScriptFormat ); +#endif } else { Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2014-03-14 17:24:49 UTC (rev 13056) +++ trunk/drivers/CMakeLists.txt 2014-03-14 23:17:42 UTC (rev 13057) @@ -110,7 +110,7 @@ # According to advice from Steve Kelly on the Cmake list, the Qt5 # Gui component is a dependency of the Qt5 Svg component so is not # needed here, but I will leave it in since it is informative. - qt5_use_modules(${SOURCE_ROOT_NAME} Svg Gui) + qt5_use_modules(${SOURCE_ROOT_NAME} Svg Gui PrintSupport) target_link_libraries( ${SOURCE_ROOT_NAME} plplot${LIB_TAG} Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-03-14 17:24:49 UTC (rev 13056) +++ trunk/src/CMakeLists.txt 2014-03-14 23:17:42 UTC (rev 13057) @@ -188,7 +188,7 @@ # According to advice from Steve Kelly on the Cmake list, the Qt5 # Gui component is a dependency of the Qt5 Svg component so is not # needed here, but I will leave it in since it is informative. - qt5_use_modules(plplot${LIB_TAG} Svg Gui) + qt5_use_modules(plplot${LIB_TAG} Svg Gui PrintSupport) endif(NOT ENABLE_DYNDRIVERS AND ANY_QT_DEVICE AND PLPLOT_USE_QT5) if(NON_TRANSITIVE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-14 17:24:52
|
Revision: 13056 http://sourceforge.net/p/plplot/code/13056 Author: airwin Date: 2014-03-14 17:24:49 +0000 (Fri, 14 Mar 2014) Log Message: ----------- Add some extra introductory paragraphs explaining the purpose of epa_build. Modified Paths: -------------- trunk/cmake/epa_build/README Modified: trunk/cmake/epa_build/README =================================================================== --- trunk/cmake/epa_build/README 2014-03-14 04:38:18 UTC (rev 13055) +++ trunk/cmake/epa_build/README 2014-03-14 17:24:49 UTC (rev 13056) @@ -2,6 +2,63 @@ interested in helping to develop that project, you should look at README.developers as well. +The epa_build project provides a coherent and internally consistent +method for building software packages on Windows and Unix (including +Linux and Mac OS X). The epa_build is implemented in the CMake +language and is fundamentally based on CMake's ExternalProject_Add +command. The fundamental advantage of this extra layer of indirection +for building software is it makes it easy to implement software +package dependencies (so that packages that depend on other packages +will be built after those other packages) and to establish the correct +software package configurations (e.g., locations of dependent +packages) so the set of built packages work well together. The extra +layer of indirection is quite light and there are no limitations on +the tools and build systems that can be used to build packages. +Therefore, if you already know how to build a software package (i.e., +by downloading, and optionally checking the download, updating the +download (e.g., by applying patches) and configuring, building, +testing, and installing the software package represented by that +download) it is extremely straightforward to do exactly the same thing +with epa_build while at the same time taking advantage of the +epa_build advantages listed above. + +The epa_build project has two fundamental modes of operation with +-DBUILD_THE_BUILDTOOLS=ON or OFF (see the details below). The two +cases have completely independent dependency chains and completely +independent build and install locations. When that variable is ON, +epa_build configures the build of buildtools (e.g., swig, and +pkg-config) that are useful for building the software dependency chain +that is available when that variable is OFF. The decision about classifying +a given software package as a buildtool or an ordinary package is somewhat +arbitrary. For example, I have decided that software packages that +implement computer languages (e.g., all the Tcl-related software packages) +are classified as part of the buildtools dependency chain. + +From the description above it is obvious that the epa_build idea could +be used to bootstrap the build of essentially any free software +package starting with just a C compiler. So it could be used as the +basis of a source-based distribution of an extremely comprehensive set +of free software on _any_ platform. But currently that is just a dream +for the future, and for now the epa_build project is focussed just on +building and testing PLplot _and_ its fairly comprehensive set of +software package dependencies. + +The advantage of using epa_build on Linux and Mac OS X is it gives +PLplot developers and users access to the latest versions of dependent +software that might not be available yet for their platform. This +Unix advantage is especially important for users of enterprise class +Linux distributions which often are missing important PLplot +dependencies or which have such ancient versions of PLplot +dependencies, that PLplot does not work correctly with them. + +The advantage of using epa_build on Windows is it gives PLplot +developers and users access to the free software dependencies of +PLplot which are normally not installed on Windows. This allows +Windows users of PLplot to take advantage of the extra PLplot +capabilities that become available when all (soft) PLplot dependencies +are built and installed which in turn implies Windows users are no +longer second-class citizens of the PLplot empire. :-) + The epa_build project should work out of the box for Linux or Mac OS X systems with a full development tool-chain installed including relevant compilers (gcc, g++, gfortran, Ada in the suite of gcc This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-14 04:38:22
|
Revision: 13055 http://sourceforge.net/p/plplot/code/13055 Author: airwin Date: 2014-03-14 04:38:18 +0000 (Fri, 14 Mar 2014) Log Message: ----------- For the Qt5 case set PLD_epsqt to OFF since Qt5 does not support PostScript. This change requires rearrangment of the logic so that the order of the variable processing changes from ANY_QT_DEVICE ==> ENABLE_qt ==> PLPLOT_USE_QT5 to ENABLE_qt ==> PLPLOT_USE_QT5 ==> ANY_QT_DEVICE. Visual inspection of the code appears to indicate there should be no issues with this new order. Modified Paths: -------------- trunk/cmake/modules/qt.cmake Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2014-03-14 04:24:20 UTC (rev 13054) +++ trunk/cmake/modules/qt.cmake 2014-03-14 04:38:18 UTC (rev 13055) @@ -56,6 +56,31 @@ # PYQT_SIP_DIR - sip system directory # PYQT_SIP_FLAGS - sip command flags +if(DEFAULT_NO_BINDINGS) + option(ENABLE_qt "Enable Qt bindings" OFF) + option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF) +else(DEFAULT_NO_BINDINGS) + option(ENABLE_qt "Enable Qt bindings" ON) + option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON) +endif(DEFAULT_NO_BINDINGS) + +if(ENABLE_qt) + option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF) + + if(PLPLOT_USE_QT5) + find_package(Qt5Core 5.2.1) + if(Qt5Core_FOUND) + message(STATUS "Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript") + set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE) + else(Qt5Core_FOUND) + message(STATUS + "WARNING: Qt5Core could not be found so falling back to Qt4" + ) + set(PLPLOT_USE_QT5 OFF CACHE BOOL "Experimental (and currently quite limited) option to try Qt5" FORCE) + endif(Qt5Core_FOUND) + endif(PLPLOT_USE_QT5) +endif(ENABLE_qt) + if(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt) set(ANY_QT_DEVICE ON) endif(PLD_bmpqt OR PLD_jpgqt OR PLD_pngqt OR PLD_ppmqt OR PLD_tiffqt OR PLD_epsqt OR PLD_pdfqt OR PLD_qtwidget OR PLD_svgqt OR PLD_extqt OR PLD_memqt) @@ -69,14 +94,6 @@ endif(NOT CMAKE_CXX_COMPILER_WORKS) endif(ANY_QT_DEVICE) -if(DEFAULT_NO_BINDINGS) - option(ENABLE_qt "Enable Qt bindings" OFF) - option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF) -else(DEFAULT_NO_BINDINGS) - option(ENABLE_qt "Enable Qt bindings" ON) - option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON) -endif(DEFAULT_NO_BINDINGS) - # ENABLE_qt depends on PLD_extqt if(NOT ANY_QT_DEVICE) set(PLD_extqt OFF CACHE BOOL "Enable Qt ext device" FORCE) @@ -91,18 +108,6 @@ endif(ENABLE_qt AND NOT PLD_extqt) if(ENABLE_qt) - option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF) - - if(PLPLOT_USE_QT5) - find_package(Qt5Core 5.2.1) - if(NOT Qt5Core_FOUND) - message(STATUS - "WARNING: Qt5Core could not be found so falling back to Qt4" - ) - set(PLPLOT_USE_QT5 OFF CACHE BOOL "Experimental (and currently quite limited) option to try Qt5" FORCE) - endif(NOT Qt5Core_FOUND) - endif(PLPLOT_USE_QT5) - if(NOT PLPLOT_USE_QT5) # Use a minimum version corresponding to the version installed by # Debian Wheezy. I assume all other non-enterprise Linux distros, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-14 04:24:24
|
Revision: 13054 http://sourceforge.net/p/plplot/code/13054 Author: airwin Date: 2014-03-14 04:24:20 +0000 (Fri, 14 Mar 2014) Log Message: ----------- Straighten out some endif inconsistencies introduced by the last commit that had no consequences other than a warning message. Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-03-13 23:01:25 UTC (rev 13053) +++ trunk/src/CMakeLists.txt 2014-03-14 04:24:20 UTC (rev 13054) @@ -216,8 +216,8 @@ if(ANY_QT_DEVICE AND NOT PLPLOT_USE_QT5) # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES set_qt_target_properties(plplot${LIB_TAG}) - endif(ANY_QT_DEVICE) -endif(ENABLE_DYNDRIVERS AND NOT PLPLOT_USE_QT5) + endif(ANY_QT_DEVICE AND NOT PLPLOT_USE_QT5) +endif(ENABLE_DYNDRIVERS) #message("DEBUG: LIB_INSTALL_RPATH = ${LIB_INSTALL_RPATH}") if(MATH_LIB) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-13 23:01:27
|
Revision: 13053 http://sourceforge.net/p/plplot/code/13053 Author: airwin Date: 2014-03-13 23:01:25 +0000 (Thu, 13 Mar 2014) Log Message: ----------- Only call set_qt_target_properties for the Qt4 case. (The Qt5 case is handled an entirely different way that never involves set_qt_target_properties.) Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-03-13 19:26:25 UTC (rev 13052) +++ trunk/src/CMakeLists.txt 2014-03-13 23:01:25 UTC (rev 13053) @@ -213,11 +213,11 @@ else(ENABLE_DYNDRIVERS) list(APPEND libplplot${LIB_TAG}_LINK_LIBRARIES ${DRIVERS_LINK_FLAGS}) list(APPEND LIB_INSTALL_RPATH ${DRIVERS_RPATH}) - if(ANY_QT_DEVICE) + if(ANY_QT_DEVICE AND NOT PLPLOT_USE_QT5) # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES set_qt_target_properties(plplot${LIB_TAG}) endif(ANY_QT_DEVICE) -endif(ENABLE_DYNDRIVERS) +endif(ENABLE_DYNDRIVERS AND NOT PLPLOT_USE_QT5) #message("DEBUG: LIB_INSTALL_RPATH = ${LIB_INSTALL_RPATH}") if(MATH_LIB) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-13 19:26:28
|
Revision: 13052 http://sourceforge.net/p/plplot/code/13052 Author: airwin Date: 2014-03-13 19:26:25 +0000 (Thu, 13 Mar 2014) Log Message: ----------- Fix typographical error in how Qt5 components are specified. (This change only affects the experimental -DPLPLOT_USE_QT5=ON case.) Modified Paths: -------------- trunk/bindings/qt_gui/CMakeLists.txt trunk/drivers/CMakeLists.txt trunk/src/CMakeLists.txt Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2014-03-12 23:39:20 UTC (rev 13051) +++ trunk/bindings/qt_gui/CMakeLists.txt 2014-03-13 19:26:25 UTC (rev 13052) @@ -42,10 +42,10 @@ endif(ANY_QT_DEVICE) if(PLPLOT_USE_QT5) - # According to advice from Steve Kelly on the Cmake list, QtGui - # is a dependency of QtSvg so is not needed here, but I will - # leave it in since it is informative. - qt5_use_modules(plplotqt${LIB_TAG} QtSvg QtGui) + # According to advice from Steve Kelly on the Cmake list, the Qt5 + # Gui component is a dependency of the Qt5 Svg component so is not + # needed here, but I will leave it in since it is informative. + qt5_use_modules(plplotqt${LIB_TAG} Svg Gui) target_link_libraries( plplotqt${LIB_TAG} Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2014-03-12 23:39:20 UTC (rev 13051) +++ trunk/drivers/CMakeLists.txt 2014-03-13 19:26:25 UTC (rev 13052) @@ -107,10 +107,10 @@ if(ANY_QT_DEVICE) add_library(${SOURCE_ROOT_NAME} MODULE ${${SOURCE_ROOT_NAME}_SOURCE}) if(PLPLOT_USE_QT5) - # According to advice from Steve Kelly on the Cmake list, QtGui - # is a dependency of QtSvg so is not needed here, but I will - # leave it in since it is informative. - qt5_use_modules(${SOURCE_ROOT_NAME} QtSvg QtGui) + # According to advice from Steve Kelly on the Cmake list, the Qt5 + # Gui component is a dependency of the Qt5 Svg component so is not + # needed here, but I will leave it in since it is informative. + qt5_use_modules(${SOURCE_ROOT_NAME} Svg Gui) target_link_libraries( ${SOURCE_ROOT_NAME} plplot${LIB_TAG} Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-03-12 23:39:20 UTC (rev 13051) +++ trunk/src/CMakeLists.txt 2014-03-13 19:26:25 UTC (rev 13052) @@ -185,10 +185,10 @@ add_dependencies(plplot${LIB_TAG} plhershey-unicode.h_built ${qt_dependency}) if(NOT ENABLE_DYNDRIVERS AND ANY_QT_DEVICE AND PLPLOT_USE_QT5) - # According to advice from Steve Kelly on the Cmake list, QtGui - # is a dependency of QtSvg so is not needed here, but I will - # leave it in since it is informative. - qt5_use_modules(plplot${LIB_TAG} QtSvg QtGui) + # According to advice from Steve Kelly on the Cmake list, the Qt5 + # Gui component is a dependency of the Qt5 Svg component so is not + # needed here, but I will leave it in since it is informative. + qt5_use_modules(plplot${LIB_TAG} Svg Gui) endif(NOT ENABLE_DYNDRIVERS AND ANY_QT_DEVICE AND PLPLOT_USE_QT5) if(NON_TRANSITIVE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-12 23:39:24
|
Revision: 13051 http://sourceforge.net/p/plplot/code/13051 Author: airwin Date: 2014-03-12 23:39:20 +0000 (Wed, 12 Mar 2014) Log Message: ----------- Fix typographical error that made "package require Pltcl" fail under tclsh on the MinGW/MSYS platform. This fix allows the test_tclsh_standard_examples target to work on MinGW/MSYS. As a result, an epa_build of the build_plplot_lite target using -DCOMPREHENSIVE_PLPLOT_TEST_INTERACTIVE=ON works for the very first time on my MinGW/MSYS/Wine platform. Modified Paths: -------------- trunk/bindings/tcl/pkgIndex.tcl.in Modified: trunk/bindings/tcl/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tcl/pkgIndex.tcl.in 2014-03-12 20:54:20 UTC (rev 13050) +++ trunk/bindings/tcl/pkgIndex.tcl.in 2014-03-12 23:39:20 UTC (rev 13051) @@ -48,7 +48,7 @@ if {![string compare -length $bLen $buildDir $pkgIndexDir]} then { set searchdirs "../../dll" } else { - set searchdirs [list "@LIB_HARDDIR@../bin"] + set searchdirs [list "@LIB_HARDDIR@/../bin"] } } #puts $searchdirs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-12 20:54:26
|
Revision: 13050 http://sourceforge.net/p/plplot/code/13050 Author: airwin Date: 2014-03-12 20:54:20 +0000 (Wed, 12 Mar 2014) Log Message: ----------- Initial commit of experimental build_system support for finding Qt5. Modified Paths: -------------- trunk/bindings/qt_gui/CMakeLists.txt trunk/cmake/modules/qt.cmake trunk/drivers/CMakeLists.txt trunk/examples/c++/CMakeLists.txt trunk/include/CMakeLists.txt trunk/include/moc_files.h.in trunk/plplot_config.h.in trunk/src/CMakeLists.txt Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/bindings/qt_gui/CMakeLists.txt 2014-03-12 20:54:20 UTC (rev 13050) @@ -20,9 +20,6 @@ if(ENABLE_qt) # Set up Qt4-based build environment. - if(NOT QT_LIBRARIES) - message(FATAL_ERROR "include(${QT_USE_FILE}) failed in bindings/qt_gui subdirectory.") - endif(NOT QT_LIBRARIES) set(qt_SOURCE plqt.cpp) include_directories( ${CMAKE_SOURCE_DIR}/include @@ -43,15 +40,32 @@ else(ANY_QT_DEVICE) message(FATAL_ERROR "Internal build system inconsistency between ENABLE_qt true and ANY_QT_DEVICE false.") endif(ANY_QT_DEVICE) - target_link_libraries( - plplotqt${LIB_TAG} - plplot${LIB_TAG} - ${MATH_LIB} - ${QT_LIBRARIES} - ) - # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES - set_qt_target_properties(plplotqt${LIB_TAG}) + if(PLPLOT_USE_QT5) + # According to advice from Steve Kelly on the Cmake list, QtGui + # is a dependency of QtSvg so is not needed here, but I will + # leave it in since it is informative. + qt5_use_modules(plplotqt${LIB_TAG} QtSvg QtGui) + + target_link_libraries( + plplotqt${LIB_TAG} + plplot${LIB_TAG} + ${MATH_LIB} + ) + else(PLPLOT_USE_QT5) + if(NOT QT_LIBRARIES) + message(FATAL_ERROR "PLplot build-system inconsistency in bindings/qt_gui subdirectory.") + endif(NOT QT_LIBRARIES) + target_link_libraries( + plplotqt${LIB_TAG} + plplot${LIB_TAG} + ${MATH_LIB} + ${QT_LIBRARIES} + ) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(plplotqt${LIB_TAG}) + endif(PLPLOT_USE_QT5) + if(NON_TRANSITIVE) # Note that there are implicit references to classes in QtCore, QtGui and QtSvg # so we need to add all three to the list of libraries to link to plplotqtd. Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/cmake/modules/qt.cmake 2014-03-12 20:54:20 UTC (rev 13050) @@ -91,51 +91,65 @@ endif(ENABLE_qt AND NOT PLD_extqt) if(ENABLE_qt) - # Use a minimum version corresponding to the version installed by - # Debian Wheezy. I assume all other non-enterprise Linux distros, - # Mac OS X, and Windows platforms also give access to this version - # of Qt4 or later. - find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg) + option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF) - # QT4_FOUND is defined to be true or false by find_package(Qt4 ...) - if(QT4_FOUND) - # Do not include(${QT_USE_FILE}) here because it contaminates ALL - # compile properties with Qt flags from (this) top-level directory - # on down. Use this alternative instead which includes a function - # set_qt_target_properties which should be called with the - # appropriate target argument whenever a Qt4-related target is built. - include(ndp_UseQt4) + if(PLPLOT_USE_QT5) + find_package(Qt5Core 5.2.1) + if(NOT Qt5Core_FOUND) + message(STATUS + "WARNING: Qt5Core could not be found so falling back to Qt4" + ) + set(PLPLOT_USE_QT5 OFF CACHE BOOL "Experimental (and currently quite limited) option to try Qt5" FORCE) + endif(NOT Qt5Core_FOUND) + endif(PLPLOT_USE_QT5) - # QT_COMPILE_DEFINITIONS (used only for pc_qt_COMPILE_FLAGS below), - # QT_INCLUDE_DIRECTORIES (used only for pc_qt_COMPILE_FLAGS below), - # NP_COMPILE_DEFINITIONS (used only in set_qt_properties function), - # NP_QT_INCLUDE_DIRECTORIES (used only in set_qt_properties function), and - # QT_LIBRARIES (used wherever link with qt libraries is needed) - # are now defined. + if(NOT PLPLOT_USE_QT5) + # Use a minimum version corresponding to the version installed by + # Debian Wheezy. I assume all other non-enterprise Linux distros, + # Mac OS X, and Windows platforms also give access to this version + # of Qt4 or later. + find_package(Qt4 4.8.2 COMPONENTS QtCore QtGui QtSvg) - # Only used for pkg-config case. - set(pc_qt_COMPILE_FLAGS ${QT_COMPILE_DEFINES} ${QT_INCLUDE_DIRECTORIES}) - string(REGEX REPLACE ";" " " pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") - # Work around pkg-config issues (see bug report - # <https://bugs.freedesktop.org/show_bug.cgi?id=72584>) with - # multiple -isystem tags by replacing them with "-I" - string(REGEX REPLACE "-isystem " "-I" pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") - message(STATUS "pc_qt_COMPILE_FLAGS = ${pc_qt_COMPILE_FLAGS}") + # QT4_FOUND is defined to be true or false by find_package(Qt4 ...) + if(QT4_FOUND) + # Do not include(${QT_USE_FILE}) here because it contaminates ALL + # compile properties with Qt flags from (this) top-level directory + # on down. Use this alternative instead which includes a function + # set_qt_target_properties which should be called with the + # appropriate target argument whenever a Qt4-related target is built. + include(ndp_UseQt4) - # These two must be explicitly empty since other alternative means - # are used. - set(qt_COMPILE_FLAGS) - set(qt_LINK_FLAGS) + # QT_COMPILE_DEFINITIONS (used only for pc_qt_COMPILE_FLAGS below), + # QT_INCLUDE_DIRECTORIES (used only for pc_qt_COMPILE_FLAGS below), + # NP_COMPILE_DEFINITIONS (used only in set_qt_properties function), + # NP_QT_INCLUDE_DIRECTORIES (used only in set_qt_properties function), and + # QT_LIBRARIES (used wherever link with qt libraries is needed) + # are now defined. - # ${QT_LIBRARY_DIR} defined by above find_package(Qt4 ...) call. - set(qt_RPATH ${QT_LIBRARY_DIR}) - filter_rpath(qt_RPATH) - #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}") - else(QT4_FOUND) - message(STATUS "WARNING: Suitable Qt4 development environment not found so disabling Qt bindings." - ) - set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) - endif(QT4_FOUND) + # Only used for pkg-config case. + set(pc_qt_COMPILE_FLAGS ${QT_COMPILE_DEFINES} ${QT_INCLUDE_DIRECTORIES}) + string(REGEX REPLACE ";" " " pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") + # Work around pkg-config issues (see bug report + # <https://bugs.freedesktop.org/show_bug.cgi?id=72584>) with + # multiple -isystem tags by replacing them with "-I" + string(REGEX REPLACE "-isystem " "-I" pc_qt_COMPILE_FLAGS "${pc_qt_COMPILE_FLAGS}") + message(STATUS "pc_qt_COMPILE_FLAGS = ${pc_qt_COMPILE_FLAGS}") + + # These two must be explicitly empty since other alternative means + # are used. + set(qt_COMPILE_FLAGS) + set(qt_LINK_FLAGS) + + # ${QT_LIBRARY_DIR} defined by above find_package(Qt4 ...) call. + set(qt_RPATH ${QT_LIBRARY_DIR}) + filter_rpath(qt_RPATH) + #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}") + else(QT4_FOUND) + message(STATUS "WARNING: Suitable Qt4 development environment not found so disabling Qt bindings." + ) + set(ENABLE_qt OFF CACHE BOOL "Enable Qt bindings" FORCE) + endif(QT4_FOUND) + endif(NOT PLPLOT_USE_QT5) endif(ENABLE_qt) # All qt devices depend on ENABLE_qt @@ -177,11 +191,22 @@ set(ENABLE_pyqt4 OFF CACHE BOOL "Enable pyqt4 Python extension module " FORCE) endif(ENABLE_pyqt4 AND NOT ENABLE_qt) -if(ENABLE_qt) +## FIXME if/when there is a way to make pyqt work with Qt5. +if(ENABLE_pyqt4 AND PLPLOT_USE_QT5) + message(STATUS + "WARNING: PLPLOT_USE_QT5 is ON so " + "setting ENABLE_pyqt4 to OFF." + ) + set(ENABLE_pyqt4 OFF CACHE BOOL "Enable pyqt4 Python extension module " FORCE) +endif(ENABLE_pyqt4 AND PLPLOT_USE_QT5) + +## FIXME when a method has been found to use Qt5 with the traditional +## Makefile + pkg-config build system for the installed examples. +if(ENABLE_qt AND NOT PLPLOT_USE_QT5) set(qt_gui_true "") -else(ENABLE_qt) +else(ENABLE_qt AND NOT PLPLOT_USE_QT5) set(qt_gui_true "#") -endif(ENABLE_qt) +endif(ENABLE_qt AND NOT PLPLOT_USE_QT5) if(ANY_QT_DEVICE) if(ENABLE_DYNDRIVERS) Modified: trunk/drivers/CMakeLists.txt =================================================================== --- trunk/drivers/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/drivers/CMakeLists.txt 2014-03-12 20:54:20 UTC (rev 13050) @@ -106,27 +106,40 @@ if(SOURCE_ROOT_NAME STREQUAL "qt") if(ANY_QT_DEVICE) add_library(${SOURCE_ROOT_NAME} MODULE ${${SOURCE_ROOT_NAME}_SOURCE}) - if(NOT ENABLE_qt) - # Note this code is never executed considering the way the - # build system is set up now (see cmake/modules/qt.cmake), - # but nevertheless keep it for the future in case we ever - # want to deal with the case where we want to build the qt - # device without building the plplotqtd library - add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) - endif(NOT ENABLE_qt) - if(NOT QT_LIBRARIES) - message(FATAL_ERROR "Internal build system inconsistency. QT_LIBRARIESis empty but it should be populated") - endif(NOT QT_LIBRARIES) - - target_link_libraries( - ${SOURCE_ROOT_NAME} - plplot${LIB_TAG} - ${MATH_LIB} - ${QT_LIBRARIES} - ${${SOURCE_ROOT_NAME}_TARGETS} - ) - # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES - set_qt_target_properties(${SOURCE_ROOT_NAME}) + if(PLPLOT_USE_QT5) + # According to advice from Steve Kelly on the Cmake list, QtGui + # is a dependency of QtSvg so is not needed here, but I will + # leave it in since it is informative. + qt5_use_modules(${SOURCE_ROOT_NAME} QtSvg QtGui) + target_link_libraries( + ${SOURCE_ROOT_NAME} + plplot${LIB_TAG} + ${MATH_LIB} + ${${SOURCE_ROOT_NAME}_TARGETS} + ) + else(PLPLOT_USE_QT5) + if(NOT ENABLE_qt) + # Note this code is never executed considering the way the + # build system is set up now (see cmake/modules/qt.cmake), + # but nevertheless keep it for the future in case we ever + # want to deal with the case where we want to build the qt + # device without building the plplotqtd library + add_dependencies(${SOURCE_ROOT_NAME} moc_outfile_generated) + endif(NOT ENABLE_qt) + if(NOT QT_LIBRARIES) + message(FATAL_ERROR "Internal build system inconsistency. QT_LIBRARIESis empty but it should be populated") + endif(NOT QT_LIBRARIES) + + target_link_libraries( + ${SOURCE_ROOT_NAME} + plplot${LIB_TAG} + ${MATH_LIB} + ${QT_LIBRARIES} + ${${SOURCE_ROOT_NAME}_TARGETS} + ) + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(${SOURCE_ROOT_NAME}) + endif(PLPLOT_USE_QT5) else(ANY_QT_DEVICE) message(FATAL_ERROR "Internal build system inconsistency. Attempt to build dynamic qt device when ANY_QT_DEVICE is false.") endif(ANY_QT_DEVICE) Modified: trunk/examples/c++/CMakeLists.txt =================================================================== --- trunk/examples/c++/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/examples/c++/CMakeLists.txt 2014-03-12 20:54:20 UTC (rev 13050) @@ -142,7 +142,8 @@ target_link_libraries(wxPLplotDemo plplotwxwidgets${LIB_TAG} plplotcxx${LIB_TAG} ${wxwidgets_LINK_FLAGS} ${MATH_LIB}) endif(ENABLE_wxwidgets) - if(ENABLE_qt) +## FIXME for the case when PLPLOT_USE_QT5 is ON. + if(ENABLE_qt AND NOT PLPLOT_USE_QT5) if(CORE_BUILD) set(BUILD_qt_example ON) if(NOT QT_LIBRARIES) @@ -181,5 +182,5 @@ # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES set_qt_target_properties(qt_example) endif(BUILD_qt_example) - endif(ENABLE_qt) + endif(ENABLE_qt AND NOT PLPLOT_USE_QT5) endif(BUILD_TEST) Modified: trunk/include/CMakeLists.txt =================================================================== --- trunk/include/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/include/CMakeLists.txt 2014-03-12 20:54:20 UTC (rev 13050) @@ -120,23 +120,29 @@ list(APPEND MOC_OPTIONS -DPLD_extqt) endif(PLD_extqt) if(MOC_OPTIONS) - # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. - qt4_wrap_cpp( - QT_MOC_OUTFILES - ${CMAKE_SOURCE_DIR}/include/qt.h - OPTIONS ${MOC_OPTIONS} - ) - # Use custom target to force correct target dependencies in - # various directories. This target is used in three possible - # places (qt_gui, drivers, or src) depending on build options. - # The CMake dependency parser creates the necessary file - # dependency on qt.h for all qt-related source code so there is no - # need to add the ${QT_MOC_OUTFILES} file dependencies for any - # target dependency on moc_outfiles_generated. - add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) + # Use entirely different method for Qt5. + if(NOT PLPLOT_USE_QT5) + # This creates a custom command with OUTPUT ${QT_MOC_OUTFILES}. + qt4_wrap_cpp( + QT_MOC_OUTFILES + ${CMAKE_SOURCE_DIR}/include/qt.h + OPTIONS ${MOC_OPTIONS} + ) + # Use custom target to force correct target dependencies in + # various directories. This target is used in three possible + # places (qt_gui, drivers, or src) depending on build options. + # The CMake dependency parser creates the necessary file + # dependency on qt.h for all qt-related source code so there is no + # need to add the ${QT_MOC_OUTFILES} file dependencies for any + # target dependency on moc_outfiles_generated. + add_custom_target(moc_outfile_generated DEPENDS ${QT_MOC_OUTFILES}) + endif(NOT PLPLOT_USE_QT5) # #include ${QT_MOC_OUTFILES}) indirectly via the configured moc_files.h # header. + # This header is #included by plqt.cpp so must be configured regardless + # of whether Qt4 or Qt5 is being used although it is effectively empty + # in the latter case. configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/moc_files.h.in ${CMAKE_CURRENT_BINARY_DIR}/moc_files.h Modified: trunk/include/moc_files.h.in =================================================================== --- trunk/include/moc_files.h.in 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/include/moc_files.h.in 2014-03-12 20:54:20 UTC (rev 13050) @@ -1,6 +1,7 @@ // Configured header file listing the moc-generated files to include in plqt.cpp. #ifndef __MOC_FILES_H__ #define __MOC_FILES_H__ - +#ifndef PLPLOT_USE_QT5 #include "@QT_MOC_OUTFILES@" -#endif // __MOC_FILES_H__i +#endif +#endif // __MOC_FILES_H__ Modified: trunk/plplot_config.h.in =================================================================== --- trunk/plplot_config.h.in 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/plplot_config.h.in 2014-03-12 20:54:20 UTC (rev 13050) @@ -306,3 +306,6 @@ // Define as `fork' if `vfork' does not work. #cmakedefine vfork + +// Define if the PLplot build uses Qt5 (rather than Qt4). +#cmakedefine PLPLOT_USE_QT5 Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) +++ trunk/src/CMakeLists.txt 2014-03-12 20:54:20 UTC (rev 13050) @@ -120,16 +120,20 @@ foreach(SOURCE_ROOT_NAME ${DRIVERS_LIST}) #message("${SOURCE_ROOT_NAME}_SOURCE = ${${SOURCE_ROOT_NAME}_SOURCE}") list(APPEND plplot${LIB_TAG}_LIB_SRCS ${${SOURCE_ROOT_NAME}_SOURCE}) + if(SOURCE_ROOT_NAME STREQUAL "qt") if(ANY_QT_DEVICE) # For this case libplot must have a target dependency on the # moc files generated in the binary include directory. set(qt_dependency moc_outfile_generated) - if(NOT QT_LIBRARIES) - message(FATAL_ERROR "include(${QT_USE_FILE}) failed in src subdirectory.") - endif(NOT QT_LIBRARIES) - set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${QT_LIBRARIES}) + # Qt5 handled a completely different way. + if(NOT PLPLOT_USE_QT5) + if(NOT QT_LIBRARIES) + message(FATAL_ERROR "include(${QT_USE_FILE}) failed in src subdirectory.") + endif(NOT QT_LIBRARIES) + set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${QT_LIBRARIES}) + endif(NOT PLPLOT_USE_QT5) else(ANY_QT_DEVICE) message(FATAL_ERROR "Internal build system inconsistency. Attempt to build static qt device when ANY_QT_DEVICE is false.") @@ -180,6 +184,13 @@ add_library(plplot${LIB_TAG} ${plplot${LIB_TAG}_LIB_SRCS}) add_dependencies(plplot${LIB_TAG} plhershey-unicode.h_built ${qt_dependency}) +if(NOT ENABLE_DYNDRIVERS AND ANY_QT_DEVICE AND PLPLOT_USE_QT5) + # According to advice from Steve Kelly on the Cmake list, QtGui + # is a dependency of QtSvg so is not needed here, but I will + # leave it in since it is informative. + qt5_use_modules(plplot${LIB_TAG} QtSvg QtGui) +endif(NOT ENABLE_DYNDRIVERS AND ANY_QT_DEVICE AND PLPLOT_USE_QT5) + if(NON_TRANSITIVE) # empty list ==> non-transitive linking for everything that links to # libplplotd in the shared libraries case. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-12 05:25:08
|
Revision: 13049 http://sourceforge.net/p/plplot/code/13049 Author: airwin Date: 2014-03-12 05:25:04 +0000 (Wed, 12 Mar 2014) Log Message: ----------- Until http://sourceforge.net/p/plplot/bugs/144/ is fixed, temporarily remove test_pltcl_standard_examples as a dependency of more general test targets on the affected platforms (only WIN32_AND_NOT_CYGWIN as far as I can tell) so those more general targets do not error out because of this bug. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2014-03-09 19:12:43 UTC (rev 13048) +++ trunk/examples/CMakeLists.txt 2014-03-12 05:25:04 UTC (rev 13049) @@ -934,7 +934,14 @@ if(FILE_DEPENDS_${generic_interactive_device}) add_dependencies(test_pltcl_standard_examples test_${generic_interactive_device}_dyndriver) endif(FILE_DEPENDS_${generic_interactive_device}) - list(APPEND interactive_targets_LIST test_pltcl_standard_examples) + if(WIN32_AND_NOT_CYGWIN) + message(STATUS "WARNING: The test_pltcl_standard_examples target can be run independently on + the Windows platform, but it generates an unhandled exception at the end so + it is temporarily excluded from being a dependency of other more general + interactive test targets") + else(WIN32_AND_NOT_CYGWIN) + list(APPEND interactive_targets_LIST test_pltcl_standard_examples) + endif(WIN32_AND_NOT_CYGWIN) if(BUILD_SHARED_LIBS) # tests that use "package require Pltcl" only work if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-09 19:12:47
|
Revision: 13048 http://sourceforge.net/p/plplot/code/13048 Author: airwin Date: 2014-03-09 19:12:43 +0000 (Sun, 09 Mar 2014) Log Message: ----------- Improve PLplot version information for the installed headers. Propagate PLPLOT_VERSION macro to the installed headers. #define and propagate PLPLOT_VERSION_MAJOR, PLPLOT_VERSION_MINOR, and PLPLOT_VERSION_PATCH to the installed headers. Modified Paths: -------------- trunk/cmake/modules/plplot_version.cmake trunk/include/plConfig.h.in trunk/plplot_config.h.in Modified: trunk/cmake/modules/plplot_version.cmake =================================================================== --- trunk/cmake/modules/plplot_version.cmake 2014-03-09 18:54:17 UTC (rev 13047) +++ trunk/cmake/modules/plplot_version.cmake 2014-03-09 19:12:43 UTC (rev 13048) @@ -4,13 +4,17 @@ # Version data that need review and possible modification for each release. +set(PLPLOT_VERSION_MAJOR 5) +set(PLPLOT_VERSION_MINOR 10) +set(PLPLOT_VERSION_PATCH 0) + # Overall PLplot version number. -set(PLPLOT_VERSION 5.10.0) +set(PLPLOT_VERSION ${PLPLOT_VERSION_MAJOR}.${PLPLOT_VERSION_MINOR}.${PLPLOT_VERSION_PATCH}) # CPack version numbers for release tarball name. -set(CPACK_PACKAGE_VERSION_MAJOR 5) -set(CPACK_PACKAGE_VERSION_MINOR 10) -set(CPACK_PACKAGE_VERSION_PATCH 0) +set(CPACK_PACKAGE_VERSION_MAJOR ${PLPLOT_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${PLPLOT_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${PLPLOT_VERSION_PATCH}) # PLplot library version information. Modified: trunk/include/plConfig.h.in =================================================================== --- trunk/include/plConfig.h.in 2014-03-09 18:54:17 UTC (rev 13047) +++ trunk/include/plConfig.h.in 2014-03-09 19:12:43 UTC (rev 13048) @@ -47,6 +47,12 @@ # include <plplot_config.h> #endif +// PLplot version information. +#define PLPLOT_VERSION_MAJOR "@PLPLOT_VERSION_MAJOR@" +#define PLPLOT_VERSION_MINOR "@PLPLOT_VERSION_MINOR@" +#define PLPLOT_VERSION_PATCH "@PLPLOT_VERSION_PATCH@" +#define PLPLOT_VERSION "@PLPLOT_VERSION@" + // Define if you have c++ accessible stdint.h #cmakedefine PL_HAVE_CXX_STDINT_H Modified: trunk/plplot_config.h.in =================================================================== --- trunk/plplot_config.h.in 2014-03-09 18:54:17 UTC (rev 13047) +++ trunk/plplot_config.h.in 2014-03-09 19:12:43 UTC (rev 13048) @@ -282,9 +282,6 @@ // Define to 1 if you have the ANSI C header files. #cmakedefine STDC_HEADERS 1 -// Overall PLplot version number -#define PLPLOT_VERSION "@PLPLOT_VERSION@" - // Location of Tcl stuff #define TCL_DIR "@TCL_DIR@" // Consistent package versions for Itcl and friends found by PLplot This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-09 18:54:18
|
Revision: 13047 http://sourceforge.net/p/plplot/code/13047 Author: airwin Date: 2014-03-09 18:54:17 +0000 (Sun, 09 Mar 2014) Log Message: ----------- Tweak commentary. Modified Paths: -------------- trunk/bindings/tk/plserver.c Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2014-03-06 17:56:23 UTC (rev 13046) +++ trunk/bindings/tk/plserver.c 2014-03-09 18:54:17 UTC (rev 13047) @@ -118,8 +118,8 @@ #endif // According to both Linux and Windows documentation, - // argv is actually argc+1 in length with the last element pointing - // to NULL. So leave room for that. + // argv is actually argc+1 in length with the last element set to + // the NULL value. So leave room for that last element. myargv = (const char **) malloc( ( argc + 1 ) * sizeof ( char * ) ); for ( i = 0; i < argc + 1; i++ ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-06 17:56:26
|
Revision: 13046 http://sourceforge.net/p/plplot/code/13046 Author: airwin Date: 2014-03-06 17:56:23 +0000 (Thu, 06 Mar 2014) Log Message: ----------- Set svn:eol-style property to native. Modified Paths: -------------- trunk/cmake/modules/FindFreetype.cmake trunk/cmake/modules/FindwxWidgets.cmake Property Changed: ---------------- trunk/cmake/modules/FindFreetype.cmake trunk/cmake/modules/FindwxWidgets.cmake Modified: trunk/cmake/modules/FindFreetype.cmake =================================================================== --- trunk/cmake/modules/FindFreetype.cmake 2014-03-06 13:26:33 UTC (rev 13045) +++ trunk/cmake/modules/FindFreetype.cmake 2014-03-06 17:56:23 UTC (rev 13046) @@ -1,142 +1,142 @@ -#.rst: -# FindFreetype -# ------------ -# -# Locate FreeType library -# -# This module defines -# -# :: -# -# FREETYPE_LIBRARIES, the library to link against -# FREETYPE_FOUND, if false, do not try to link to FREETYPE -# FREETYPE_INCLUDE_DIRS, where to find headers. -# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) -# This is the concatenation of the paths: -# FREETYPE_INCLUDE_DIR_ft2build -# FREETYPE_INCLUDE_DIR_freetype2 -# -# -# -# $FREETYPE_DIR is an environment variable that would correspond to the -# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Created by Eric Wing. -# Modifications by Alexander Neundorf. -# This file has been renamed to "FindFreetype.cmake" instead of the correct -# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. - -# Ugh, FreeType seems to use some #include trickery which -# makes this harder than it should be. It looks like they -# put ft2build.h in a common/easier-to-find location which -# then contains a #include to a more specific header in a -# more specific location (#include <freetype/config/ftheader.h>). -# Then from there, they need to set a bunch of #define's -# so you can do something like: -# #include FT_FREETYPE_H -# Unfortunately, using CMake's mechanisms like include_directories() -# wants explicit full paths and this trickery doesn't work too well. -# I'm going to attempt to cut out the middleman and hope -# everything still works. -find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include -) - -find_path(FREETYPE_INCLUDE_DIR_freetype2 - NAMES - freetype/config/ftheader.h - config/ftheader.h - HINTS - ENV FREETYPE_DIR - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include -) - -find_library(FREETYPE_LIBRARY - NAMES freetype libfreetype freetype219 - HINTS - ENV FREETYPE_DIR - PATH_SUFFIXES lib - PATHS - /usr/X11R6 - /usr/local/X11R6 - /usr/local/X11 - /usr/freeware - ENV GTKMM_BASEPATH - [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] -) - -# set the user variables -if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) - set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") - list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) -endif() -set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") - -if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") - set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") -elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") - set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") -endif() - -if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) - file(STRINGS "${FREETYPE_H}" freetype_version_str - REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") - - unset(FREETYPE_VERSION_STRING) - foreach(VPART MAJOR MINOR PATCH) - foreach(VLINE ${freetype_version_str}) - if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}") - string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1" - FREETYPE_VERSION_PART "${VLINE}") - if(FREETYPE_VERSION_STRING) - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") - else() - set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") - endif() - unset(FREETYPE_VERSION_PART) - endif() - endforeach() - endforeach() -endif() - - -# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if -# all listed variables are TRUE -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype - REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS - VERSION_VAR FREETYPE_VERSION_STRING) - -mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) +#.rst: +# FindFreetype +# ------------ +# +# Locate FreeType library +# +# This module defines +# +# :: +# +# FREETYPE_LIBRARIES, the library to link against +# FREETYPE_FOUND, if false, do not try to link to FREETYPE +# FREETYPE_INCLUDE_DIRS, where to find headers. +# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) +# This is the concatenation of the paths: +# FREETYPE_INCLUDE_DIR_ft2build +# FREETYPE_INCLUDE_DIR_freetype2 +# +# +# +# $FREETYPE_DIR is an environment variable that would correspond to the +# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# Created by Eric Wing. +# Modifications by Alexander Neundorf. +# This file has been renamed to "FindFreetype.cmake" instead of the correct +# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. + +# Ugh, FreeType seems to use some #include trickery which +# makes this harder than it should be. It looks like they +# put ft2build.h in a common/easier-to-find location which +# then contains a #include to a more specific header in a +# more specific location (#include <freetype/config/ftheader.h>). +# Then from there, they need to set a bunch of #define's +# so you can do something like: +# #include FT_FREETYPE_H +# Unfortunately, using CMake's mechanisms like include_directories() +# wants explicit full paths and this trickery doesn't work too well. +# I'm going to attempt to cut out the middleman and hope +# everything still works. +find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + HINTS + ENV FREETYPE_DIR + PATHS + /usr/X11R6 + /usr/local/X11R6 + /usr/local/X11 + /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + PATH_SUFFIXES include/freetype2 include +) + +find_path(FREETYPE_INCLUDE_DIR_freetype2 + NAMES + freetype/config/ftheader.h + config/ftheader.h + HINTS + ENV FREETYPE_DIR + PATHS + /usr/X11R6 + /usr/local/X11R6 + /usr/local/X11 + /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + PATH_SUFFIXES include/freetype2 include +) + +find_library(FREETYPE_LIBRARY + NAMES freetype libfreetype freetype219 + HINTS + ENV FREETYPE_DIR + PATH_SUFFIXES lib + PATHS + /usr/X11R6 + /usr/local/X11R6 + /usr/local/X11 + /usr/freeware + ENV GTKMM_BASEPATH + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] +) + +# set the user variables +if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) + set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") + list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) +endif() +set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") + +if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") +elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") +endif() + +if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) + file(STRINGS "${FREETYPE_H}" freetype_version_str + REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") + + unset(FREETYPE_VERSION_STRING) + foreach(VPART MAJOR MINOR PATCH) + foreach(VLINE ${freetype_version_str}) + if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}") + string(REGEX REPLACE "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$" "\\1" + FREETYPE_VERSION_PART "${VLINE}") + if(FREETYPE_VERSION_STRING) + set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}") + else() + set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}") + endif() + unset(FREETYPE_VERSION_PART) + endif() + endforeach() + endforeach() +endif() + + +# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype + REQUIRED_VARS FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS + VERSION_VAR FREETYPE_VERSION_STRING) + +mark_as_advanced(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) Property changes on: trunk/cmake/modules/FindFreetype.cmake ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/cmake/modules/FindwxWidgets.cmake =================================================================== --- trunk/cmake/modules/FindwxWidgets.cmake 2014-03-06 13:26:33 UTC (rev 13045) +++ trunk/cmake/modules/FindwxWidgets.cmake 2014-03-06 17:56:23 UTC (rev 13046) @@ -1,1104 +1,1104 @@ -#.rst: -# FindwxWidgets -# ------------- -# -# Find a wxWidgets (a.k.a., wxWindows) installation. -# -# This module finds if wxWidgets is installed and selects a default -# configuration to use. wxWidgets is a modular library. To specify the -# modules that you will use, you need to name them as components to the -# package: -# -# find_package(wxWidgets COMPONENTS core base ...) -# -# There are two search branches: a windows style and a unix style. For -# windows, the following variables are searched for and set to defaults -# in case of multiple choices. Change them if the defaults are not -# desired (i.e., these are the only variables you should change to -# select a configuration): -# -# :: -# -# wxWidgets_ROOT_DIR - Base wxWidgets directory -# (e.g., C:/wxWidgets-2.6.3). -# wxWidgets_LIB_DIR - Path to wxWidgets libraries -# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). -# wxWidgets_CONFIGURATION - Configuration to use -# (e.g., msw, mswd, mswu, mswunivud, etc.) -# wxWidgets_EXCLUDE_COMMON_LIBRARIES -# - Set to TRUE to exclude linking of -# commonly required libs (e.g., png tiff -# jpeg zlib regex expat). -# -# -# -# For unix style it uses the wx-config utility. You can select between -# debug/release, unicode/ansi, universal/non-universal, and -# static/shared in the QtDialog or ccmake interfaces by turning ON/OFF -# the following variables: -# -# :: -# -# wxWidgets_USE_DEBUG -# wxWidgets_USE_UNICODE -# wxWidgets_USE_UNIVERSAL -# wxWidgets_USE_STATIC -# -# -# -# There is also a wxWidgets_CONFIG_OPTIONS variable for all other -# options that need to be passed to the wx-config utility. For example, -# to use the base toolkit found in the /usr/local path, set the variable -# (before calling the FIND_PACKAGE command) as such: -# -# :: -# -# set(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr) -# -# -# -# The following are set after the configuration is done for both windows -# and unix style: -# -# :: -# -# wxWidgets_FOUND - Set to TRUE if wxWidgets was found. -# wxWidgets_INCLUDE_DIRS - Include directories for WIN32 -# i.e., where to find "wx/wx.h" and -# "wx/setup.h"; possibly empty for unices. -# wxWidgets_LIBRARIES - Path to the wxWidgets libraries. -# wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for -# rpath on UNIX. Typically an empty string -# in WIN32 environment. -# wxWidgets_DEFINITIONS - Contains defines required to compile/link -# against WX, e.g. WXUSINGDLL -# wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link -# against WX debug builds, e.g. __WXDEBUG__ -# wxWidgets_CXX_FLAGS - Include dirs and compiler flags for -# unices, empty on WIN32. Essentially -# "`wx-config --cxxflags`". -# wxWidgets_USE_FILE - Convenience include file. -# -# -# -# Sample usage: -# -# :: -# -# # Note that for MinGW users the order of libs is important! -# find_package(wxWidgets COMPONENTS net gl core base) -# if(wxWidgets_FOUND) -# include(${wxWidgets_USE_FILE}) -# # and for each of your dependent executable/library targets: -# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES}) -# endif() -# -# -# -# If wxWidgets is required (i.e., not an optional part): -# -# :: -# -# find_package(wxWidgets REQUIRED net gl core base) -# include(${wxWidgets_USE_FILE}) -# # and for each of your dependent executable/library targets: -# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES}) - -#============================================================================= -# Copyright 2004-2009 Kitware, Inc. -# Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# -# FIXME: check this and provide a correct sample usage... -# Remember to connect back to the upper text. -# Sample usage with monolithic wx build: -# -# find_package(wxWidgets COMPONENTS mono) -# ... - -# NOTES -# -# This module has been tested on the WIN32 platform with wxWidgets -# 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to -# easily extend support to all possible builds, e.g., static/shared, -# debug/release, unicode, universal, multilib/monolithic, etc.. -# -# If you want to use the module and your build type is not supported -# out-of-the-box, please contact me to exchange information on how -# your system is setup and I'll try to add support for it. -# -# AUTHOR -# -# Miguel A. Figueroa-Villanueva (miguelf at ieee dot org). -# Jan Woetzel (jw at mip.informatik.uni-kiel.de). -# -# Based on previous works of: -# Jan Woetzel (FindwxWindows.cmake), -# Jorgen Bodde and Jerry Fath (FindwxWin.cmake). - -# TODO/ideas -# -# (1) Option/Setting to use all available wx libs -# In contrast to expert developer who lists the -# minimal set of required libs in wxWidgets_USE_LIBS -# there is the newbie user: -# - who just wants to link against WX with more 'magic' -# - doesn't know the internal structure of WX or how it was built, -# in particular if it is monolithic or not -# - want to link against all available WX libs -# Basically, the intent here is to mimic what wx-config would do by -# default (i.e., `wx-config --libs`). -# -# Possible solution: -# Add a reserved keyword "std" that initializes to what wx-config -# would default to. If the user has not set the wxWidgets_USE_LIBS, -# default to "std" instead of "base core" as it is now. To implement -# "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe -# checking whether a minimal set was found. - - -# FIXME: This and all the DBG_MSG calls should be removed after the -# module stabilizes. -# -# Helper macro to control the debugging output globally. There are -# two versions for controlling how verbose your output should be. -macro(DBG_MSG _MSG) -# message(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -endmacro() -macro(DBG_MSG_V _MSG) -# message(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -endmacro() - -# Clear return values in case the module is loaded more than once. -set(wxWidgets_FOUND FALSE) -set(wxWidgets_INCLUDE_DIRS "") -set(wxWidgets_LIBRARIES "") -set(wxWidgets_LIBRARY_DIRS "") -set(wxWidgets_CXX_FLAGS "") - -# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on -# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM -# to prevent UsewxWidgets.cmake from using SYSTEM. -# -# See cmake mailing list discussions for more info: -# http://www.cmake.org/pipermail/cmake/2008-April/021115.html -# http://www.cmake.org/pipermail/cmake/2008-April/021146.html -# -if(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD") - set(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) -endif() - -# DEPRECATED: This is a patch to support the DEPRECATED use of -# wxWidgets_USE_LIBS. -# -# If wxWidgets_USE_LIBS is set: -# - if using <components>, then override wxWidgets_USE_LIBS -# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS -if(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) - set(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) -endif() -DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") - -# Add the convenience use file if available. -# -# Get dir of this file which may reside in: -# - CMAKE_MAKE_ROOT/Modules on CMake installation -# - CMAKE_MODULE_PATH if user prefers his own specialized version -set(wxWidgets_USE_FILE "") -get_filename_component( - wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -# Prefer an existing customized version, but the user might override -# the FindwxWidgets module and not the UsewxWidgets one. -if(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") - set(wxWidgets_USE_FILE - "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") -else() - set(wxWidgets_USE_FILE UsewxWidgets) -endif() - -#===================================================================== -#===================================================================== -if(WIN32 AND NOT CYGWIN AND NOT MSYS) - set(wxWidgets_FIND_STYLE "win32") -else() - if(UNIX OR MSYS) - set(wxWidgets_FIND_STYLE "unix") - endif() -endif() - -#===================================================================== -# WIN32_FIND_STYLE -#===================================================================== -if(wxWidgets_FIND_STYLE STREQUAL "win32") - # Useful common wx libs needed by almost all components. - set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) - - # DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead. - if(NOT wxWidgets_FIND_COMPONENTS) - if(wxWidgets_USE_MONOLITHIC) - set(wxWidgets_FIND_COMPONENTS mono) - else() - set(wxWidgets_FIND_COMPONENTS core base) # this is default - endif() - endif() - - # Add the common (usually required libs) unless - # wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set. - if(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES) - list(APPEND wxWidgets_FIND_COMPONENTS - ${wxWidgets_COMMON_LIBRARIES}) - endif() - - #------------------------------------------------------------------- - # WIN32: Helper MACROS - #------------------------------------------------------------------- - # - # Get filename components for a configuration. For example, - # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d - # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG="" - # - macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG) - string(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}") - string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") - if(${_UCD} STREQUAL ${_CONFIGURATION}) - set(${_UCD} "") - endif() - string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") - endmacro() - - # - # Find libraries associated to a configuration. - # - macro(WX_FIND_LIBS _UNV _UCD _DBG) - DBG_MSG_V("m_unv = ${_UNV}") - DBG_MSG_V("m_ucd = ${_UCD}") - DBG_MSG_V("m_dbg = ${_DBG}") - - # FIXME: What if both regex libs are available. regex should be - # found outside the loop and only wx${LIB}${_UCD}${_DBG}. - # Find wxWidgets common libraries. - foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla) - find_library(WX_${LIB}${_DBG} - NAMES - wx${LIB}${_UCD}${_DBG} # for regex - wx${LIB}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - - # Find wxWidgets multilib base libraries. - find_library(WX_base${_DBG} - NAMES - wxbase30${_UCD}${_DBG} - wxbase29${_UCD}${_DBG} - wxbase28${_UCD}${_DBG} - wxbase27${_UCD}${_DBG} - wxbase26${_UCD}${_DBG} - wxbase25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_base${_DBG}) - foreach(LIB net odbc xml) - find_library(WX_${LIB}${_DBG} - NAMES - wxbase30${_UCD}${_DBG}_${LIB} - wxbase29${_UCD}${_DBG}_${LIB} - wxbase28${_UCD}${_DBG}_${LIB} - wxbase27${_UCD}${_DBG}_${LIB} - wxbase26${_UCD}${_DBG}_${LIB} - wxbase25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - - # Find wxWidgets monolithic library. - find_library(WX_mono${_DBG} - NAMES - wxmsw${_UNV}30${_UCD}${_DBG} - wxmsw${_UNV}29${_UCD}${_DBG} - wxmsw${_UNV}28${_UCD}${_DBG} - wxmsw${_UNV}27${_UCD}${_DBG} - wxmsw${_UNV}26${_UCD}${_DBG} - wxmsw${_UNV}25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_mono${_DBG}) - - # Find wxWidgets multilib libraries. - foreach(LIB core adv aui html media xrc dbgrid gl qa richtext - stc ribbon propgrid webview) - find_library(WX_${LIB}${_DBG} - NAMES - wxmsw${_UNV}30${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}27${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}26${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - mark_as_advanced(WX_${LIB}${_DBG}) - endforeach() - endmacro() - - # - # Clear all library paths, so that FIND_LIBRARY refinds them. - # - # Clear a lib, reset its found flag, and mark as advanced. - macro(WX_CLEAR_LIB _LIB) - set(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE) - set(${_LIB}_FOUND FALSE) - mark_as_advanced(${_LIB}) - endmacro() - # Clear all debug or release library paths (arguments are "d" or ""). - macro(WX_CLEAR_ALL_LIBS _DBG) - # Clear wxWidgets common libraries. - foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - - # Clear wxWidgets multilib base libraries. - WX_CLEAR_LIB(WX_base${_DBG}) - foreach(LIB net odbc xml) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - - # Clear wxWidgets monolithic library. - WX_CLEAR_LIB(WX_mono${_DBG}) - - # Clear wxWidgets multilib libraries. - foreach(LIB core adv aui html media xrc dbgrid gl qa richtext - stc ribbon propgrid) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - endforeach() - endmacro() - # Clear all wxWidgets debug libraries. - macro(WX_CLEAR_ALL_DBG_LIBS) - WX_CLEAR_ALL_LIBS("d") - endmacro() - # Clear all wxWidgets release libraries. - macro(WX_CLEAR_ALL_REL_LIBS) - WX_CLEAR_ALL_LIBS("") - endmacro() - - # - # Set the wxWidgets_LIBRARIES variable. - # Also, Sets output variable wxWidgets_FOUND to FALSE if it fails. - # - macro(WX_SET_LIBRARIES _LIBS _DBG) - DBG_MSG_V("Looking for ${${_LIBS}}") - if(WX_USE_REL_AND_DBG) - foreach(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB} and ${LIB}d") - DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}") - DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}") - if(WX_${LIB} AND WX_${LIB}d) - DBG_MSG_V("Found ${LIB} and ${LIB}d") - list(APPEND wxWidgets_LIBRARIES - debug ${WX_${LIB}d} optimized ${WX_${LIB}} - ) - else() - DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}") - set(wxWidgets_FOUND FALSE) - endif() - endforeach() - else() - foreach(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB}${_DBG}") - DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}") - if(WX_${LIB}${_DBG}) - DBG_MSG_V("Found ${LIB}${_DBG}") - list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) - else() - DBG_MSG_V( - "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}") - set(wxWidgets_FOUND FALSE) - endif() - endforeach() - endif() - - DBG_MSG_V("OpenGL") - list(FIND ${_LIBS} gl WX_USE_GL) - if(NOT WX_USE_GL EQUAL -1) - DBG_MSG_V("- is required.") - list(APPEND wxWidgets_LIBRARIES opengl32 glu32) - endif() - - list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) - endmacro() - - #------------------------------------------------------------------- - # WIN32: Start actual work. - #------------------------------------------------------------------- - - # Look for an installation tree. - find_path(wxWidgets_ROOT_DIR - NAMES include/wx/wx.h - PATHS - ENV wxWidgets_ROOT_DIR - ENV WXWIN - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x - C:/ - D:/ - ENV ProgramFiles - PATH_SUFFIXES - wxWidgets-3.0.0 - wxWidgets-2.9.5 - wxWidgets-2.9.4 - wxWidgets-2.9.3 - wxWidgets-2.9.2 - wxWidgets-2.9.1 - wxWidgets-2.9.0 - wxWidgets-2.8.9 - wxWidgets-2.8.8 - wxWidgets-2.8.7 - wxWidgets-2.8.6 - wxWidgets-2.8.5 - wxWidgets-2.8.4 - wxWidgets-2.8.3 - wxWidgets-2.8.2 - wxWidgets-2.8.1 - wxWidgets-2.8.0 - wxWidgets-2.7.4 - wxWidgets-2.7.3 - wxWidgets-2.7.2 - wxWidgets-2.7.1 - wxWidgets-2.7.0 - wxWidgets-2.7.0-1 - wxWidgets-2.6.4 - wxWidgets-2.6.3 - wxWidgets-2.6.2 - wxWidgets-2.6.1 - wxWidgets-2.5.4 - wxWidgets-2.5.3 - wxWidgets-2.5.2 - wxWidgets-2.5.1 - wxWidgets - DOC "wxWidgets base/installation directory" - ) - - # If wxWidgets_ROOT_DIR changed, clear lib dir. - if(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) - set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR} - CACHE INTERNAL "wxWidgets_ROOT_DIR") - set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" - CACHE PATH "Cleared." FORCE) - endif() - #include(CMakeDetermineCCompiler) - #message(STATUS "CMAKE_CROSSCOMPILING = ${CMAKE_CROSSCOMPILING}") - #message(STATUS "CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}") - #message(STATUS "MSVC_C_ARCHITECTURE_ID = ${MSVC_C_ARCHITECTURE_ID}") - #message(STATUS "MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") - #message(STATUS "CMAKE_CL_64 = ${CMAKE_CL_64}") - #message(STATUS "LIB = $ENV{LIB}") - #message(STATUS "GENERATOR = ${CMAKE_GENERATOR}") - if(WX_ROOT_DIR) - # Select one default tree inside the already determined wx tree. - # Prefer static/shared order usually consistent with build - # settings. - if(MINGW) - set(WX_LIB_DIR_PREFIX gcc) - #The following should check for compiling 64 bit with nmake or VS - #Check for use of 64 bit NMake Makefile generator or a Visual Studio XX Win64 generator - elseif(CMAKE_CL_64) - set(WX_LIB_DIR_PREFIX vc_x64) - #unfortunately the above doesn't work on my system - can't find why, but workaround below - #Check for vs64 bit - elseif(${CMAKE_GENERATOR} MATCHES "Win64$") - set(WX_LIB_DIR_PREFIX vc_x64) - #Check for nmake 64 bit - elseif(${CMAKE_GENERATOR} STREQUAL "NMake Makefiles") - set(WX_LIB_DIR_PREFIX vc) - foreach(ENVLIBDIR $ENV{LIB}) - if( ENVLIBDIR MATCHES "amd64$") - set(WX_LIB_DIR_PREFIX vc_x64) - endif() - endforeach() - else() - set(WX_LIB_DIR_PREFIX vc) - endif() - if(BUILD_SHARED_LIBS) - find_path(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib - DOC "Path to wxWidgets libraries" - NO_DEFAULT_PATH - ) - else() - find_path(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll - DOC "Path to wxWidgets libraries" - NO_DEFAULT_PATH - ) - endif() - - # If wxWidgets_LIB_DIR changed, clear all libraries. - if(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) - set(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR") - WX_CLEAR_ALL_DBG_LIBS() - WX_CLEAR_ALL_REL_LIBS() - endif() - - if(WX_LIB_DIR) - # If building shared libs, define WXUSINGDLL to use dllimport. - if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") - set(wxWidgets_DEFINITIONS WXUSINGDLL) - DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") - endif() - - # Search for available configuration types. - foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) - set(WX_${CFG}_FOUND FALSE) - if(EXISTS ${WX_LIB_DIR}/${CFG}) - list(APPEND WX_CONFIGURATION_LIST ${CFG}) - set(WX_${CFG}_FOUND TRUE) - set(WX_CONFIGURATION ${CFG}) - endif() - endforeach() - DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") - - if(WX_CONFIGURATION) - set(wxWidgets_FOUND TRUE) - - # If the selected configuration wasn't found force the default - # one. Otherwise, use it but still force a refresh for - # updating the doc string with the current list of available - # configurations. - if(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) - set(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - else() - set(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - endif() - - # If release config selected, and both release/debug exist. - if(WX_${wxWidgets_CONFIGURATION}d_FOUND) - option(wxWidgets_USE_REL_AND_DBG - "Use release and debug configurations?" TRUE) - set(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG}) - else() - # If the option exists (already in cache), force it false. - if(wxWidgets_USE_REL_AND_DBG) - set(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL - "No ${wxWidgets_CONFIGURATION}d found." FORCE) - endif() - set(WX_USE_REL_AND_DBG FALSE) - endif() - - # Get configuration parameters from the name. - WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) - - # Set wxWidgets lib setup include directory. - if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) - set(wxWidgets_INCLUDE_DIRS - ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) - else() - DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") - set(wxWidgets_FOUND FALSE) - endif() - - # Set wxWidgets main include directory. - if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) - list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) - else() - DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") - set(wxWidgets_FOUND FALSE) - endif() - - # Find wxWidgets libraries. - WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") - if(WX_USE_REL_AND_DBG) - WX_FIND_LIBS("${UNV}" "${UCD}" "d") - endif() - - # Settings for requested libs (i.e., include dir, libraries, etc.). - WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}") - - # Add necessary definitions for unicode builds - if("${UCD}" STREQUAL "u") - list(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE) - endif() - - # Add necessary definitions for debug builds - set(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__) - - endif() - endif() - endif() - -#===================================================================== -# UNIX_FIND_STYLE -#===================================================================== -else() - if(wxWidgets_FIND_STYLE STREQUAL "unix") - #----------------------------------------------------------------- - # UNIX: Helper MACROS - #----------------------------------------------------------------- - # - # Set the default values based on "wx-config --selected-config". - # - macro(WX_CONFIG_SELECT_GET_DEFAULT) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --selected-config - OUTPUT_VARIABLE _wx_selected_config - RESULT_VARIABLE _wx_result - ERROR_QUIET - ) - if(_wx_result EQUAL 0) - foreach(_opt_name debug static unicode universal) - string(TOUPPER ${_opt_name} _upper_opt_name) - if(_wx_selected_config MATCHES ".*${_opt_name}.*") - set(wxWidgets_DEFAULT_${_upper_opt_name} ON) - else() - set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endif() - endforeach() - else() - foreach(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL) - set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endforeach() - endif() - endmacro() - - # - # Query a boolean configuration option to determine if the system - # has both builds available. If so, provide the selection option - # to the user. - # - macro(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=yes - RESULT_VARIABLE _wx_result_yes - OUTPUT_QUIET - ERROR_QUIET - ) - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=no - RESULT_VARIABLE _wx_result_no - OUTPUT_QUIET - ERROR_QUIET - ) - string(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME) - if(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - option(wxWidgets_USE_${_UPPER_OPT_NAME} - ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}}) - else() - # If option exists (already in cache), force to available one. - if(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) - if(_wx_result_yes EQUAL 0) - set(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE) - else() - set(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE) - endif() - endif() - endif() - endmacro() - - # - # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting - # among multiple builds. - # - macro(WX_CONFIG_SELECT_SET_OPTIONS) - set(wxWidgets_SELECT_OPTIONS ${wxWidgets_CONFIG_OPTIONS}) - foreach(_opt_name debug static unicode universal) - string(TOUPPER ${_opt_name} _upper_opt_name) - if(DEFINED wxWidgets_USE_${_upper_opt_name}) - if(wxWidgets_USE_${_upper_opt_name}) - list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes) - else() - list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no) - endif() - endif() - endforeach() - endmacro() - - #----------------------------------------------------------------- - # UNIX: Start actual work. - #----------------------------------------------------------------- - # Support cross-compiling, only search in the target platform. - find_program(wxWidgets_CONFIG_EXECUTABLE wx-config - DOC "Location of wxWidgets library configuration provider binary (wx-config)." - ONLY_CMAKE_FIND_ROOT_PATH - ) - - if(wxWidgets_CONFIG_EXECUTABLE) - set(wxWidgets_FOUND TRUE) - - # get defaults based on "wx-config --selected-config" - WX_CONFIG_SELECT_GET_DEFAULT() - - # for each option: if both builds are available, provide option - WX_CONFIG_SELECT_QUERY_BOOL(debug "Use debug build?") - WX_CONFIG_SELECT_QUERY_BOOL(unicode "Use unicode build?") - WX_CONFIG_SELECT_QUERY_BOOL(universal "Use universal build?") - WX_CONFIG_SELECT_QUERY_BOOL(static "Link libraries statically?") - - # process selection to set wxWidgets_SELECT_OPTIONS - WX_CONFIG_SELECT_SET_OPTIONS() - DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}") - - # run the wx-config program to get cxxflags - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --cxxflags - OUTPUT_VARIABLE wxWidgets_CXX_FLAGS - RESULT_VARIABLE RET - ERROR_QUIET - ) - if(RET EQUAL 0) - string(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS) - separate_arguments(wxWidgets_CXX_FLAGS) - - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - # parse definitions from cxxflags; - # drop -D* from CXXFLAGS and the -D prefix - string(REGEX MATCHALL "-D[^;]+" - wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "-D[^;]+(;|$)" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE ";$" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-D" "" - wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}") - - # parse include dirs from cxxflags; drop -I prefix - string(REGEX MATCHALL "-I[^;]+" - wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "-I[^;]+;" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") - - DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") - DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - else() - set(wxWidgets_FOUND FALSE) - DBG_MSG_V( - "${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}") - endif() - - # run the wx-config program to get the libs - # - NOTE: wx-config doesn't verify that the libs requested exist - # it just produces the names. Maybe a TRY_COMPILE would - # be useful here... - string(REPLACE ";" "," - wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}") - execute_process( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS} - OUTPUT_VARIABLE wxWidgets_LIBRARIES - RESULT_VARIABLE RET - ERROR_QUIET - ) - if(RET EQUAL 0) - string(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES) - separate_arguments(wxWidgets_LIBRARIES) - string(REPLACE "-framework;" "-framework " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - string(REPLACE "-arch;" "-arch " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - string(REPLACE "-isysroot;" "-isysroot " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - - # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES) - string(REGEX MATCHALL "-L[^;]+" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}") - string(REPLACE "-L" "" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}") - - DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") - DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") - - else() - set(wxWidgets_FOUND FALSE) - DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}") - endif() - endif() - -#===================================================================== -# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE -#===================================================================== - else() - if(NOT wxWidgets_FIND_QUIETLY) - message(STATUS - "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" - " Platform unknown/unsupported. It's neither WIN32 nor UNIX " - "find style." - ) - endif() - endif() -endif() - -# Debug output: -DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") -DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}") -DBG_MSG("wxWidgets_LIBRARY_DIRS : ${wxWidgets_LIBRARY_DIRS}") -DBG_MSG("wxWidgets_LIBRARIES : ${wxWidgets_LIBRARIES}") -DBG_MSG("wxWidgets_CXX_FLAGS : ${wxWidgets_CXX_FLAGS}") -DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") - -#===================================================================== -#===================================================================== -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND) -# Maintain consistency with all other variables. -set(wxWidgets_FOUND ${WXWIDGETS_FOUND}) - -#===================================================================== -# Macros for use in wxWidgets apps. -# - This module will not fail to find wxWidgets based on the code -# below. Hence, it's required to check for validity of: -# -# wxWidgets_wxrc_EXECUTABLE -#===================================================================== - -# Resource file compiler. -find_program(wxWidgets_wxrc_EXECUTABLE wxrc - ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw - DOC "Location of wxWidgets resource file compiler binary (wxrc)" - ) - -# -# WX_SPLIT_ARGUMENTS_ON(<keyword> <left> <right> <arg1> <arg2> ...) -# -# Sets <left> and <right> to contain arguments to the left and right, -# respectively, of <keyword>. -# -# Example usage: -# function(WXWIDGETS_ADD_RESOURCES outfiles) -# WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN}) -# ... -# endfunction() -# -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C) -# -# NOTE: This is a generic piece of code that should be renamed to -# SPLIT_ARGUMENTS_ON and put in a file serving the same purpose as -# FindPackageStandardArgs.cmake. At the time of this writing -# FindQt4.cmake has a QT4_EXTRACT_OPTIONS, which I basically copied -# here a bit more generalized. So, there are already two find modules -# using this approach. -# -function(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar) - # FIXME: Document that the input variables will be cleared. - #list(APPEND ${_leftvar} "") - #list(APPEND ${_rightvar} "") - set(${_leftvar} "") - set(${_rightvar} "") - - set(_doing_right FALSE) - foreach(element ${ARGN}) - if("${element}" STREQUAL "${_keyword}") - set(_doing_right TRUE) - else() - if(_doing_right) - list(APPEND ${_rightvar} "${element}") - else() - list(APPEND ${_leftvar} "${element}") - endif() - endif() - endforeach() - - set(${_leftvar} ${${_leftvar}} PARENT_SCOPE) - set(${_rightvar} ${${_rightvar}} PARENT_SCOPE) -endfunction() - -# -# WX_GET_DEPENDENCIES_FROM_XML( -# <depends> -# <match_pattern> -# <clean_pattern> -# <xml_contents> -# <depends_path> -# ) -# -# FIXME: Add documentation here... -# -function(WX_GET_DEPENDENCIES_FROM_XML - _depends - _match_patt - _clean_patt - _xml_contents - _depends_path - ) - - string(REGEX MATCHALL - ${_match_patt} - dep_file_list - "${${_xml_contents}}" - ) - foreach(dep_file ${dep_file_list}) - string(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}") - - # make the file have an absolute path - if(NOT IS_ABSOLUTE "${dep_file}") - set(dep_file "${${_depends_path}}/${dep_file}") - endif() - - # append file to dependency list - list(APPEND ${_depends} "${dep_file}") - endforeach() - - set(${_depends} ${${_depends}} PARENT_SCOPE) -endfunction() - -# -# WXWIDGETS_ADD_RESOURCES(<sources> <xrc_files> -# OPTIONS <options> [NO_CPP_CODE]) -# -# Adds a custom command for resource file compilation of the -# <xrc_files> and appends the output files to <sources>. -# -# Example usages: -# WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc) -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx) -# -function(WXWIDGETS_ADD_RESOURCES _outfiles) - WX_SPLIT_ARGUMENTS_ON(OPTIONS rc_file_list rc_options ${ARGN}) - - # Parse files for dependencies. - set(rc_file_list_abs "") - set(rc_depends "") - foreach(rc_file ${rc_file_list}) - get_filename_component(depends_path ${rc_file} PATH) - - get_filename_component(rc_file_abs ${rc_file} ABSOLUTE) - list(APPEND rc_file_list_abs "${rc_file_abs}") - - # All files have absolute paths or paths relative to the location - # of the rc file. - file(READ "${rc_file_abs}" rc_file_contents) - - # get bitmap/bitmap2 files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<bitmap[^<]+" - "^<bitmap[^>]*>" - rc_file_contents - depends_path - ) - - # get url files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<url[^<]+" - "^<url[^>]*>" - rc_file_contents - depends_path - ) - - # get wxIcon files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<object[^>]*class=\"wxIcon\"[^<]+" - "^<object[^>]*>" - rc_file_contents - depends_path - ) - endforeach() - - # - # Parse options. - # - # If NO_CPP_CODE option specified, then produce .xrs file rather - # than a .cpp file (i.e., don't add the default --cpp-code option). - list(FIND rc_options NO_CPP_CODE index) - if(index EQUAL -1) - list(APPEND rc_options --cpp-code) - # wxrc's default output filename for cpp code. - set(outfile resource.cpp) - else() - list(REMOVE_AT rc_options ${index}) - # wxrc's default output filename for xrs file. - set(outfile resource.xrs) - endif() - - # Get output name for use in ADD_CUSTOM_COMMAND. - # - short option scanning - list(FIND rc_options -o index) - if(NOT index EQUAL -1) - math(EXPR filename_index "${index} + 1") - list(GET rc_options ${filename_index} outfile) - #list(REMOVE_AT rc_options ${index} ${filename_index}) - endif() - # - long option scanning - string(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}") - if(outfile_opt) - string(REPLACE "--output=" "" outfile "${outfile_opt}") - endif() - #string(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") - #string(REGEX REPLACE ";$" "" rc_options "${rc_options}") - - if(NOT IS_ABSOLUTE "${outfile}") - set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") - endif() - add_custom_command( - OUTPUT "${outfile}" - COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs} - DEPENDS ${rc_file_list_abs} ${rc_depends} - ) - - # Add generated header to output file list. - list(FIND rc_options -e short_index) - list(FIND rc_options --extra-cpp-code long_index) - if(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) - get_filename_component(outfile_ext ${outfile} EXT) - string(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}") - list(APPEND ${_outfiles} "${outfile_header}") - set_source_files_properties( - "${outfile_header}" PROPERTIES GENERATED TRUE - ) - endif() - - # Add generated file to output file list. - list(APPEND ${_outfiles} "${outfile}") - - set(${_outfiles} ${${_outfiles}} PARENT_SCOPE) -endfunction() +#.rst: +# FindwxWidgets +# ------------- +# +# Find a wxWidgets (a.k.a., wxWindows) installation. +# +# This module finds if wxWidgets is installed and selects a default +# configuration to use. wxWidgets is a modular library. To specify the +# modules that you will use, you need to name them as components to the +# package: +# +# find_package(wxWidgets COMPONENTS core base ...) +# +# There are two search branches: a windows style and a unix style. For +# windows, the following variables are searched for and set to defaults +# in case of multiple choices. Change them if the defaults are not +# desired (i.e., these are the only variables you should change to +# select a configuration): +# +# :: +# +# wxWidgets_ROOT_DIR - Base wxWidgets directory +# (e.g., C:/wxWidgets-2.6.3). +# wxWidgets_LIB_DIR - Path to wxWidgets libraries +# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). +# wxWidgets_CONFIGURATION - Configuration to use +# (e.g., msw, mswd, mswu, mswunivud, etc.) +# wxWidgets_EXCLUDE_COMMON_LIBRARIES +# - Set to TRUE to exclude linking of +# commonly required libs (e.g., png tiff +# jpeg zlib regex expat). +# +# +# +# For unix style it uses the wx-config utility. You can select between +# debug/release, unicode/ansi, universal/non-universal, and +# static/shared in the QtDialog or ccmake interfaces by turning ON/OFF +# the following variables: +# +# :: +# +# wxWidgets_USE_DEBUG +# wxWidgets_USE_UNICODE +# wxWidgets_USE_UNIVERSAL +# wxWidgets_USE_STATIC +# +# +# +# There is also a wxWidgets_CONFIG_OPTIONS variable for all other +# options that need to be passed to the wx-config utility. For example, +# to use the base toolkit found in the /usr/local path, set the variable +# (before calling the FIND_PACKAGE command) as such: +# +# :: +# +# set(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr) +# +# +# +# The following are set after the configuration is done for both windows +# and unix style: +# +# :: +# +# wxWidgets_FOUND - Set to TRUE if wxWidgets was found. +# wxWidgets_INCLUDE_DIRS - Include directories for WIN32 +# i.e., where to find "wx/wx.h" and +# "wx/setup.h"; possibly empty for unices. +# wxWidgets_LIBRARIES - Path to the wxWidgets libraries. +# wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for +# rpath on UNIX. Typically an empty string +# in WIN32 environment. +# wxWidgets_DEFINITIONS - Contains defines required to compile/link +# against WX, e.g. WXUSINGDLL +# wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link +# against WX debug builds, e.g. __WXDEBUG__ +# wxWidgets_CXX_FLAGS - Include dirs and compiler flags for +# unices, empty on WIN32. Essentially +# "`wx-config --cxxflags`". +# wxWidgets_USE_FILE - Convenience include file. +# +# +# +# Sample usage: +# +# :: +# +# # Note that for MinGW users the order of libs is important! +# find_package(wxWidgets COMPONENTS net gl core base) +# if(wxWidgets_FOUND) +# include(${wxWidgets_USE_FILE}) +# # and for each of your dependent executable/library targets: +# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES}) +# endif() +# +# +# +# If wxWidgets is required (i.e., not an optional part): +# +# :: +# +# find_package(wxWidgets REQUIRED net gl core base) +# include(${wxWidgets_USE_FILE}) +# # and for each of your dependent executable/library targets: +# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES}) + +#============================================================================= +# Copyright 2004-2009 Kitware, Inc. +# Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org> +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# +# FIXME: check this and provide a correct sample usage... +# Remember to connect back to the upper text. +# Sample usage with monolithic wx build: +# +# find_package(wxWidgets COMPONENTS mono) +# ... + +# NOTES +# +# This module has been tested on the WIN32 platform with wxWidgets +# 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to +# easily extend support to all possible builds, e.g., static/shared, +# debug/release, unicode, universal, multilib/monolithic, etc.. +# +# If you want to use the module and your build type is not supported +# out-of-the-box, please contact me to exchange information on how +# your system is setup and I'll try to add support for it. +# +# AUTHOR +# +# Miguel A. Figueroa-Villanueva (miguelf at ieee dot org). +# Jan Woetzel (jw at mip.informatik.uni-kiel.de). +# +# Based on previous works of: +# Jan Woetzel (FindwxWindows.cmake), +# Jorgen Bodde and Jerry Fath (FindwxWin.cmake). + +# TODO/ideas +# +# (1) Option/Setting to use all available wx libs +# In contrast to expert developer who lists the +# minimal set of required libs in wxWidgets_USE_LIBS +# there is the newbie user: +# - who just wants to link against WX with more 'magic' +# - doesn't know the internal structure of WX or how it was built, +# in particular if it is monolithic or not +# - want to link against all available WX libs +# Basically, the intent here is to mimic what wx-config would do by +# default (i.e., `wx-config --libs`). +# +# Possible solution: +# Add a reserved keyword "std" that initializes to what wx-config +# would default to. If the user has not set the wxWidgets_USE_LIBS, +# default to "std" instead of "base core" as it is now. To implement +# "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe +# checking whether a minimal set was found. + + +# FIXME: This and all the DBG_MSG calls should be removed after the +# module stabilizes. +# +# Helper macro to control the debugging output globally. There are +# two versions for controlling how verbose your output should be. +macro(DBG_MSG _MSG) +# message(STATUS +# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") +endmacro() +macro(DBG_MSG_V _MSG) +# message(STATUS +# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") +endmacro() + +# Clear return values in case the module is loaded more than once. +set(wxWidgets_FOUND FALSE) +set(wxWidgets_INCLUDE_DIRS "") +set(wxWidgets_LIBRARIES "") +set(wxWidgets_LIBRARY_DIRS "") +set(wxWidgets_CXX_FLAGS "") + +# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on +# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM +# to prevent UsewxWidgets.cmake from using SYSTEM. +# +# See cmake mailing list discussions for more info: +# http://www.cmake.org/pipermail/cmake/2008-April/021115.html +# http://www.cmake.org/pipermail/cmake/2008-April/021146.html +# +if(APPLE OR CMAKE_CXX_PLATFORM_ID MATCHES "OpenBSD") + set(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) +endif() + +# DEPRECATED: This is a patch to support the DEPRECATED use of +# wxWidgets_USE_LIBS. +# +# If wxWidgets_USE_LIBS is set: +# - if using <components>, then override wxWidgets_USE_LIBS +# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS +if(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) + set(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) +endif() +DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") + +# Add the convenience use file if available. +# +# Get dir of this file which may reside in: +# - CMAKE_MAKE_ROOT/Modules on CMake installation +# - CMAKE_MODULE_PATH if user prefers his own specialized version +set(wxWidgets_USE_FILE "") +get_filename_component( + wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +# Prefer an existing customized version, but the user might override +# the FindwxWidgets module and not the UsewxWidgets one. +if(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") + set(wxWidgets_USE_FILE + "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") +else() + set(wxWidgets_USE_FILE UsewxWidgets) +endif() + +#===================================================================== +#===================================================================== +if(WIN32 AND NOT CYGWIN AND NOT MSYS) + set(wxWidgets_FIND_STYLE "win32") +else() + if(UNIX OR MSYS) + set(wxWidgets_FIND_STYLE "unix") + endif() +endif() + +#===================================================================== +# WIN32_FIND_STYLE +#===================================================================== +if(wxWidgets_FIND_STYLE STREQUAL "win32") + # Useful common wx libs needed by almost all components. + set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) + + # DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead. + if(NOT wxWidgets_FIND_COMPONENTS) + if(wxWidgets_USE_MONOLITHIC) + set(wxWidgets_FIND_COMPONENTS mono) + else() + set(wxWidgets_FIND_COMPONENTS core base) # this is default +... [truncated message content] |
From: <phi...@us...> - 2014-03-06 13:26:35
|
Revision: 13045 http://sourceforge.net/p/plplot/code/13045 Author: philrosenberg Date: 2014-03-06 13:26:33 +0000 (Thu, 06 Mar 2014) Log Message: ----------- Added Workaround for finding 64 bit wxWidgets for NMake Modified Paths: -------------- trunk/cmake/modules/FindwxWidgets.cmake Modified: trunk/cmake/modules/FindwxWidgets.cmake =================================================================== --- trunk/cmake/modules/FindwxWidgets.cmake 2014-03-06 00:05:26 UTC (rev 13044) +++ trunk/cmake/modules/FindwxWidgets.cmake 2014-03-06 13:26:33 UTC (rev 13045) @@ -509,15 +509,30 @@ #message(STATUS "MSVC_C_ARCHITECTURE_ID = ${MSVC_C_ARCHITECTURE_ID}") #message(STATUS "MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") #message(STATUS "CMAKE_CL_64 = ${CMAKE_CL_64}") + #message(STATUS "LIB = $ENV{LIB}") + #message(STATUS "GENERATOR = ${CMAKE_GENERATOR}") if(WX_ROOT_DIR) # Select one default tree inside the already determined wx tree. # Prefer static/shared order usually consistent with build # settings. if(MINGW) set(WX_LIB_DIR_PREFIX gcc) + #The following should check for compiling 64 bit with nmake or VS #Check for use of 64 bit NMake Makefile generator or a Visual Studio XX Win64 generator - elseif(CMAKE_CL_64 OR ${CMAKE_GENERATOR} MATCHES "Win64$") + elseif(CMAKE_CL_64) set(WX_LIB_DIR_PREFIX vc_x64) + #unfortunately the above doesn't work on my system - can't find why, but workaround below + #Check for vs64 bit + elseif(${CMAKE_GENERATOR} MATCHES "Win64$") + set(WX_LIB_DIR_PREFIX vc_x64) + #Check for nmake 64 bit + elseif(${CMAKE_GENERATOR} STREQUAL "NMake Makefiles") + set(WX_LIB_DIR_PREFIX vc) + foreach(ENVLIBDIR $ENV{LIB}) + if( ENVLIBDIR MATCHES "amd64$") + set(WX_LIB_DIR_PREFIX vc_x64) + endif() + endforeach() else() set(WX_LIB_DIR_PREFIX vc) endif() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-06 00:05:32
|
Revision: 13044 http://sourceforge.net/p/plplot/code/13044 Author: airwin Date: 2014-03-06 00:05:26 +0000 (Thu, 06 Mar 2014) Log Message: ----------- Solve scaling issue (https://sourceforge.net/p/plplot/bugs/143/) demonstrated by the extXdrawable_demo application. Thanks to Jens (https://sourceforge.net/u/jensplplot/profile/) for reporting this issue which I was able to confirm by attempting to resize the extXdrawable_demo GUI. I have applied the fix suggested by Jens which in retrospect is obvious; when you change the geometry by resizing the window, the result is reported back by the call to XGetGeometry, and the scale factor must be adjusted to compensate for that changed geometry right after that call. After this fix, resizing the extXdrawable_demo GUI produced no strange line artifacts (presumably caused by short overflows) that were present before the fix. Modified Paths: -------------- trunk/drivers/cairo.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2014-03-05 20:19:04 UTC (rev 13043) +++ trunk/drivers/cairo.c 2014-03-06 00:05:26 UTC (rev 13044) @@ -2186,6 +2186,12 @@ &x, &y, &w, &h, &b, &d ); pls->xlength = (PLINT) w; pls->ylength = (PLINT) h; + // Calculate ratio of (smaller) external coordinates used for cairo + // devices to (larger) internal PLplot coordinates. + if ( pls->xlength > pls->ylength ) + aStream->downscale = (double) pls->xlength / (double) ( PIXELS_X - 1 ); + else + aStream->downscale = (double) pls->ylength / (double) PIXELS_Y; plP_setphy( (PLINT) 0, (PLINT) ( pls->xlength / aStream->downscale ), (PLINT) 0, (PLINT) ( pls->ylength / aStream->downscale ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-05 20:19:12
|
Revision: 13043 http://sourceforge.net/p/plplot/code/13043 Author: airwin Date: 2014-03-05 20:19:04 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Fix long-standing memory management issue discovered accidentally by a valgrind run on plserver. The argv argument to main is an array of argc + 1 pointers. The first argc of these point to NULL-terminated strings while the last is a NULL pointer (according to both Linux and Windows documentation of main that I have read). Tk_ParseArgv follows this same standard (i.e., writes a NULL pointer as the argc element of the argv array) when it modifies argc and argv. Previously there was only room in myargv for myargc = original argc elements, but that has now been changed to argc+1, and that solves the memory management issue as expected. Writing a NULL just off the end of an allocated block of memory in the heap is generally not a good thing to do and this fix addresses that issue. However, plserver has been reliable before this fix so it appears we were by accident escaping unscathed from this memory management issue. So the practical effect of this fix will not be apparent at the moment, but plserver should be more robust against further changes which might have generated a segfault without the present memory management fix. Modified Paths: -------------- trunk/bindings/tk/plserver.c Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2014-03-05 01:54:00 UTC (rev 13042) +++ trunk/bindings/tk/plserver.c 2014-03-05 20:19:04 UTC (rev 13043) @@ -117,8 +117,11 @@ fprintf( stderr, "Before myargv\n" ); #endif - myargv = (const char **) malloc( argc * sizeof ( char * ) ); - for ( i = 0; i < argc; i++ ) + // According to both Linux and Windows documentation, + // argv is actually argc+1 in length with the last element pointing + // to NULL. So leave room for that. + myargv = (const char **) malloc( ( argc + 1 ) * sizeof ( char * ) ); + for ( i = 0; i < argc + 1; i++ ) { myargv[i] = argv[i]; } @@ -133,12 +136,16 @@ if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv, argTable, TK_ARGV_NO_DEFAULTS ) != TCL_OK ) { +#ifdef DEBUG fprintf( stderr, "Error in Tk_ParseArgv\n" ); +#endif fprintf( stderr, "\n(plserver) %s\n\n", Tcl_GetStringResult( interp ) ); fprintf( stderr, "\ The client_<xxx> and -child options should not be used except via the\n\ PLplot/Tk driver.\n\n(wish) " ); +#ifdef DEBUG fprintf( stderr, "Before Tcl_SetResult\n" ); +#endif Tcl_SetResult( interp, (char *) helpmsg, TCL_VOLATILE ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-05 01:54:02
|
Revision: 13042 http://sourceforge.net/p/plplot/code/13042 Author: airwin Date: 2014-03-05 01:54:00 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Change website to display 10 pages for standard example 8 to adjust to recent change for that example. Modified Paths: -------------- trunk/www/examples.php Modified: trunk/www/examples.php =================================================================== --- trunk/www/examples.php 2014-03-05 01:26:47 UTC (rev 13041) +++ trunk/www/examples.php 2014-03-05 01:54:00 UTC (rev 13042) @@ -29,9 +29,9 @@ array( 7, 19, 1, " <p>Font demo for Hershey encodings.</p> \n", array_fill( 0, 19, 1)), - array( 8, 8, 1, " + array( 8, 10, 1, " <p>3-d plot demo.</p> - \n", array_fill( 0, 8, 1)), + \n", array_fill( 0, 10, 1)), array( 9, 5, 1, " <p>Contour plot demo.</p> \n", array_fill( 0, 5, 1)), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-05 01:26:50
|
Revision: 13041 http://sourceforge.net/p/plplot/code/13041 Author: airwin Date: 2014-03-05 01:26:47 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Add remark that plsurf3dl is used is example 8. Modified Paths: -------------- trunk/doc/docbook/src/api.xml Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2014-03-05 01:22:58 UTC (rev 13040) +++ trunk/doc/docbook/src/api.xml 2014-03-05 01:26:47 UTC (rev 13041) @@ -16805,7 +16805,7 @@ </para> <para> - This function is not used in any examples. + This function is used in example 8. </para> </sect1> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-05 01:23:04
|
Revision: 13040 http://sourceforge.net/p/plplot/code/13040 Author: airwin Date: 2014-03-05 01:22:58 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Style previous commit. Modified Paths: -------------- trunk/examples/c/x08c.c Modified: trunk/examples/c/x08c.c =================================================================== --- trunk/examples/c/x08c.c 2014-03-05 00:58:02 UTC (rev 13039) +++ trunk/examples/c/x08c.c 2014-03-05 01:22:58 UTC (rev 13040) @@ -138,10 +138,10 @@ PLINT *indexymax; PLFLT **zlimited; // parameters of ellipse that limits the data. - PLFLT x0 = 0.5*(PLFLT) (XPTS - 1); - PLFLT a = x0; - PLFLT y0 = 0.5*(PLFLT) (YPTS - 1); - PLFLT b = y0; + PLFLT x0 = 0.5 * (PLFLT) ( XPTS - 1 ); + PLFLT a = x0; + PLFLT y0 = 0.5 * (PLFLT) ( YPTS - 1 ); + PLFLT b = y0; PLFLT square_root; // Parse and process command line arguments @@ -221,13 +221,13 @@ for ( i = indexxmin; i < indexxmax; i++ ) { - square_root = sqrt(1. - MIN(1., pow(((PLFLT)i - x0)/a, 2.))); - indexymin[i] = MAX(0, (PLINT)(y0 - b*square_root)); - indexymax[i] = MIN(YPTS, (PLINT)(y0 + b*square_root)); - for ( j = indexymin[i]; j < indexymax[i]; j++ ) - { - zlimited[i][j] = z[i][j]; - } + square_root = sqrt( 1. - MIN( 1., pow( ( (PLFLT) i - x0 ) / a, 2. ) ) ); + indexymin[i] = MAX( 0, (PLINT) ( y0 - b * square_root ) ); + indexymax[i] = MIN( YPTS, (PLINT) ( y0 + b * square_root ) ); + for ( j = indexymin[i]; j < indexymax[i]; j++ ) + { + zlimited[i][j] = z[i][j]; + } } @@ -281,7 +281,7 @@ else // magnitude colored plot with contours and index limits. { cmap1_init( 0 ); - plsurf3dl( x, y, (const PLFLT * const*) zlimited, XPTS, YPTS, MAG_COLOR | SURF_CONT | BASE_CONT, clevel, nlevel, indexxmin, indexxmax, indexymin, indexymax ); + plsurf3dl( x, y, (const PLFLT * const *) zlimited, XPTS, YPTS, MAG_COLOR | SURF_CONT | BASE_CONT, clevel, nlevel, indexxmin, indexxmax, indexymin, indexymax ); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-03-05 00:58:05
|
Revision: 13039 http://sourceforge.net/p/plplot/code/13039 Author: airwin Date: 2014-03-05 00:58:02 +0000 (Wed, 05 Mar 2014) Log Message: ----------- Add a 4th (and 8th) page that demonstrates plsurf3dl results for Y index ranges that follow an ellipse (subject to integer quantization). Modified Paths: -------------- trunk/examples/c/x08c.c Modified: trunk/examples/c/x08c.c =================================================================== --- trunk/examples/c/x08c.c 2014-03-04 21:09:29 UTC (rev 13038) +++ trunk/examples/c/x08c.c 2014-03-05 00:58:02 UTC (rev 13039) @@ -132,6 +132,18 @@ PLINT nlevel = LEVELS; int rosen = 1; + PLINT indexxmin = 0; + PLINT indexxmax = XPTS; + PLINT *indexymin; + PLINT *indexymax; + PLFLT **zlimited; + // parameters of ellipse that limits the data. + PLFLT x0 = 0.5*(PLFLT) (XPTS - 1); + PLFLT a = x0; + PLFLT y0 = 0.5*(PLFLT) (YPTS - 1); + PLFLT b = y0; + PLFLT square_root; + // Parse and process command line arguments plMergeOpts( options, "x08c options", NULL ); (void) plparseopts( &argc, argv, PL_PARSE_FULL ); @@ -200,6 +212,25 @@ } } + // Allocate and alculate y index ranges and corresponding zlimited. + plAlloc2dGrid( &zlimited, XPTS, YPTS ); + indexymin = (PLINT *) malloc( XPTS * sizeof ( PLINT ) ); + indexymax = (PLINT *) malloc( XPTS * sizeof ( PLINT ) ); + if ( !indexymin || !indexymax ) + plexit( "Memory allocation error" ); + + for ( i = indexxmin; i < indexxmax; i++ ) + { + square_root = sqrt(1. - MIN(1., pow(((PLFLT)i - x0)/a, 2.))); + indexymin[i] = MAX(0, (PLINT)(y0 - b*square_root)); + indexymax[i] = MIN(YPTS, (PLINT)(y0 + b*square_root)); + for ( j = indexymin[i]; j < indexymax[i]; j++ ) + { + zlimited[i][j] = z[i][j]; + } + } + + plMinMax2dGrid( (const PLFLT * const *) z, XPTS, YPTS, &zmax, &zmin ); step = ( zmax - zmin ) / ( nlevel + 1 ); for ( i = 0; i < nlevel; i++ ) @@ -209,7 +240,7 @@ for ( k = 0; k < 2; k++ ) { - for ( ifshade = 0; ifshade < 4; ifshade++ ) + for ( ifshade = 0; ifshade < 5; ifshade++ ) { pladv( 0 ); plvpor( 0.0, 1.0, 0.0, 0.9 ); @@ -242,11 +273,16 @@ cmap1_init( 0 ); plfsurf3d( x, y, plf2ops_grid_row_major(), ( PLPointer ) & grid_row_major, XPTS, YPTS, MAG_COLOR | FACETED, NULL, 0 ); } - else // magnitude colored plot with contours + else if ( ifshade == 3 ) // magnitude colored plot with contours { cmap1_init( 0 ); plfsurf3d( x, y, plf2ops_grid_col_major(), ( PLPointer ) & grid_col_major, XPTS, YPTS, MAG_COLOR | SURF_CONT | BASE_CONT, clevel, nlevel ); } + else // magnitude colored plot with contours and index limits. + { + cmap1_init( 0 ); + plsurf3dl( x, y, (const PLFLT * const*) zlimited, XPTS, YPTS, MAG_COLOR | SURF_CONT | BASE_CONT, clevel, nlevel, indexxmin, indexxmax, indexymin, indexymax ); + } } } @@ -258,6 +294,10 @@ free( (void *) z_row_major ); free( (void *) z_col_major ); + plFree2dGrid( zlimited, XPTS, YPTS ); + free( (void *) indexymin ); + free( (void *) indexymax ); + plend(); exit( 0 ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |