<commit_before>project(pyside)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")

macro(execute_generator module sources typesystem_path)
    message("Running generator for ${module}...")
endmacro(execute_generator)

macro(create_pyside_module module_name typesystem_file module_include_dir module_libraries module_deps module_typesystem_path module_sources)
    add_custom_command(OUTPUT ${${module_sources}}
                        COMMAND ${GENERATOR} ${GENERATOR_EXTRA_FLAGS}
                        ${CMAKE_BINARY_DIR}/PySide/global.h
                        --include-paths=${pyside_SOURCE_DIR}:${QT_INCLUDE_DIR}
                        --typesystem-paths=${pyside_SOURCE_DIR}:${${module_typesystem_path}}
                        --output-directory=${CMAKE_CURRENT_BINARY_DIR}
                        --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
                        ${typesystem_file}
                        --api-version=${SUPPORTED_QT_VERSION}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                        COMMENT "Running generator for ${module_name}...")

    include_directories(${module_name} ${${module_include_dir}})
    add_library(${module_name} MODULE ${${module_sources}})
    set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
    if(WIN32)
        set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
    endif()
    target_link_libraries(${module_name} ${${module_libraries}})
    if(${module_deps})
        add_dependencies(${module_name} ${${module_deps}})
    endif()

    # install
    install(FILES ${pyside_BINARY_DIR}/${module_name}${CMAKE_DEBUG_POSTFIX}.so
            DESTINATION ${SITE_PACKAGE}/PySide)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module_name}/pyside_${module_name}_python.h
            DESTINATION include/PySide/${module_name}/)
    install(FILES ${typesystem_file}
            DESTINATION share/PySide/typesystems)
endmacro(create_pyside_module)


# Configure include based on platform
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
               "${CMAKE_CURRENT_BINARY_DIR}/global.h" @ONLY)


# Only add subdirectory if the associated Qt module is found.
macro(HAS_QT_MODULE var name)
if (DISABLE_${name})
    message(STATUS "Generation of ${name} disabled.")
else()
    if (${var})
        add_subdirectory(${name})
    else()
        message(STATUS "${name} NOT found. ${name} support disabled.")
    endif()<commit_msg>Fix install command to correct module name.<commit_after>project(pyside)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")

macro(execute_generator module sources typesystem_path)
    message("Running generator for ${module}...")
endmacro(execute_generator)

macro(create_pyside_module module_name typesystem_file module_include_dir module_libraries module_deps module_typesystem_path module_sources)
    add_custom_command(OUTPUT ${${module_sources}}
                        COMMAND ${GENERATOR} ${GENERATOR_EXTRA_FLAGS}
                        ${CMAKE_BINARY_DIR}/PySide/global.h
                        --include-paths=${pyside_SOURCE_DIR}:${QT_INCLUDE_DIR}
                        --typesystem-paths=${pyside_SOURCE_DIR}:${${module_typesystem_path}}
                        --output-directory=${CMAKE_CURRENT_BINARY_DIR}
                        --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt
                        ${typesystem_file}
                        --api-version=${SUPPORTED_QT_VERSION}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                        COMMENT "Running generator for ${module_name}...")

    include_directories(${module_name} ${${module_include_dir}})
    add_library(${module_name} MODULE ${${module_sources}})
    set_target_properties(${module_name} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${pyside_BINARY_DIR})
    if(WIN32)
        set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
    endif()
    target_link_libraries(${module_name} ${${module_libraries}})
    if(${module_deps})
        add_dependencies(${module_name} ${${module_deps}})
    endif()

    # install
    install(FILES ${pyside_BINARY_DIR}/${module_name}${CMAKE_DEBUG_POSTFIX}.so
            DESTINATION ${SITE_PACKAGE}/PySide)
    string(TOLOWER ${module_name} lower_module_name)
    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PySide/${module_name}/pyside_${lower_module_name}_python.h
            DESTINATION include/PySide/${module_name}/)
    install(FILES ${typesystem_file}
            DESTINATION share/PySide/typesystems)
endmacro(create_pyside_module)


# Configure include based on platform
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/global.h.in"
               "${CMAKE_CURRENT_BINARY_DIR}/global.h" @ONLY)


# Only add subdirectory if the associated Qt module is found.
macro(HAS_QT_MODULE var name)
if (DISABLE_${name})
    message(STATUS "Generation of ${name} disabled.")
else()
    if (${var})
        add_subdirectory(${name})
    else()
        message(STATUS "${name} NOT found. ${name} support disabled.")
    endif()
{'fraction_non_alphanumeric': 0.11897044804575786, 'fraction_numerical': 0.0007626310772163965, 'mean_word_length': 3.4195450716090985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5591174', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1554, 'n_words': 244}