Subversion Repositories Scribus

Rev

Rev 19249 | Rev 21542 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

INCLUDE(FindPkgConfig)
IF (HAVE_REVENGE)
        pkg_check_modules(LIBCDR libcdr-0.1>=0.1)
        IF (LIBCDR_FOUND)
                MESSAGE("Building Corel Draw Importer with librevenge")
                INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/scribus ${LIBREVENGE_INCLUDE_DIRS} ${LIBREVENGE_GENERATORS_INCLUDE_DIRS} ${LIBREVENGE_STREAM_INCLUDE_DIRS} ${LIBCDR_INCLUDE_DIRS})
                SET(IMPORTCDR_PLUGIN_MOC_CLASSES importcdr.h importcdrplugin.h)
                SET(IMPORTCDR_PLUGIN_SOURCES ../revenge/rawpainter.cpp importcdr.cpp importcdrplugin.cpp)
                SET(SCRIBUS_IMPORTCDR_PLUGIN "importcdr")
                QT5_WRAP_CPP(IMPORTCDR_PLUGIN_MOC_SOURCES ${IMPORTCDR_PLUGIN_MOC_CLASSES})
                ADD_LIBRARY(${SCRIBUS_IMPORTCDR_PLUGIN} MODULE ${IMPORTCDR_PLUGIN_SOURCES} ${IMPORTCDR_PLUGIN_MOC_SOURCES})
                TARGET_LINK_LIBRARIES(${SCRIBUS_IMPORTCDR_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBREVENGE_LDFLAGS} ${LIBREVENGE_GENERATORS_LDFLAGS} ${LIBREVENGE_STREAM_LDFLAGS} ${LIBCDR_LDFLAGS})
                INSTALL(TARGETS ${SCRIBUS_IMPORTCDR_PLUGIN} LIBRARY DESTINATION ${PLUGINDIR} PERMISSIONS ${PLUGIN_PERMISSIONS})
                ADD_DEPENDENCIES(${SCRIBUS_IMPORTCDR_PLUGIN} ${EXE_NAME})
        ENDIF (LIBCDR_FOUND)
ELSE (HAVE_REVENGE)
        pkg_check_modules(LIBWPG libwpg-0.2)
        IF (LIBWPG_FOUND)
                pkg_check_modules(LIBWPD libwpd-0.9)
                IF (LIBWPD_FOUND)
                        pkg_check_modules(LIBWPD_STREAM libwpd-stream-0.9)
                        IF (LIBWPD_STREAM_FOUND)
                                pkg_check_modules(LIBCDR libcdr-0.0=0.0)
                                IF (LIBCDR_FOUND)
                                        INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/scribus ${LIBWPG_INCLUDE_DIRS} ${LIBWPD_INCLUDE_DIRS} ${LIBWPD_STREAM_INCLUDE_DIRS} ${LIBCDR_INCLUDE_DIRS})
                                        SET(IMPORTCDR_PLUGIN_MOC_CLASSES importcdr.h importcdrplugin.h)
                                        SET(IMPORTCDR_PLUGIN_SOURCES importcdr.cpp importcdrplugin.cpp)
                                        SET(SCRIBUS_IMPORTCDR_PLUGIN "importcdr")
                                        QT5_WRAP_CPP(IMPORTCDR_PLUGIN_MOC_SOURCES ${IMPORTCDR_PLUGIN_MOC_CLASSES})
                                        ADD_LIBRARY(${SCRIBUS_IMPORTCDR_PLUGIN} MODULE ${IMPORTCDR_PLUGIN_SOURCES} ${IMPORTCDR_PLUGIN_MOC_SOURCES})
                                        TARGET_LINK_LIBRARIES(${SCRIBUS_IMPORTCDR_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBWPG_LDFLAGS} ${LIBWPD_LDFLAGS} ${LIBWPD_STREAM_LDFLAGS} ${LIBCDR_LDFLAGS})
                                        INSTALL(TARGETS ${SCRIBUS_IMPORTCDR_PLUGIN} LIBRARY DESTINATION ${PLUGINDIR} PERMISSIONS ${PLUGIN_PERMISSIONS})
                                        ADD_DEPENDENCIES(${SCRIBUS_IMPORTCDR_PLUGIN} ${EXE_NAME})
                                ENDIF (LIBCDR_FOUND)
                        ENDIF (LIBWPD_STREAM_FOUND)
                ENDIF (LIBWPD_FOUND)
        ENDIF (LIBWPG_FOUND)
ENDIF (HAVE_REVENGE)