Skip to content
Snippets Groups Projects
  • Gigg, Martyn Anthony's avatar
    655ff547
    Add support for sip v5 build system · 655ff547
    Gigg, Martyn Anthony authored
    The new sip build system complies with pep 517 and
    requires configuration by a standard pyproject.toml
    file rather than running a single command. Along with
    these changes the fixed sip.h file has been removed in
    favour of a header generated locally if required.
    
    We now support both the sip build systems as this is
    required in our current support for multiple OSes. In
    the process of adding support some cleanup has been
    included:
      - the .sip files in our tree are now full module defs
        rather than the boilerplate being filled in by CMake,
        giving each module more flexibility.
      - the sipwrapper file has been removed in favour of a
        simpler script to simply strip the problematic code
        for C++17 compatability.
    655ff547
    History
    Add support for sip v5 build system
    Gigg, Martyn Anthony authored
    The new sip build system complies with pep 517 and
    requires configuration by a standard pyproject.toml
    file rather than running a single command. Along with
    these changes the fixed sip.h file has been removed in
    favour of a header generated locally if required.
    
    We now support both the sip build systems as this is
    required in our current support for multiple OSes. In
    the process of adding support some cleanup has been
    included:
      - the .sip files in our tree are now full module defs
        rather than the boilerplate being filled in by CMake,
        giving each module more flexibility.
      - the sipwrapper file has been removed in favour of a
        simpler script to simply strip the problematic code
        for C++17 compatability.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
CMakeLists.txt 1.74 KiB
include(SipQtTargetFunctions)

set(COMMON_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/../../widgets/common/inc)
set(COMMON_SIP_DIR ${CMAKE_CURRENT_LIST_DIR}/../sip)
set(_header_depends
    ${COMMON_SIP_DIR}/vector.sip.h
    ${COMMON_SIP_DIR}/string.sip
    ${COMMON_SIP_DIR}/vector.sip
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/AlgorithmDialog.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Message.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/MessageDisplay.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/WorkspacePresenter/WorkspaceTreeWidget.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/HintStrategy.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Hint.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Batch/Row.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Batch/RowLocation.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Batch/JobTreeView.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/Batch/JobTreeViewSignalAdapter.h
    ${COMMON_INC_DIR}/MantidQtWidgets/Common/InstrumentSelector.h
)

list(APPEND common_link_libs ${CORE_MANTIDLIBS} ${POCO_LIBRARIES}
     PythonInterfaceCore
)

# Wrapper module linked against Qt5
if(ENABLE_WORKBENCH)
  mtd_add_sip_module(
    MODULE_NAME _commonqt5
    TARGET_NAME mantidqt_commonqt5
    HEADER_DEPS ${_header_depends}
    SIP_SRC _common.sip
    PYQT_VERSION 5
    INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR} ${COMMON_SIP_DIR}
    LINK_LIBS MantidQtWidgetsCommonQt5
              ${common_link_libs}
              Qt5::Core
              Qt5::Widgets
              Qt5::Gui
              Qt5::Qscintilla
              API
    INSTALL_DIR ${WORKBENCH_SITE_PACKAGES}/mantidqt
    LINUX_INSTALL_RPATH "\$ORIGIN/.."
    OSX_INSTALL_RPATH "@loader_path/.."
    FOLDER Qt5
  )
endif()

add_subdirectory(icons)
add_subdirectory(widgets/instrumentview)