diff -ruN old/cmake/modules/FindPGF.cmake new/cmake/modules/FindPGF.cmake --- old/cmake/modules/FindPGF.cmake 1969-12-31 21:00:00.000000000 -0300 +++ new/cmake/modules/FindPGF.cmake 2010-03-30 13:54:13.520854878 -0300 @@ -0,0 +1,15 @@ +# - Try to find libpgf +# Once done this will define +# +# PGF_FOUND - system has libgf +# PGF_INCLUDE_DIRS - the libpgf include directory +# PGF_LIBRARIES - Link these to use libpgf + +# PKG-CONFIG is required. +INCLUDE(FindPkgConfig REQUIRED) + +IF(PKG_CONFIG_FOUND) + INCLUDE(FindPkgConfig) + + PKG_CHECK_MODULES(PGF libpgf) +ENDIF(PKG_CONFIG_FOUND) diff -ruN old/CMakeLists.txt new/CMakeLists.txt --- old/CMakeLists.txt 2010-03-28 19:26:06.000000000 -0300 +++ new/CMakeLists.txt 2010-03-30 19:50:55.537108644 -0300 @@ -34,6 +34,9 @@ "${DIGIKAM_VERSION_SHORT}${DIGIKAM_SUFFIX_VERSION}" ) +# Path to find FindPGF.cmake script. +SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") + # ================================================================================================== # Debug area codes # These codes will be set for every project specific path automatically, so @@ -115,6 +118,11 @@ FIND_PACKAGE(JPEG) FIND_PACKAGE(PNG) FIND_PACKAGE(TIFF) + +# Included to unbundle libpgf that is on portage tree. +# This function call the script cmake/modules/FindPGF.cmake +FIND_PACKAGE(PGF) + FIND_PACKAGE(Jasper) FIND_PACKAGE(Kdcraw) FIND_PACKAGE(Kexiv2) @@ -210,6 +218,7 @@ PRINT_QTMODULE_STATUS("Qt4 SQL" QT_QTSQL_FOUND) PRINT_LIBRARY_STATUS("libtiff" "http://www.remotesensing.org/libtiff" "" TIFF_FOUND) +PRINT_LIBRARY_STATUS("libpgf" "http://www.libpgf.org" "" PGF_FOUND) PRINT_LIBRARY_STATUS("libpng" "http://www.libpng.org/pub/png/libpng.html" " (version >= 1.2.7)" PNG_FOUND) PRINT_LIBRARY_STATUS("libjasper" "http://www.ece.uvic.ca/~mdadams/jasper" "" JASPER_FOUND) PRINT_LIBRARY_STATUS("liblcms" "http://www.littlecms.com" "" LCMS_FOUND) @@ -311,13 +320,13 @@ MESSAGE(STATUS "") ENDIF(DOXYGEN_FOUND) -IF(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) +IF(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND PGF_FOUND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) MESSAGE(STATUS " digiKam will be compiled................. YES") SET(DIGIKAM_CAN_BE_COMPILED true) -ELSE(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) +ELSE(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND PGF_FOUND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) MESSAGE(FATAL_ERROR " digiKam will be compiled................. NO (Look README file for more details about dependencies)") SET(DIGIKAM_CAN_BE_COMPILED false) -ENDIF(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) +ENDIF(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND PGF_FOUND AND JASPER_FOUND AND KDCRAW_FOR_DIGIKAM AND KEXIV2_FOUND AND KIPI_FOUND) MESSAGE(STATUS "----------------------------------------------------------------------------------") MESSAGE(STATUS "") @@ -952,14 +961,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/libs/threadimageio/pgfutils.cpp ) - SET(libpgf_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Decoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Encoder.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/PGFimage.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Stream.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/Subband.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/libpgf/WaveletTransform.cpp - ) + INCLUDE_DIRECTORIES(${PGF_INCLUDE_DIRS}) SET(libsqlite2_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/sqlite2/attach.c @@ -1258,18 +1260,41 @@ # ================================================================================================== # API documentation generation -IF(DOXYGEN_FOUND) +# Checks if user ask to build documentation. +IF(BUILD_DOC) + IF(DOXYGEN_FOUND) + + MESSAGE(STATUS "") + MESSAGE(STATUS "Documentation will be installed") + MESSAGE(STATUS "") - SET(API_DIR ${CMAKE_BINARY_DIR}/api) - SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}) - SET(DOXYFILE ${CMAKE_BINARY_DIR}/Doxyfile) - SET(WARNFILE ${CMAKE_BINARY_DIR}/doxygen-warn.log) + SET(API_DIR ${CMAKE_BINARY_DIR}/api) + SET(SOURCE_DIR ${CMAKE_SOURCE_DIR}) + SET(DOXYFILE ${CMAKE_BINARY_DIR}/Doxyfile) + SET(WARNFILE ${CMAKE_BINARY_DIR}/doxygen-warn.log) - CONFIGURE_FILE(Doxyfile.cmake ${DOXYFILE}) + CONFIGURE_FILE(Doxyfile.cmake ${DOXYFILE}) - ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXYFILE} - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXYFILE} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + + ELSE(DOXYGEN_FOUND) + + MESSAGE(STATUS "") + MESSAGE(STATUS "Documentation will NOT be installed") + MESSAGE(STATUS "Doxygen wasn't found on the system") + MESSAGE(STATUS "") + + ENDIF(DOXYGEN_FOUND) + +ELSE(BUILD_DOC) + + MESSAGE(STATUS "") + MESSAGE(STATUS "Documentation will NOT be installed") + MESSAGE(STATUS "Because the option -DBUILD_DOC=ON wasn't passed to cmake") + MESSAGE(STATUS "") + +ENDIF(BUILD_DOC) -ENDIF(DOXYGEN_FOUND) include(MacroOptionalAddSubdirectory) macro_optional_add_subdirectory( po ) diff -ruN old/digikam/CMakeLists.txt new/digikam/CMakeLists.txt --- old/digikam/CMakeLists.txt 2010-03-28 19:19:21.000000000 -0300 +++ new/digikam/CMakeLists.txt 2010-03-30 19:44:00.296860646 -0300 @@ -52,7 +52,6 @@ # specific libs and utilities ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/lprof ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/sqlite2 - ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/libpgf ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/clapack ${CMAKE_CURRENT_SOURCE_DIR}/../libs/3rdparty/cimg ${CMAKE_CURRENT_SOURCE_DIR}/../libs/themeengine @@ -89,6 +88,7 @@ ${JPEG_INCLUDE_DIR} ${PNG_PNG_INCLUDE_DIR} ${TIFF_INCLUDE_DIR} + ${PGF_INCLUDE_DIRS} ) IF(LENSFUN_LIBRARY) @@ -100,9 +100,6 @@ # Disable Clapack C code warnings. SET_SOURCE_FILES_PROPERTIES(${libclapack_SRCS} PROPERTIES COMPILE_FLAGS "-w") -# Disable libpgf warnings. -SET_SOURCE_FILES_PROPERTIES(${libpgf_SRCS} PROPERTIES COMPILE_FLAGS "-w") - # Disable liblqr C code warnings. SET_SOURCE_FILES_PROPERTIES(${liblqr_SRCS} PROPERTIES COMPILE_FLAGS "-w") @@ -121,7 +118,6 @@ ${libjpegutils_SRCS} ${libthreadimageio_SRCS} ${libthemeengine_SRCS} - ${libpgf_SRCS} ${pgfutils_SRCS} ${libdigikamhelpers_SRCS} @@ -173,6 +169,7 @@ ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${PNG_LIBRARIES} + ${PGF_LIBRARIES} ${LCMS_LIBRARIES} ${JASPER_LIBRARIES} @@ -225,7 +222,6 @@ ${libhaar_SRCS} ${libdatabasemodels_SRCS} ${libsqlite2_SRCS} - ${libpgf_SRCS} ${pgfutils_SRCS} ) @@ -240,6 +236,7 @@ ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTSQL_LIBRARY} + ${PGF_LIBRARIES} ) SET_TARGET_PROPERTIES(digikamdatabase PROPERTIES VERSION 1.0.0 SOVERSION 1 ) diff -ruN old/libs/CMakeLists.txt new/libs/CMakeLists.txt --- old/libs/CMakeLists.txt 2010-03-28 19:19:02.000000000 -0300 +++ new/libs/CMakeLists.txt 2010-03-30 14:03:07.365604017 -0300 @@ -18,6 +18,7 @@ ${JPEG_INCLUDE_DIR} ${TIFF_INCLUDE_DIR} ${PNG_INCLUDE_DIR} + ${PGF_INCLUDE_DIRS} ${JASPER_INCLUDE_DIR} ) ADD_SUBDIRECTORY( histogram )