# plugins-src/TWPythonPlugin/CMakeLists.txt

# plugins-src/TWPythonPlugin/CMakeLists.txt |
--- | ---
¶ # Build Python Plugin |
    INCLUDE_DIRECTORIES(
      ${TeXworks_SOURCE_DIR}/src
      ${QT_INCLUDE_DIR}
      ${PYTHON_INCLUDE_DIRS}
    )

    LINK_DIRECTORIES(${QT_LIBRARY_DIR})

    ADD_LIBRARY(TWPythonPlugin
      TWPythonPlugin.cpp
      ${PYTHON_PLUGIN_MOC}
    )
    TARGET_LINK_LIBRARIES(TWPythonPlugin ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${TEXWORKS_ADDITIONAL_LIBS})

    IF (${BUILD_SHARED_LIBS})
      INSTALL(TARGETS TWPythonPlugin
        LIBRARY DESTINATION ${TeXworks_PLUGIN_DIR}
      )
    ENDIF()