mirror of https://github.com/KLayout/klayout.git
libpng option in build script
This commit is contained in:
parent
5eacb67368
commit
7702d8c200
8
build.sh
8
build.sh
|
|
@ -36,6 +36,7 @@ HAVE_QT_DESIGNER=1
|
|||
HAVE_QT_XML=1
|
||||
HAVE_64BIT_COORD=0
|
||||
HAVE_QT=1
|
||||
HAVE_PNG=0
|
||||
HAVE_CURL=0
|
||||
HAVE_EXPAT=0
|
||||
|
||||
|
|
@ -199,6 +200,9 @@ while [ "$*" != "" ]; do
|
|||
-dry-run)
|
||||
RUN_MAKE=0
|
||||
;;
|
||||
-libpng)
|
||||
HAVE_PNG=1
|
||||
;;
|
||||
-libcurl)
|
||||
HAVE_CURL=1
|
||||
;;
|
||||
|
|
@ -260,6 +264,7 @@ while [ "$*" != "" ]; do
|
|||
echo ""
|
||||
echo " -libcurl Use libcurl instead of QtNetwork (for Qt<4.7)"
|
||||
echo " -libexpat Use libexpat instead of QtXml"
|
||||
echo " -libpng Use libpng instead of Qt for PNG generation"
|
||||
echo ""
|
||||
echo "Environment Variables:"
|
||||
echo ""
|
||||
|
|
@ -487,6 +492,9 @@ fi
|
|||
if [ $HAVE_CURL != 0 ]; then
|
||||
echo " Uses libcurl for network access"
|
||||
fi
|
||||
if [ $HAVE_PNG != 0 ]; then
|
||||
echo " Uses libpng for PNG generation"
|
||||
fi
|
||||
if [ "$RPATH" = "" ]; then
|
||||
RPATH="$BIN"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -2549,7 +2549,7 @@ LayoutViewBase::save_screenshot (const std::string &fn)
|
|||
|
||||
tl::log << "Saved screen shot to " << fn;
|
||||
}
|
||||
#else
|
||||
#elif defined(HAVE_PNG)
|
||||
void
|
||||
LayoutViewBase::save_screenshot (const std::string &fn)
|
||||
{
|
||||
|
|
@ -2565,6 +2565,12 @@ LayoutViewBase::save_screenshot (const std::string &fn)
|
|||
|
||||
tl::log << "Saved screen shot to " << fn;
|
||||
}
|
||||
#else
|
||||
void
|
||||
LayoutViewBase::save_screenshot (const std::string &)
|
||||
{
|
||||
throw tl::Exception (tl::to_string (tr ("Unable to write screenshot - PNG library not compiled in")));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_QT)
|
||||
|
|
@ -2656,7 +2662,7 @@ LayoutViewBase::save_image (const std::string &fn, unsigned int width, unsigned
|
|||
|
||||
tl::log << "Saved image to " << fn;
|
||||
}
|
||||
#else
|
||||
#elif defined(HAVE_PNG)
|
||||
void
|
||||
LayoutViewBase::save_image (const std::string &fn, unsigned int width, unsigned int height)
|
||||
{
|
||||
|
|
@ -2675,6 +2681,12 @@ LayoutViewBase::save_image (const std::string &fn, unsigned int width, unsigned
|
|||
|
||||
tl::log << "Saved image to " << fn;
|
||||
}
|
||||
#else
|
||||
void
|
||||
LayoutViewBase::save_image (const std::string &, unsigned int, unsigned int)
|
||||
{
|
||||
throw tl::Exception (tl::to_string (tr ("Unable to save image - PNG library not compiled in")));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_QT) && !defined(PREFER_LIBPNG_FOR_SAVE)
|
||||
|
|
@ -2708,7 +2720,7 @@ LayoutViewBase::save_image_with_options (const std::string &fn,
|
|||
|
||||
tl::log << "Saved image to " << fn;
|
||||
}
|
||||
#else
|
||||
#elif defined(HAVE_PNG)
|
||||
void
|
||||
LayoutViewBase::save_image_with_options (const std::string &fn,
|
||||
unsigned int width, unsigned int height, int linewidth, int oversampling, double resolution,
|
||||
|
|
@ -2739,6 +2751,14 @@ LayoutViewBase::save_image_with_options (const std::string &fn,
|
|||
|
||||
tl::log << "Saved image to " << fn;
|
||||
}
|
||||
#else
|
||||
void
|
||||
LayoutViewBase::save_image_with_options (const std::string &,
|
||||
unsigned int, unsigned int, int, int, double,
|
||||
lay::Color, lay::Color, lay::Color, const db::DBox &, bool)
|
||||
{
|
||||
throw tl::Exception (tl::to_string (tr ("Unable to save image - PNG library not compiled in")));
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in New Issue