From: <ai...@us...> - 2009-04-26 01:49:28
|
Revision: 9854 http://plplot.svn.sourceforge.net/plplot/?rev=9854&view=rev Author: airwin Date: 2009-04-26 01:49:22 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Second and fourth Tk examples will be ignored if Itk is not enabled. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake trunk/examples/tk/CMakeLists.txt trunk/examples/tk/Makefile.examples.in trunk/plplot_test/plplot-test-interactive.sh.in Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2009-04-26 01:20:41 UTC (rev 9853) +++ trunk/cmake/modules/tcl-related.cmake 2009-04-26 01:49:22 UTC (rev 9854) @@ -201,3 +201,6 @@ set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(ENABLE_tcl) +if(NOT ENABLE_itk) + set(itk_true "#") +endif(NOT ENABLE_itk) Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2009-04-26 01:20:41 UTC (rev 9853) +++ trunk/examples/tk/CMakeLists.txt 2009-04-26 01:49:22 UTC (rev 9854) @@ -110,21 +110,17 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tclIndex DESTINATION ${DATA_DIR}/examples/tk) -set(tk_SCRIPTS - tk01 - tk02 - tk03 - tk04 - ) +# The second and fourth Tk examples depend on Itk to work. +set(tk_SCRIPTS tk01 tk03) +set(tk_SRC xtk01.c) + +if(ENABLE_itk) + list(APPEND tk_SCRIPTS tk02 tk04) + list(APPEND tk_SRC xtk02.c xtk04.c) +endif(ENABLE_itk) install(PROGRAMS ${tk_SCRIPTS} DESTINATION ${DATA_DIR}/examples/tk) -set(tk_SRC - xtk01.c - xtk02.c - xtk04.c - ) - install(FILES ${tk_SRC} DESTINATION ${DATA_DIR}/examples/tk) set(CC ${CMAKE_C_COMPILER}) Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2009-04-26 01:20:41 UTC (rev 9853) +++ trunk/examples/tk/Makefile.examples.in 2009-04-26 01:49:22 UTC (rev 9854) @@ -27,15 +27,14 @@ @pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ @pkg_config_true@RPATHCMD = @RPATHCMD@ -EXECUTABLES_list = \ - xtk01$(EXEEXT) \ - xtk02$(EXEEXT) \ - xtk04$(EXEEXT) +EXECUTABLES_list = xtk01$(EXEEXT) +# Second and fourth examples depend on itk. +@itk_true@itk_EXECUTABLES_list = xtk02$(EXEEXT) xtk04$(EXEEXT) -all: $(EXECUTABLES_list) +all: $(EXECUTABLES_list) $(itk_EXECUTABLES_list) clean: - rm -f $(EXECUTABLES_list) + 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` Modified: trunk/plplot_test/plplot-test-interactive.sh.in =================================================================== --- trunk/plplot_test/plplot-test-interactive.sh.in 2009-04-26 01:20:41 UTC (rev 9853) +++ trunk/plplot_test/plplot-test-interactive.sh.in 2009-04-26 01:49:22 UTC (rev 9854) @@ -108,17 +108,23 @@ DIRECTORY[$COUNT]="tk" COMMAND[$COUNT]="./xtk01 -f tk01" COUNT=$(( $COUNT + 1 )) +fi +if [ "@ENABLE_itk@" = "ON" ] ; then INDEX_LIST="$INDEX_LIST $COUNT" DIRECTORY[$COUNT]="tk" COMMAND[$COUNT]="./xtk02 -f tk02" COUNT=$(( $COUNT + 1 )) +fi +if [ "@ENABLE_tk@" = "ON" ] ; then INDEX_LIST="$INDEX_LIST $COUNT" DIRECTORY[$COUNT]="tk" - COMMAND[$COUNT]="plserver -f tk03" + COMMAND[$COUNT]="plserver -f tk03" COUNT=$(( $COUNT + 1 )) +fi +if [ "@ENABLE_itk@" = "ON" ] ; then INDEX_LIST="$INDEX_LIST $COUNT" DIRECTORY[$COUNT]="tk" COMMAND[$COUNT]="./xtk04 -f tk04" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |