On 2015-03-12 19:59-0400 Jim Dishaw wrote: > What is the option for a pure static build on linux. I tried BUILD_SHARED_LIBS=OFF and it still linked to some dynamic libraries like Qt.
Hi Jim: This is an interesting question. Static linking is a difficult thing to get right so the last answer at <http://stackoverflow.com/questions/24648357/compiling-a-static-executable-with-cmake> which is ============ add these lines before add_executable SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") SET(BUILD_SHARED_LIBRARIES OFF) SET(CMAKE_EXE_LINKER_FLAGS "-static") ============ may just be the start of your journey. For example, if you set CMAKE_FIND_LIBRARY_SUFFIXES that way is that just a preference for finding *.a libraries if they exist or does that absolutely fail even when there is a shared library of the correct root name that has been installed? This question is alluded to at <http://stackoverflow.com/questions/3762057/cmake-how-to-produce-binaries-as-static-as-possible> where it is asserted that CMAKE_FIND_LIBRARY_SUFFIXES is a priority list so I assume that means you would specify -DCMAKE_FIND_LIBRARY_SUFFIXES:STRING=".a;.so" to prioritize .a, but use .so if that is the only choice. Note, also I assume you can set all these variables on the cmake command line with a -D option (as just above) rather than having to insert set commands in CMakeLists.txt files. If starting from these hints you do have success producing pure static libraries and executables for PLplot on Linux, please take notes so we can advise our Linux users how to do that. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel