From: <ai...@us...> - 2011-11-26 21:45:04
|
Revision: 12055 http://plplot.svn.sourceforge.net/plplot/?rev=12055&view=rev Author: airwin Date: 2011-11-26 21:44:58 +0000 (Sat, 26 Nov 2011) Log Message: ----------- PC_REQUIRES_TAG always set locally so drop setting a default global value for that variable/ Improve commentary concerning the NON_TRANSITIVE option. Implement the FORCE_EXTERNAL_STATIC option for the (internal) static library case (NOT BUILD_SHARED_LIBS) to force CMake to find and use only external libraries with a *.a suffix (i.e., static libraries). This suffix trick only works with UNIX so FORCE_EXTERNAL_STATIC is ignored in all other cases. The option is experimental. In fact, it still does not completely work at this time because of pkg-config complications. Therefore, its default value is OFF. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2011-11-26 21:33:35 UTC (rev 12054) +++ trunk/cmake/modules/plplot.cmake 2011-11-26 21:44:58 UTC (rev 12055) @@ -22,12 +22,24 @@ # libraries are all shared by default option(BUILD_SHARED_LIBS "Build shared libraries" ON) -# OFF means libraries are transitively linked by default. +if(NOT BUILD_SHARED_LIBS) + option(FORCE_EXTERNAL_STATIC "Force external UNIX libraries to be static" OFF) +endif(NOT BUILD_SHARED_LIBS) + +# CYGWIN eliminated here because .a suffix is not sufficient to guarantee a +# static library on that platform. +if(UNIX AND NOT CYGWIN AND FORCE_EXTERNAL_STATIC) + # All find_library commands append this suffix to the searched name so + # this always forces find_library to find only the Unix static library + # if it exists or fail if it doesn't exist. + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") +endif(UNIX AND NOT CYGWIN AND FORCE_EXTERNAL_STATIC) + +# OFF means shared libraries (but never static libraries) are +# transitively linked by default by CMake and also by pkg-config (used +# to generate compile and link flags for the traditional build and +# test system of the installed examples). option(NON_TRANSITIVE "Experimental option to try non-transitive linking" OFF) -# For now use this default which causes transitive linking of software built -# with our pkg-config files (unless PC_REQUIRES_TAG specifically overridden -# for particular language bindings with Requires.private). -set(PC_REQUIRES_TAG "Requires") # Color maps (discrete and continuous) to use by default if(NOT DEFAULT_CMAP0_FILE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |