1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00
Clementine-audio-player-Mac.../cmake/PythonQtBindings.cmake
2011-05-15 16:12:49 +00:00

24 lines
909 B
CMake

add_custom_target(pythonqt-bindings)
macro(add_pythonqt_bindings)
parse_arguments(ADD_PYTHONQT_BINDINGS
"NAME;HEADER;TYPESYSTEM"
""
${ARGN}
)
set(allheaders_filename ${CMAKE_CURRENT_SOURCE_DIR}/${ADD_PYTHONQT_BINDINGS_HEADER})
set(typesystem_filename ${CMAKE_CURRENT_SOURCE_DIR}/${ADD_PYTHONQT_BINDINGS_TYPESYSTEM})
set(target_name "pythonqt-bindings-${ADD_PYTHONQT_BINDINGS_NAME}")
add_custom_target(${target_name}
pythonqt-generator
--output-directory=${CMAKE_CURRENT_SOURCE_DIR}
--include-paths=${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${QT_HEADERS_DIR}:${QT_QTCORE_INCLUDE_DIR}:${QT_QTGUI_INCLUDE_DIR}:${QT_QTNETWORK_INCLUDE_DIR}
${allheaders_filename}
${typesystem_filename}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/pythonqt/generator
)
add_dependencies(pythonqt-bindings ${target_name})
endmacro(add_pythonqt_bindings)