Warning, /network/ruqola/src/rocketchatrestapi-qt/python/pyrocketchatrestapi-qt5/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0002 # SPDX-License-Identifier: BSD-3-Clause
0003 # Auto-Genereate files every class will have his cpp/h files
0004 set(pyrocketchatrestapi-qt5_SRC
0005     # individual classes
0006     ${CMAKE_CURRENT_BINARY_DIR}/RocketChatRestapiQt5/rocketchatrestapiqt5_module_wrapper.cpp
0007     ${CMAKE_CURRENT_BINARY_DIR}/RocketChatRestapiQt5/rocketchatrestapiqt5_module_wrapper.h
0008     ${CMAKE_CURRENT_BINARY_DIR}/RocketChatRestapiQt5/RocketChatRestapiQt5_python.h
0009     )
0010 
0011 # includes necessary to parse and build the classes specified on typesystem
0012 set(pyrocketchatrestapi-qt5_include_paths
0013     $<JOIN:$<TARGET_PROPERTY:librocketchatrestapi-qt5,INTERFACE_INCLUDE_DIRECTORIES>,${PATH_SEP}>
0014     )
0015 
0016 # A list of paths where shiboken should look for typesystem
0017 set(pyrocketchatrestapi-qt5_typesystem_paths
0018     # PySide path, this variable was exposed by FindPySide2.cmake
0019     ${PYSIDE_TYPESYSTEMS}
0020     )
0021 
0022 # Include flags/path that will be set in 'target_include_directories'
0023 set(pyrocketchatrestapi-qt5_target_include_directories
0024     ${CMAKE_SOURCE_DIR}
0025     )
0026 
0027 # Libraries that will be necessary to link the target, this will used in the command 'target_link_libraries'
0028 set(pyrocketchatrestapi-qt5_target_link_libraries
0029     Qt5::Core
0030     Qt5::Network
0031     Qt5::NetworkAuth
0032     Qt5::Gui
0033     Qt5::Widgets
0034     KF${KF_MAJOR_VERSION}::I18n
0035     ${Python3_LIBRARIES}
0036     )
0037 
0038 # changes on these files should trigger a new generation
0039 set(pyrocketchatrestapi-qt5_DEPENDS
0040     ${CMAKE_CURRENT_SOURCE_DIR}/rocketchatrestapi-qt5_global.h
0041     ${CMAKE_SOURCE_DIR}/src/rocketchatrestapi-qt5/restapimethod.h
0042     )
0043 
0044 create_python_bindings(
0045     "RocketChatRestApiQt5"
0046     "${pyrocketchatrestapi-qt5_typesystem_paths}"
0047     "${pyrocketchatrestapi-qt5_include_paths}"
0048     "${pyrocketchatrestapi-qt5_SRC}"
0049     "${pyrocketchatrestapi-qt5_target_include_directories}"
0050     "${pyrocketchatrestapi-qt5_target_link_libraries}"
0051     ${CMAKE_CURRENT_SOURCE_DIR}/rocketchatrestapi-qt5_global.h
0052     ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_rocketchatrestapi-qt5.xml
0053     "${pyrocketchatrestapi-qt5_DEPENDS}"
0054     ${CMAKE_CURRENT_BINARY_DIR}
0055     )
0056 
0057 # Make module import from build dir works
0058 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/__init__.py ${CMAKE_CURRENT_BINARY_DIR}/__init__.py)
0059 
0060 #TODO define PYTHON_BINDINGS_INSTALL_PREFIX
0061 # install
0062 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py DESTINATION ${PYTHON_BINDINGS_INSTALL_PREFIX}/pyrocketchatrestapi-qt5)