Skip to content

required source headers does not exist in zip #2

Closed
@mgood7123

Description

unfortunately there are still more header files not present in the zip

/Users/smallville7123/StudioProjects/Astrid/app/src/main/cpp/SkiaApp/ViewSystem/SkiaBuild/Skia-m100-d5a507cafd-macos-Release-x64/src/gpu/GrShaderCaps.h:12:10: fatal error: 'src/gpu/glsl/GrGLSL.h' file not found
#include "src/gpu/glsl/GrGLSL.h"

Matthews-MacBook-Pro:SkiaApp smallville7123$ find . -name GrGLSL.h
./ViewSystem/SkiaBuild/skia/src/gpu/glsl/GrGLSL.h
Matthews-MacBook-Pro:SkiaApp smallville7123$

this is my CMake

cmake_minimum_required(VERSION 3.10.2)
project(SkiaBuild)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_library(SkiaBuild SHARED empty.cpp)
add_library(SkiaBuild_Debug SHARED empty.cpp)

target_compile_definitions(SkiaBuild PUBLIC SK_GL=1 SK_RELEASE=1)
target_compile_definitions(SkiaBuild_Debug PUBLIC SK_GL=1 SK_DEBUG=1)

set(SKIA_OUT Shared)
set(SKIA_OUT_DEBUG Shared_Debug)

set(SKIA_DIR        skia) #Skia-m100-d5a507cafd-macos-${SKIA_OUT})
set(SKIA_DIR_DEBUG  skia) #Skia-m100-d5a507cafd-macos-${SKIA_OUT_DEBUG})

target_include_directories(SkiaBuild PUBLIC
    ${SKIA_DIR}
    ${SKIA_DIR}/include/android
    ${SKIA_DIR}/include/c
    ${SKIA_DIR}/include/codec
    ${SKIA_DIR}/include/config
    ${SKIA_DIR}/include/core
    ${SKIA_DIR}/include/docs
    ${SKIA_DIR}/include/effects
    ${SKIA_DIR}/include/encode
    ${SKIA_DIR}/include/gpu
    ${SKIA_DIR}/include/pathops
    ${SKIA_DIR}/include/ports
    ${SKIA_DIR}/include/private
    ${SKIA_DIR}/include/sksl
    ${SKIA_DIR}/include/svg
    ${SKIA_DIR}/include/third_party/skcms
    ${SKIA_DIR}/include/third_party/vulkan
    ${SKIA_DIR}/include/utils
    ${SKIA_DIR}/src/core
    ${SKIA_DIR}/src/c
    ${SKIA_DIR}/src/codec
    ${SKIA_DIR}/src/core
    ${SKIA_DIR}/src/effects
    ${SKIA_DIR}/src/gpu
    ${SKIA_DIR}/src/image
    ${SKIA_DIR}/src/images
    ${SKIA_DIR}/src/lazy
    ${SKIA_DIR}/src/opts
    ${SKIA_DIR}/src/pathops
    ${SKIA_DIR}/src/pdf
    ${SKIA_DIR}/src/ports
    ${SKIA_DIR}/src/sfnt
    ${SKIA_DIR}/src/shaders
    ${SKIA_DIR}/src/sksl
    ${SKIA_DIR}/src/svg
    ${SKIA_DIR}/src/utils
    ${SKIA_DIR}/src/xml
    ${SKIA_DIR}/src/xps
)

target_include_directories(SkiaBuild_Debug PUBLIC
    ${SKIA_DIR_DEBUG}
    ${SKIA_DIR_DEBUG}/include/android
    ${SKIA_DIR_DEBUG}/include/c
    ${SKIA_DIR_DEBUG}/include/codec
    ${SKIA_DIR_DEBUG}/include/config
    ${SKIA_DIR_DEBUG}/include/core
    ${SKIA_DIR_DEBUG}/include/docs
    ${SKIA_DIR_DEBUG}/include/effects
    ${SKIA_DIR_DEBUG}/include/encode
    ${SKIA_DIR_DEBUG}/include/gpu
    ${SKIA_DIR_DEBUG}/include/pathops
    ${SKIA_DIR_DEBUG}/include/ports
    ${SKIA_DIR_DEBUG}/include/private
    ${SKIA_DIR_DEBUG}/include/sksl
    ${SKIA_DIR_DEBUG}/include/svg
    ${SKIA_DIR_DEBUG}/include/third_party/skcms
    ${SKIA_DIR_DEBUG}/include/third_party/vulkan
    ${SKIA_DIR_DEBUG}/include/utils
    ${SKIA_DIR_DEBUG}/src/core
    ${SKIA_DIR_DEBUG}/src/c
    ${SKIA_DIR_DEBUG}/src/codec
    ${SKIA_DIR_DEBUG}/src/core
    ${SKIA_DIR_DEBUG}/src/effects
    ${SKIA_DIR_DEBUG}/src/gpu
    ${SKIA_DIR_DEBUG}/src/image
    ${SKIA_DIR_DEBUG}/src/images
    ${SKIA_DIR_DEBUG}/src/lazy
    ${SKIA_DIR_DEBUG}/src/opts
    ${SKIA_DIR_DEBUG}/src/pathops
    ${SKIA_DIR_DEBUG}/src/pdf
    ${SKIA_DIR_DEBUG}/src/ports
    ${SKIA_DIR_DEBUG}/src/sfnt
    ${SKIA_DIR_DEBUG}/src/shaders
    ${SKIA_DIR_DEBUG}/src/sksl
    ${SKIA_DIR_DEBUG}/src/svg
    ${SKIA_DIR_DEBUG}/src/utils
    ${SKIA_DIR_DEBUG}/src/xml
    ${SKIA_DIR_DEBUG}/src/xps
)

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
        CMAKE_CXX_COMPILER_ID MATCHES "GNU")
    if(APPLE)
        set(WHOLE_ARCHIVE_FLAG "-Wl,-all_load" CACHE INTERNAL "all_load flag")
        set(NO_WHOLE_ARCHIVE_FLAG "-Wl,-noall_load" CACHE INTERNAL "noall_load flag")
    else()
        set(WHOLE_ARCHIVE_FLAG "-Wl,--whole-archive" CACHE INTERNAL "whole-archive flag")
        set(NO_WHOLE_ARCHIVE_FLAG "-Wl,--no-whole-archive" CACHE INTERNAL "no-whole-archive flag")
    endif()
else()
    set(WHOLE_ARCHIVE_FLAG "")
    set(NO_WHOLE_ARCHIVE_FLAG "")
endif()

# we cannot link to static libs such as icu, skresources, dng_sdk, pathkit, ect
# attempting to do so brings undefined references

#file(GLOB SKIA_LIBS_STATIC ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/*.a)
file(GLOB SKIA_WEBP_LIBS_STATIC ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/libwebp*.a)
file(GLOB SKIA_LIBS_SHARED ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/*.so)

target_link_libraries(
        SkiaBuild
        OpenGL_Library
        ${SKIA_LIBS_SHARED}

        ${WHOLE_ARCHIVE_FLAG}
        ${SKIA_LIBS_STATIC}

        # link to what we can
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/libexpat.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/libharfbuzz.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/libjpeg.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR}/out/${SKIA_OUT}/libpiex.a
        ${SKIA_WEBP_LIBS_STATIC}

        ${NO_WHOLE_ARCHIVE_FLAG}
)

#file(GLOB SKIA_LIBS_STATIC_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/*.a)
file(GLOB SKIA_WEBP_LIBS_STATIC_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/libwebp*.a)
file(GLOB SKIA_LIBS_SHARED_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/*.so)

target_link_libraries(
        SkiaBuild_Debug
        OpenGL_Library
        ${SKIA_LIBS_SHARED_DEBUG}

        ${WHOLE_ARCHIVE_FLAG}
        ${SKIA_LIBS_STATIC_DEBUG}

        # link to what we can
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/libexpat.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/libharfbuzz.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/libjpeg.a
        ${CMAKE_CURRENT_SOURCE_DIR}/${SKIA_DIR_DEBUG}/out/${SKIA_OUT_DEBUG}/libpiex.a
        ${SKIA_WEBP_LIBS_STATIC_DEBUG}

        ${NO_WHOLE_ARCHIVE_FLAG}
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions