diff options
author | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:03:48 +0000 |
---|---|---|
committer | samelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:03:48 +0000 |
commit | 0f962a277e58ccb2c6d9ee36ce68966db9b071cc (patch) | |
tree | e5341e2fcac3338daf25796bc20ae8c16307673e /kviewshell/plugins | |
parent | 19158a8de8416c95f7c961e107c475dd786f6449 (diff) | |
download | tdegraphics-0f962a277e58ccb2c6d9ee36ce68966db9b071cc.tar.gz tdegraphics-0f962a277e58ccb2c6d9ee36ce68966db9b071cc.zip |
[kdegraphics] cmake support for kamera, kcoloredit, and kviewshell
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1230743 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/plugins')
-rw-r--r-- | kviewshell/plugins/CMakeLists.txt | 12 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/CMakeLists.txt | 47 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/CMakeLists.txt | 41 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake | 25 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp | 8 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp | 2 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/GOS.cpp | 1 | ||||
-rw-r--r-- | kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp | 4 |
8 files changed, 133 insertions, 7 deletions
diff --git a/kviewshell/plugins/CMakeLists.txt b/kviewshell/plugins/CMakeLists.txt new file mode 100644 index 00000000..9efe72f9 --- /dev/null +++ b/kviewshell/plugins/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( djvu ) diff --git a/kviewshell/plugins/djvu/CMakeLists.txt b/kviewshell/plugins/djvu/CMakeLists.txt new file mode 100644 index 00000000..2d6ba936 --- /dev/null +++ b/kviewshell/plugins/djvu/CMakeLists.txt @@ -0,0 +1,47 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_subdirectory( libdjvu ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/../.. + ${CMAKE_CURRENT_SOURCE_DIR}/libdjvu + ${CMAKE_CURRENT_SOURCE_DIR}/../.. + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES djvumultipage.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES djvumultipage.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) +install( FILES djvumultipage.rc DESTINATION ${DATA_INSTALL_DIR} ) + + +##### djvuviewpart (module) ##################### + +tde_add_kpart( djvuviewpart + SOURCES + djvumultipage.cpp djvurenderer.cpp + kprintDialogPage_DJVUpageoptions.cpp + kprintDialogPage_DJVUconversionoptions.cpp + kprintDialogPage_DJVUconversionoptions_basewidget.ui + pageRangeWidget_base.ui pageRangeWidget.cpp prefs.kcfgc + LINK djvu-shared kmultipage-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt b/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt new file mode 100644 index 00000000..6426c975 --- /dev/null +++ b/kviewshell/plugins/djvu/libdjvu/CMakeLists.txt @@ -0,0 +1,41 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include( ConfigureChecks.cmake ) + +add_definitions( + -DUNIX + -DHAVE_STDINCLUDES +) + +include_directories( + ${CMAKE_BINARY_DIR} + ${TQT_INCLUDE_DIRS} +) + + +##### djvu (shared) ############################# + +tde_add_library( djvu SHARED + SOURCES + Arrays.cpp DjVuDocEditor.cpp DjVuMessageLite.cpp GOS.cpp IW44Image.cpp + BSByteStream.cpp DjVuDocument.cpp DjVuNavDir.cpp GPixmap.cpp JB2EncodeCodec.cpp + BSEncodeByteStream.cpp DjVuDumpHelper.cpp DjVuPalette.cpp GRect.cpp + JB2Image.cpp ByteStream.cpp DjVuErrorList.cpp DjVuPort.cpp GScaler.cpp + JPEGDecoder.cpp DataPool.cpp DjVuFileCache.cpp DjVuText.cpp GSmartPointer.cpp + MMRDecoder.cpp DjVuFile.cpp DjVuToPS.cpp GString.cpp MMX.cpp DjVmNav.cpp + debug.cpp DjVuGlobal.cpp GBitmap.cpp GThreads.cpp UnicodeByteStream.cpp + DjVmDir0.cpp DjVuGlobalMemory.cpp GContainer.cpp GUnicode.cpp XMLParser.cpp + DjVmDir.cpp DjVuImage.cpp GException.cpp GURL.cpp XMLTags.cpp DjVmDoc.cpp + DjVuInfo.cpp GIFFManager.cpp IFFByteStream.cpp ZPCodec.cpp DjVuAnno.cpp + DjVuMessage.cpp GMapAreas.cpp IW44EncodeCodec.cpp + DESTINATION ${LIB_INSTALL_DIR} +) diff --git a/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake b/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake new file mode 100644 index 00000000..50f708f1 --- /dev/null +++ b/kviewshell/plugins/djvu/libdjvu/ConfigureChecks.cmake @@ -0,0 +1,25 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include( CheckFunctionExists ) + +check_type_size( wchar_t WCHAR_T ) + +if( HAVE_WCHAR_T ) + tde_save( CMAKE_EXTRA_INCLUDE_FILES ) + set( CMAKE_EXTRA_INCLUDE_FILES wchar.h ) + check_type_size( mbstate_t MBSTATE_T ) + tde_restore( CMAKE_EXTRA_INCLUDE_FILES ) + check_function_exists( iswspace HAVE_ISWSPACE ) + if( HAVE_MBSTATE_T ) + check_function_exists( wcrtomb HAVE_WCRTOMB ) + endif( ) +endif( ) diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp index a6772e61..7cece60b 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuAnno.cpp @@ -241,8 +241,8 @@ GLObject::print(ByteStream & str, int compact, int indent, int * cur_pos) const else { char buf[8]; - static char *tr1 = "\"\\tnrbf"; - static char *tr2 = "\"\\\t\n\r\b\f"; + static const char *tr1 = "\"\\tnrbf"; + static const char *tr2 = "\"\\\t\n\r\b\f"; sprintf(buf,"\\%03o", (int)(((unsigned char*)data)[span])); for (int i=0; tr2[i]; i++) if (data[span] == tr2[i]) @@ -472,8 +472,8 @@ GLParser::get_token(const char * & start) } else { - static char *tr1 = "tnrbfva"; - static char *tr2 = "\t\n\r\b\f\013\007"; + const static char *tr1 = "tnrbfva"; + const static char *tr2 = "\t\n\r\b\f\013\007"; for (int i=0; tr1[i]; i++) if (c == tr1[i]) c = tr2[i]; diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp index beaa01bc..d18c7801 100644 --- a/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp +++ b/kviewshell/plugins/djvu/libdjvu/DjVuToPS.cpp @@ -267,7 +267,7 @@ DjVuToPS::DjVuToPS(void) DEBUG_MAKE_INDENT(3); DEBUG_MSG("Initializing dig2hex[]\n"); // Creating tables for bin=>text translation - static char * dig2hex="0123456789ABCDEF"; + static const char * dig2hex="0123456789ABCDEF"; int i; for(i=0;i<256;i++) { diff --git a/kviewshell/plugins/djvu/libdjvu/GOS.cpp b/kviewshell/plugins/djvu/libdjvu/GOS.cpp index 35aa8997..94449512 100644 --- a/kviewshell/plugins/djvu/libdjvu/GOS.cpp +++ b/kviewshell/plugins/djvu/libdjvu/GOS.cpp @@ -66,6 +66,7 @@ #include "GOS.h" #include "GURL.h" +#include <errno.h> #include <stdlib.h> #include <stdio.h> #include <ctype.h> diff --git a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp index 9bf184bd..c8b79809 100644 --- a/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp +++ b/kviewshell/plugins/djvu/libdjvu/IFFByteStream.cpp @@ -145,12 +145,12 @@ IFFByteStream::check_id(const char *id) if (id[i]<0x20 || id[i]>0x7e) return -1; // check composite chunks - static char *szComposite[] = { "FORM", "LIST", "PROP", "CAT ", 0 }; + static const char *szComposite[] = { "FORM", "LIST", "PROP", "CAT ", 0 }; for (i=0; szComposite[i]; i++) if (!memcmp(id, szComposite[i], 4)) return 1; // check reserved chunks - static char *szReserved[] = { "FOR", "LIS", "CAT", 0 }; + static const char *szReserved[] = { "FOR", "LIS", "CAT", 0 }; for (i=0; szReserved[i]; i++) if (!memcmp(id, szReserved[i], 3) && id[3]>='1' && id[3]<='9') return -1; |