Subversion Repositories Scribus

Rev

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

INCLUDE(FindPkgConfig)
IF (HAVE_REVENGE)
        pkg_check_modules(LIBMSPUB libmspub-0.1)
        IF (LIBMSPUB_FOUND)
                MESSAGE("Building MS-Publisher Importer with librevenge")
                INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/scribus ${LIBREVENGE_INCLUDE_DIRS} ${LIBREVENGE_GENERATORS_INCLUDE_DIRS} ${LIBREVENGE_STREAM_INCLUDE_DIRS} ${LIBMSPUB_INCLUDE_DIRS})
                SET(IMPORTPUB_PLUGIN_MOC_CLASSES importpub.h importpubplugin.h)
                SET(IMPORTPUB_PLUGIN_SOURCES ../revenge/rawpainter.cpp importpub.cpp importpubplugin.cpp)
                SET(SCRIBUS_IMPORTPUB_PLUGIN "importpub")
                QT5_WRAP_CPP(IMPORTPUB_PLUGIN_MOC_SOURCES ${IMPORTPUB_PLUGIN_MOC_CLASSES})
                ADD_LIBRARY(${SCRIBUS_IMPORTPUB_PLUGIN} MODULE ${IMPORTPUB_PLUGIN_SOURCES} ${IMPORTPUB_PLUGIN_MOC_SOURCES})
                TARGET_LINK_LIBRARIES(${SCRIBUS_IMPORTPUB_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBREVENGE_LDFLAGS} ${LIBREVENGE_GENERATORS_LDFLAGS} ${LIBREVENGE_STREAM_LDFLAGS} ${LIBMSPUB_LDFLAGS})
                INSTALL(TARGETS ${SCRIBUS_IMPORTPUB_PLUGIN} LIBRARY DESTINATION ${PLUGINDIR} PERMISSIONS ${PLUGIN_PERMISSIONS})
                ADD_DEPENDENCIES(${SCRIBUS_IMPORTPUB_PLUGIN} ${EXE_NAME})
        ENDIF (LIBMSPUB_FOUND)
ELSE (HAVE_REVENGE)
        pkg_check_modules(LIBMSPUB libmspub-0.0)
        IF (LIBMSPUB_FOUND)
                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)
                                        MESSAGE("Building MS-Publisher Importer without librevenge")
                                        INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/scribus ${LIBWPG_INCLUDE_DIRS} ${LIBWPD_INCLUDE_DIRS} ${LIBWPD_STREAM_INCLUDE_DIRS} ${LIBMSPUB_INCLUDE_DIRS})
                                        SET(IMPORTPUB_PLUGIN_MOC_CLASSES importpub.h importpubplugin.h)
                                        SET(IMPORTPUB_PLUGIN_SOURCES ../revenge/rawpainter.cpp importpub.cpp importpubplugin.cpp)
                                        SET(SCRIBUS_IMPORTPUB_PLUGIN "importpub")
                                        QT5_WRAP_CPP(IMPORTPUB_PLUGIN_MOC_SOURCES ${IMPORTPUB_PLUGIN_MOC_CLASSES})
                                        ADD_LIBRARY(${SCRIBUS_IMPORTPUB_PLUGIN} MODULE ${IMPORTPUB_PLUGIN_SOURCES} ${IMPORTPUB_PLUGIN_MOC_SOURCES})
                                        TARGET_LINK_LIBRARIES(${SCRIBUS_IMPORTPUB_PLUGIN} ${PLUGIN_LIBRARIES} ${LIBWPG_LDFLAGS} ${LIBWPD_LDFLAGS} ${LIBWPD_STREAM_LDFLAGS} ${LIBMSPUB_LDFLAGS})
                                        INSTALL(TARGETS ${SCRIBUS_IMPORTPUB_PLUGIN} LIBRARY DESTINATION ${PLUGINDIR} PERMISSIONS ${PLUGIN_PERMISSIONS})
                                        ADD_DEPENDENCIES(${SCRIBUS_IMPORTPUB_PLUGIN} ${EXE_NAME})
                                ENDIF (LIBWPD_STREAM_FOUND)
                        ENDIF (LIBWPD_FOUND)
                ENDIF (LIBWPG_FOUND)
        ENDIF (LIBMSPUB_FOUND)
ENDIF (HAVE_REVENGE)