From: <ai...@us...> - 2011-11-26 20:52:00
|
Revision: 12053 http://plplot.svn.sourceforge.net/plplot/?rev=12053&view=rev Author: airwin Date: 2011-11-26 20:51:54 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Use the --static pkg-config option for the traditional build and test of the installed examples under certain circumstances. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/ada/Makefile.examples.in trunk/examples/c/Makefile.examples.in trunk/examples/c++/Makefile.examples.in trunk/examples/f77/Makefile.examples.in trunk/examples/f95/Makefile.examples.in trunk/examples/tk/Makefile.examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/CMakeLists.txt 2011-11-26 20:51:54 UTC (rev 12053) @@ -181,6 +181,22 @@ set(PDFQT_COMMENT "#") endif(NOT PLD_pdfqt) + # The D case takes special handling so the logic below is for the + # generic non-D examples case. + if(NON_TRANSITIVE) + if(BUILD_SHARED_LIBS) + # pkg-config does not use --static option for examples build. + set(PC_STATIC_OPTION) + else(BUILD_SHARED_LIBS) + # pkg-config does use --static option for examples build. + set(PC_STATIC_OPTION "--static") + endif(BUILD_SHARED_LIBS) + else(NON_TRANSITIVE) + # pkg-config never uses the --static option for the examples build + # for the transitive case. + set(PC_STATIC_OPTION) + endif(NON_TRANSITIVE) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.examples.in ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples Modified: trunk/examples/ada/Makefile.examples.in =================================================================== --- trunk/examples/ada/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/ada/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -104,6 +104,6 @@ # anything after -cargs below. .adb$(EXEEXT): $(GNAT_EXECUTABLE_BUILDER) $< \ - -cargs `$(PKG_CONFIG_ENV) pkg-config --cflags plplot$(LIB_TAG)-ada` -largs $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --libs plplot$(LIB_TAG)-ada` + -cargs `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags plplot$(LIB_TAG)-ada` -largs $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --libs plplot$(LIB_TAG)-ada` .SUFFIXES: .adb $(EXEEXT) Modified: trunk/examples/c/Makefile.examples.in =================================================================== --- trunk/examples/c/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/c/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -84,28 +84,28 @@ @gcw_true@plplotcanvas_demo$(EXEEXT): plplotcanvas_demo.c @gcw_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-gnome2` +@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` @gcw_true@@pkg_config_false@ $(CC) $< -o $@ \ -@gcw_true@@pkg_config_false@ `plplot-config --cflags --libs --with-gcw` +@gcw_true@@pkg_config_false@ `plplot-config @PC_STATIC_OPTION@ --cflags --libs --with-gcw` @gcw_true@plplotcanvas_animation$(EXEEXT): plplotcanvas_animation.c @gcw_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-gnome2` \ -@gcw_true@@pkg_config_true@ `pkg-config --cflags --libs gthread-2.0` +@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` \ +@gcw_true@@pkg_config_true@ `pkg-config @PC_STATIC_OPTION@ --cflags --libs gthread-2.0` @gcw_true@@pkg_config_false@ $(CC) $< -o \ @gcw_true@@pkg_config_false@ $@ `plplot-config --cflags --libs --with-gcw` \ @gcw_true@@pkg_config_false@ @GCWTHREAD_CFLAGS@ @GCWTHREAD_LIBS@ @extXdrawable_true@@pkg_config_true@extXdrawable_demo$(EXEEXT): extXdrawable_demo.c @extXdrawable_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@extXdrawable_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG) gtk+-x11-2.0` +@extXdrawable_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) gtk+-x11-2.0` @extcairo_true@@pkg_config_true@ext-cairo-test$(EXEEXT): ext-cairo-test.c @extcairo_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@extcairo_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG) cairo` +@extcairo_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) cairo` .c$(EXEEXT): -@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)` +@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)` @pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs` .SUFFIXES: .c $(EXEEXT) Modified: trunk/examples/c++/Makefile.examples.in =================================================================== --- trunk/examples/c++/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/c++/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -80,18 +80,18 @@ rm -f $(EXECUTABLES_list) @wxwidgets_true@@pkg_config_true@wxPLplotDemo$(EXEEXT): wxPLplotDemo.cpp -@wxwidgets_true@@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-wxwidgets` +@wxwidgets_true@@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-wxwidgets` # Note, must filter out -p options which confuse $(QT_MOC_EXECUTABLE). Such # options (e.g., -pthread) tend to appear in the static driver case. @qt_gui_true@@pkg_config_true@moc_qt_PlotWindow.cpp: qt_PlotWindow.h -@qt_gui_true@@pkg_config_true@ $(QT_MOC_EXECUTABLE) `$(PKG_CONFIG_ENV) pkg-config --cflags-only-I plplot$(LIB_TAG)-qt` $< -o $@ +@qt_gui_true@@pkg_config_true@ $(QT_MOC_EXECUTABLE) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags-only-I plplot$(LIB_TAG)-qt` $< -o $@ @qt_gui_true@@pkg_config_true@qt_example$(EXEEXT): qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -@qt_gui_true@@pkg_config_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-qt` +@qt_gui_true@@pkg_config_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-qt` .cc$(EXEEXT): -@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-c++` +@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-c++` @pkg_config_false@ $(CXX) $< -o $@ `plplot-config --cflags --libs --with-c++` .SUFFIXES: .cc $(EXEEXT) Modified: trunk/examples/f77/Makefile.examples.in =================================================================== --- trunk/examples/f77/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/f77/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -70,7 +70,7 @@ rm -f $(EXECUTABLES_list) .f$(EXEEXT): -@pkg_config_true@ $(F77) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-f77` +@pkg_config_true@ $(F77) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f77` @pkg_config_false@ $(F77) $< -o $@ `plplot-config --cflags --libs --with-f77` .SUFFIXES: .f $(EXEEXT) Modified: trunk/examples/f95/Makefile.examples.in =================================================================== --- trunk/examples/f95/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/f95/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -69,7 +69,7 @@ rm -f $(EXECUTABLES_list) .f90$(EXEEXT): -@pkg_config_true@ $(F95) @MODULESINCCMD@ $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-f95` +@pkg_config_true@ $(F95) @MODULESINCCMD@ $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f95` @pkg_config_false@ $(F95) @MODULESINCCMD@ $< -o $@ `plplot-config --cflags --libs --with-f95` .SUFFIXES: .f90 $(EXEEXT) Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2011-11-26 20:34:45 UTC (rev 12052) +++ trunk/examples/tk/Makefile.examples.in 2011-11-26 20:51:54 UTC (rev 12053) @@ -37,7 +37,7 @@ rm -f $(EXECUTABLES_list) $(itk_EXECUTABLES_list) .c$(EXEEXT): -@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-tcl` +@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` @pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs --with-tcl` .SUFFIXES: .c $(EXEEXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |