<commit_before>add_library ( GraphicsAPI INTERFACE )

target_include_directories ( GraphicsAPI INTERFACE $<INSTALL_INTERFACE:include> )

header_install (
    GraphicsAPI
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
    ""
    )

add_export ( GraphicsAPI "" )

SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

if(NOT NO_DYNAMIC_LINKING)
    coffee_library (
        TARGET GpuQuery
        SOURCES private/query/gpu_query.cpp
        LIBRARIES Core
        HEADER_DIRS
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
        )

    find_package( NvidiaML QUIET )

    find_package( LibDRM QUIET )

    if(NVIDIAML_FOUND)
        coffee_library (
            TARGET NVIDIAQuery
            LINKAGE SHARED
            SOURCES
            private/query/nvidia_query.cpp

            LIBRARIES
            ${NVIDIAML_LIBRARIES}
            Core
            GraphicsAPI
            )

        target_include_directories( NVIDIAQuery PRIVATE
            $<BUILD_INTERFACE:${NVIDIAML_INCLUDE_DIR}>
            )
    endif()

    if(LIBDRM_FOUND AND FALSE)
        coffee_library (
            TARGET LibDRMQuery
            LINKAGE SHARED
            SOURCES
            private/query/libdrm_query.cpp
            private/query/libdrm_query.c

            LIBRARIES
            ${LIBDRM_LIBRARIES}
            Core
            )

        target_include_directories( LibDRMQuery PRIVATE
            $<BUILD_INTERFACE:${LIBDRM_INCLUDE_DIR}>
            )
    endif()

    if(BUILD_OPENGL AND BUILD_GLEAM AND NOT EMSCRIPTEN AND NOT ANDROID AND NOT APPLE)
        coffee_library (
            TARGET OpenGLQuery
            LINKAGE SHARED
            NO_EXPORT
            SOURCES private/query/opengl_query.cpp

            LIBRARIES
            Core
            GLAD
            GLeamCommon
            GraphicsAPI
            )
    endif()<commit_msg> - [gpuquery] Fix linking<commit_after>add_library ( GraphicsAPI INTERFACE )

target_include_directories ( GraphicsAPI INTERFACE $<INSTALL_INTERFACE:include> )

header_install (
    GraphicsAPI
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
    ""
    )

add_export ( GraphicsAPI "" )

SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)

if(NOT NO_DYNAMIC_LINKING)
    coffee_library (
        TARGET GpuQuery
        SOURCES private/query/gpu_query.cpp
        LIBRARIES Core
        HEADER_DIRS
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
        )

    find_package( NvidiaML QUIET )

    find_package( LibDRM QUIET )

    if(NVIDIAML_FOUND)
        coffee_library (
            TARGET NVIDIAQuery
            LINKAGE SHARED
            SOURCES
            private/query/nvidia_query.cpp

            LIBRARIES
            ${NVIDIAML_LIBRARIES}
            Core
            GpuQuery
            )

        target_include_directories( NVIDIAQuery PRIVATE
            $<BUILD_INTERFACE:${NVIDIAML_INCLUDE_DIR}>
            )
    endif()

    if(LIBDRM_FOUND AND FALSE)
        coffee_library (
            TARGET LibDRMQuery
            LINKAGE SHARED
            SOURCES
            private/query/libdrm_query.cpp
            private/query/libdrm_query.c

            LIBRARIES
            ${LIBDRM_LIBRARIES}
            Core
            GpuQuery
            )

        target_include_directories( LibDRMQuery PRIVATE
            $<BUILD_INTERFACE:${LIBDRM_INCLUDE_DIR}>
            )
    endif()

    if(BUILD_OPENGL AND BUILD_GLEAM AND NOT EMSCRIPTEN AND NOT ANDROID AND NOT APPLE)
        coffee_library (
            TARGET OpenGLQuery
            LINKAGE SHARED
            NO_EXPORT
            SOURCES private/query/opengl_query.cpp

            LIBRARIES
            Core
            GLAD
            GLeamCommon
            GpuQuery
            )
    endif()
{'fraction_non_alphanumeric': 0.05801324503311258, 'fraction_numerical': 0.0, 'mean_word_length': 1.7541940189642597, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '2545898', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1109, 'n_words': 189}