diff options
author | Brody Kenrick <user.fake@server.userfake> | 2013-12-05 06:56:54 (GMT) |
---|---|---|
committer | Brody Kenrick <user.fake@server.userfake> | 2013-12-05 07:28:40 (GMT) |
commit | 0717c67c9fa894ecb08dc5de281753a00922d1ee (patch) | |
tree | 77baf10b4244a189f1212f3affee08a82a999013 /glib-2.0.pri | |
parent | d3b82dcac0cbd6bb46c3236d1183f84b76b44748 (diff) |
Unicode support for strings
Add suport for using unicode strings in .scad files. Support iterating
across them/accessing them via [] and searching.
--------
Add GLIB (to build for test and normal build -- both with installed and
built locally development files).
Add support for unicode chars to length and search builtin functions and
[] for strings.
Added unicode testing functions.
Ad GLIB to library info page.
Diffstat (limited to 'glib-2.0.pri')
-rw-r--r-- | glib-2.0.pri | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/glib-2.0.pri b/glib-2.0.pri new file mode 100644 index 0000000..0fbc4e2 --- /dev/null +++ b/glib-2.0.pri @@ -0,0 +1,38 @@ +# Detect glib-2.0, then use this priority list to determine +# which library to use: +# +# Priority +# 1. GLIB2_INCLUDEPATH / GLIB2_LIBPATH (qmake parameter, not checked it given on commandline) +# 2. OPENSCAD_LIBRARIES (environment variable) +# 3. system's standard include paths from pkg-config + +glib-2.0 { + +# read environment variables +OPENSCAD_LIBRARIES_DIR = $$(OPENSCAD_LIBRARIES) +GLIB2_DIR = $$(GLIB2DIR) + +!isEmpty(OPENSCAD_LIBRARIES_DIR) { + isEmpty(GLIB2_INCLUDEPATH) { + GLIB2_INCLUDEPATH_1 = $$OPENSCAD_LIBRARIES_DIR/include/glib-2.0 + GLIB2_INCLUDEPATH_2 = $$OPENSCAD_LIBRARIES_DIR/lib/glib-2.0/include + GLIB2_LIBPATH = $$OPENSCAD_LIBRARIES_DIR/lib + } +} + +isEmpty(GLIB2_INCLUDEPATH) { + GLIB2_CFLAGS = $$system("pkg-config --cflags glib-2.0") +} else { + GLIB2_CFLAGS = -I$$GLIB2_INCLUDEPATH_1 + GLIB2_CFLAGS += -I$$GLIB2_INCLUDEPATH_2 +} + +isEmpty(GLIB2_LIBPATH) { + GLIB2_LIBS = $$system("pkg-config --libs glib-2.0") +} else { + GLIB2_LIBS = -L$$GLIB2_LIBPATH -lglib-2.0 +} + +QMAKE_CXXFLAGS += $$GLIB2_CFLAGS +LIBS += $$GLIB2_LIBS +} |