From b5da87da8f00a22ae1423a55bd087318085df1e2 Mon Sep 17 00:00:00 2001 From: luncliff Date: Sat, 5 Oct 2024 23:11:12 +0900 Subject: [PATCH] [google-filament] update to v1.54.5 * https://github.com/google/filament/releases/tag/v1.54.5 --- ports/google-filament/fix-cmake.patch | 978 ++++-------------------- ports/google-filament/fix-sources.patch | 462 +++++++---- ports/google-filament/portfile.cmake | 63 +- ports/google-filament/vcpkg.json | 4 +- 4 files changed, 463 insertions(+), 1044 deletions(-) diff --git a/ports/google-filament/fix-cmake.patch b/ports/google-filament/fix-cmake.patch index 6dd92ebb..e10058cf 100644 --- a/ports/google-filament/fix-cmake.patch +++ b/ports/google-filament/fix-cmake.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 976c3e4..763808b 100644 +index 283778b..ca292fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -7,6 +7,7 @@ cmake_minimum_required(VERSION 3.19) +@@ -15,6 +15,7 @@ endif() # Project declaration # ================================================================================================== project(TNT) @@ -10,190 +10,73 @@ index 976c3e4..763808b 100644 # ================================================================================================== # Options -@@ -162,32 +163,11 @@ if (IOS) - endif() - - if (WIN32) -- # Link statically against c/c++ lib to avoid missing redistriburable such as -- # "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users -- # a choice to opt for the shared runtime if they want. -- option(USE_STATIC_CRT "Link against the static runtime libraries." ON) -- - # On Windows we need to instruct cmake to generate the .def in order to get the .lib required - # when linking against dlls. CL.EXE will not generate .lib without .def file (or without pragma - # __declspec(dllexport) in front of each functions). - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) - -- # The CMAKE_CXX_FLAGS vars can be overriden by some Visual Studio generators, so we use an alternative -- # global method here: -- if (${USE_STATIC_CRT}) -- add_compile_options( -- $<$:/MT> -- $<$:/MTd> -- $<$:/MT> -- ) -- else() -- add_compile_options( -- $<$:/MD> -- $<$:/MDd> -- $<$:/MD> -- ) -- endif() -- - # TODO: Figure out why pdb generation messes with incremental compilaton. - # IN RELEASE_WITH_DEBUG_INFO, generate debug info in .obj, no in pdb. - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Z7") -@@ -280,16 +260,14 @@ endif() - # ================================================================================================== +@@ -301,12 +302,14 @@ endif() # General compiler flags # ================================================================================================== --set(CXX_STANDARD "-std=c++17") -+set(CMAKE_C_STANDARD 11) + set(CXX_STANDARD "-std=c++17") +set(CMAKE_CXX_STANDARD 17) if (WIN32) -- set(CXX_STANDARD "/std:c++17") -+ set(CMAKE_CXX_STANDARD 20) + set(CXX_STANDARD "/std:c++17") endif() --if (MSVC) -- set(CXX_STANDARD "/std:c++latest") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /W0 /Zc:__cplusplus") --else() -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations") -+if (NOT MSVC) -+ add_compile_options(-fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations) - endif() - - if (FILAMENT_USE_EXTERNAL_GLES3) -@@ -411,7 +389,7 @@ endif() + if (MSVC) + set(CXX_STANDARD "/std:c++latest") ++ set(CMAKE_CXX_STANDARD 20) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /W0 /Zc:__cplusplus") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} -fstrict-aliasing -Wno-unknown-pragmas -Wno-unused-function -Wno-deprecated-declarations") +@@ -437,7 +440,7 @@ endif() # Linker flags # ================================================================================================== # Strip unused sections -if (NOT WEBGL) -+if (NOT WEBGL AND NOT WIN32) ++if (NOT WEBGL AND NOT MSVC) set(GC_SECTIONS "-Wl,--gc-sections") endif() - set(B_SYMBOLIC_FUNCTIONS "-Wl,-Bsymbolic-functions") -@@ -531,27 +509,7 @@ set(MATC_BASE_FLAGS ${MATC_API_FLAGS} -p ${MATC_TARGET} ${MATC_OPT_FLAGS}) - # Distribution - # ================================================================================================== - # choose where to put the objects in the dist folder --if (NOT DIST_ARCH) -- # On Apple silicon, the value of CMAKE_HOST_SYSTEM_PROCESSOR varies based on the CMake process's -- # own architecture. Because of this, running a x86_64 CMake binary on Apple silicon will cause -- # DIST_ARCH to be set incorrectly. -- set(DIST_ARCH "${CMAKE_HOST_SYSTEM_PROCESSOR}") -- -- if (CMAKE_OSX_ARCHITECTURES MATCHES ".*;.*") -- set(DIST_ARCH "universal") -- else() -- if (NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") -- set(DIST_ARCH "${CMAKE_OSX_ARCHITECTURES}") -- endif() -- endif() -- --endif() --# On Windows machines, the host processor is set to 'AMD64', which we'll interpret as x86_64. --string(TOLOWER "${DIST_ARCH}" DIST_ARCH) --string(REPLACE "amd64" "x86_64" DIST_ARCH "${DIST_ARCH}") --if (NOT DIST_DIR) -- set(DIST_DIR "${DIST_ARCH}") --endif() -+set(DIST_DIR "") - # ================================================================================================== - # Functions -@@ -640,16 +598,18 @@ endif() - # Also be sure to include the ASM language in the CMake "project" directive for your project. - function(get_resgen_vars ARCHIVE_DIR ARCHIVE_NAME) - set(OUTPUTS -- ${ARCHIVE_DIR}/${ARCHIVE_NAME}.bin - ${ARCHIVE_DIR}/${ARCHIVE_NAME}.S -- ${ARCHIVE_DIR}/${ARCHIVE_NAME}.apple.S - ${ARCHIVE_DIR}/${ARCHIVE_NAME}.h - ) -+ if(NOT WIN32) -+ list(APPEND OUTPUTS ${ARCHIVE_DIR}/${ARCHIVE_NAME}.bin) -+ endif() - if (IOS) - set(ASM_ARCH_FLAG "-arch ${DIST_ARCH}") - endif() - if (APPLE) - set(ASM_SUFFIX ".apple") -+ list(APPEND OUTPUTS ${ARCHIVE_DIR}/${ARCHIVE_NAME}.apple.S) - endif() - set(RESGEN_HEADER "${ARCHIVE_DIR}/${ARCHIVE_NAME}.h" PARENT_SCOPE) - # Visual Studio makes it difficult to use assembly without using MASM. MASM doesn't support -@@ -671,7 +631,57 @@ endfunction() +@@ -715,7 +718,32 @@ endfunction() # ================================================================================================== # Common to all platforms -add_subdirectory(${EXTERNAL}/libgtest/tnt) -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(ZSTD REQUIRED IMPORTED_TARGET GLOBAL libzstd>=1.5) # PkgConfig::ZSTD -+ -+find_package(PNG REQUIRED) # PNG::PNG ++find_package(GTest CONFIG REQUIRED) # GTest::gtest ++find_package(tsl-robin-map CONFIG REQUIRED) # tsl::robin_map ++find_path(BASISU_INCLUDE_DIRS NAMES "transcoder/basisu_transcoder.h" PATH_SUFFIXES "basisu" REQUIRED) ++find_library(BASIS_ENCODER_LIBRARY NAMES basisu_encoder REQUIRED) ++find_library(BASIS_TRANSCODER_LIBRARY NAMES basisu_transcoder REQUIRED) +find_package(civetweb CONFIG REQUIRED) # civetweb::civetweb-cpp +find_package(imgui CONFIG REQUIRED) # imgui::imgui -+find_package(tsl-robin-map CONFIG REQUIRED) # tsl::robin_map ++find_package(benchmark CONFIG REQUIRED) # benchmark::benchmark +find_package(meshoptimizer CONFIG REQUIRED) # meshoptimizer::meshoptimizer +find_package(mikktspace CONFIG REQUIRED) # mikktspace::mikktspace +find_package(draco CONFIG REQUIRED) # draco::draco -+ -+find_package(glslang CONFIG REQUIRED) # glslang::glslang -+find_package(spirv_cross_core CONFIG REQUIRED) # spirv-cross-core -+find_package(spirv_cross_glsl CONFIG REQUIRED) # spirv-cross-glsl -+find_package(spirv_cross_hlsl CONFIG REQUIRED) # spirv-cross-hlsl -+find_package(spirv_cross_msl CONFIG REQUIRED) # spirv-cross-msl -+ -+find_package(GTest CONFIG REQUIRED) # GTest::gtest -+find_package(benchmark CONFIG REQUIRED) # benchmark::benchmark benchmark::benchmark_main -+ ++find_package(zstd CONFIG REQUIRED) # zstd::libzstd ++find_package(PNG REQUIRED) # PNG::PNG ++find_path(GETOPT_INCLUDE_DIR NAMES "getopt/getopt.h" "getopt.h" REQUIRED) ++find_library(GETOPT_LIBRARY NAMES getopt c REQUIRED) +find_path(CGLTF_INCLUDE_DIRS NAMES "cgltf.h" REQUIRED) +find_path(JSMN_INCLUDE_DIRS NAMES "jsmn.h" REQUIRED) +find_path(STB_INCLUDE_DIRS NAMES "stb_image.h" REQUIRED) +find_path(BASISU_INCLUDE_DIRS NAMES "transcoder/basisu_transcoder.h" PATH_SUFFIXES "basisu" REQUIRED) -+ -+find_package(tinyexr CONFIG REQUIRED) # unofficial::tinyexr::tinyexr -+find_library(BASIS_ENCODER_LIBRARY NAMES basisu_encoder REQUIRED) # vcpkg: basisu -+find_library(BASIS_TRANSCODER_LIBRARY NAMES basisu_transcoder REQUIRED) # vcpkg: basisu -+if(APPLE) -+ find_package(OpenCL REQUIRED) # OpenCL::OpenCL -+ link_libraries(OpenCL::OpenCL) -+endif() -+ -+find_library(GETOPT_LIBRARY NAMES getopt c) -+if(GETOPT_LIBRARY) -+ get_filename_component(GETOPT_LIBPATH "${GETOPT_LIBRARY}" PATH) -+ link_directories(${GETOPT_LIBPATH}) -+endif() -+ +include_directories( -+ ${CGLTF_INCLUDE_DIRS} ${JSMN_INCLUDE_DIRS} ${STB_INCLUDE_DIRS} + ${BASISU_INCLUDE_DIRS} ++ ${CGLTF_INCLUDE_DIRS} ++ ${JSMN_INCLUDE_DIRS} ++ ${STB_INCLUDE_DIRS} ++ ${GETOPT_INCLUDE_DIR} +) -+link_libraries( -+ unofficial::tinyexr::tinyexr -+ PkgConfig::ZSTD -+) -+ -+add_subdirectory(${EXTERNAL}/hat-trie/tnt) # TODO: make port -+add_subdirectory(${EXTERNAL}/smol-v/tnt) # TODO: make port -+ add_subdirectory(${LIBRARIES}/camutils) add_subdirectory(${LIBRARIES}/filabridge) add_subdirectory(${LIBRARIES}/filaflat) -@@ -689,28 +699,15 @@ add_subdirectory(${LIBRARIES}/uberz) - add_subdirectory(${LIBRARIES}/utils) +@@ -733,29 +761,22 @@ add_subdirectory(${LIBRARIES}/utils) add_subdirectory(${LIBRARIES}/viewer) add_subdirectory(${FILAMENT}/filament) --add_subdirectory(${FILAMENT}/shaders) + add_subdirectory(${FILAMENT}/shaders) -add_subdirectory(${EXTERNAL}/basisu/tnt) -add_subdirectory(${EXTERNAL}/civetweb/tnt) --add_subdirectory(${EXTERNAL}/hat-trie/tnt) -add_subdirectory(${EXTERNAL}/imgui/tnt) -add_subdirectory(${EXTERNAL}/robin-map/tnt) --add_subdirectory(${EXTERNAL}/smol-v/tnt) + add_subdirectory(${EXTERNAL}/smol-v/tnt) -add_subdirectory(${EXTERNAL}/benchmark/tnt) -add_subdirectory(${EXTERNAL}/meshoptimizer/tnt) -add_subdirectory(${EXTERNAL}/mikktspace) @@ -202,7 +85,9 @@ index 976c3e4..763808b 100644 -add_subdirectory(${EXTERNAL}/jsmn/tnt) -add_subdirectory(${EXTERNAL}/stb/tnt) -add_subdirectory(${EXTERNAL}/getopt) -+add_subdirectory(${FILAMENT}/shaders) # requires host executables? + + # Note that this has to be placed after mikktspace in order for combine_static_libs to work. + add_subdirectory(${LIBRARIES}/geometry) if (FILAMENT_BUILD_FILAMAT OR IS_HOST_PLATFORM) - # spirv-tools must come before filamat, as filamat relies on the presence of the @@ -210,25 +95,48 @@ index 976c3e4..763808b 100644 - add_subdirectory(${EXTERNAL}/spirv-tools) - add_subdirectory(${EXTERNAL}/glslang/tnt) - add_subdirectory(${EXTERNAL}/spirv-cross/tnt) -+ find_package(SDL2 CONFIG REQUIRED) # SDL2::SDL2 SDL2::SDL2main ++ find_package(SDL2 CONFIG REQUIRED) # SDL2::SDL2 + find_package(glslang CONFIG REQUIRED) # glslang::glslang + find_package(SPIRV-Tools CONFIG REQUIRED) + find_package(SPIRV-Tools-opt CONFIG REQUIRED) + find_package(SPIRV-Tools-link CONFIG REQUIRED) + find_package(SPIRV-Tools-lint CONFIG REQUIRED) ++ find_package(spirv_cross_core CONFIG REQUIRED) # spirv-cross-core ++ find_package(spirv_cross_glsl CONFIG REQUIRED) # spirv-cross-glsl ++ find_package(spirv_cross_hlsl CONFIG REQUIRED) # spirv-cross-hlsl ++ find_package(spirv_cross_msl CONFIG REQUIRED) # spirv-cross-msl add_subdirectory(${LIBRARIES}/filamat) # the material debugger requires filamat -@@ -721,7 +718,7 @@ endif() +@@ -766,9 +787,12 @@ endif() if (FILAMENT_SUPPORTS_VULKAN) add_subdirectory(${LIBRARIES}/bluevk) - add_subdirectory(${EXTERNAL}/vkmemalloc/tnt) +- set(SPIRV_HEADERS_SKIP_EXAMPLES ON) +- add_subdirectory(${EXTERNAL}/spirv-headers) + find_path(VKMEMALLOC_INCLUDE_DIR NAMES "vk_mem_alloc.h" REQUIRED) ++ find_path(SPIRV_HEADERS_INCLUDE_DIR NAMES "spirv/1.0/GLSL.std.450.h" REQUIRED) ++ include_directories( ++ ${VKMEMALLOC_INCLUDE_DIR} ++ ${SPIRV_HEADERS_INCLUDE_DIR} ++ ) endif() set(FILAMENT_SAMPLES_BINARY_DIR ${PROJECT_BINARY_DIR}/samples) -@@ -742,18 +739,18 @@ if (IS_HOST_PLATFORM) +@@ -779,6 +803,11 @@ if (WEBGL) + endif() + + if (IS_HOST_PLATFORM) ++ find_package(assimp CONFIG REQUIRED) # assimp::assimp ++ find_package(PNG REQUIRED) # PNG::PNG ++ find_package(SDL2 CONFIG REQUIRED) # SDL2::SDL2 SDL2::SDL2main ++ find_package(ZLIB REQUIRED) # ZLIB::ZLIB ++ find_package(tinyexr CONFIG REQUIRED) # unofficial::tinyexr::tinyexr + if (FILAMENT_SUPPORTS_OPENGL) + add_subdirectory(${LIBRARIES}/bluegl) + endif() +@@ -789,12 +818,6 @@ if (IS_HOST_PLATFORM) add_subdirectory(${FILAMENT}/samples) @@ -237,27 +145,15 @@ index 976c3e4..763808b 100644 - add_subdirectory(${EXTERNAL}/libsdl2/tnt) - add_subdirectory(${EXTERNAL}/libz/tnt) - add_subdirectory(${EXTERNAL}/tinyexr/tnt) -+ find_package(assimp CONFIG REQUIRED) # assimp::assimp -+ find_package(PNG REQUIRED) # PNG::PNG -+ find_package(SDL2 CONFIG REQUIRED) # SDL2::SDL2 SDL2::SDL2main -+ find_package(ZLIB REQUIRED) # ZLIB::ZLIB -+ find_package(tinyexr CONFIG REQUIRED) # unofficial::tinyexr::tinyexr - +- add_subdirectory(${TOOLS}/cmgen) add_subdirectory(${TOOLS}/cso-lut) add_subdirectory(${TOOLS}/filamesh) - add_subdirectory(${TOOLS}/glslminifier) - add_subdirectory(${TOOLS}/matc) -- add_subdirectory(${TOOLS}/matinfo) -+ # add_subdirectory(${TOOLS}/matinfo) - add_subdirectory(${TOOLS}/mipgen) - add_subdirectory(${TOOLS}/normal-blending) - add_subdirectory(${TOOLS}/resgen) diff --git a/filament/CMakeLists.txt b/filament/CMakeLists.txt -index ea2543e..a0b815f 100644 +index 18f402a..6bf8263 100644 --- a/filament/CMakeLists.txt +++ b/filament/CMakeLists.txt -@@ -581,8 +581,8 @@ target_link_libraries(${TARGET} PRIVATE +@@ -616,8 +616,8 @@ target_link_libraries(${TARGET} PRIVATE set(INSTALL_TYPE ARCHIVE) install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR}) install(DIRECTORY ${PUBLIC_HDR_DIR}/filament DESTINATION include) @@ -268,268 +164,41 @@ index ea2543e..a0b815f 100644 # ================================================================================================== # Sub-projects -diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt -index c11bbc4..a4b9402 100644 ---- a/filament/backend/CMakeLists.txt -+++ b/filament/backend/CMakeLists.txt -@@ -63,7 +63,7 @@ set(PRIVATE_HDRS - # OpenGL / OpenGL ES Sources - # ================================================================================================== - --if (FILAMENT_SUPPORTS_OPENGL AND NOT FILAMENT_USE_EXTERNAL_GLES3 AND NOT FILAMENT_USE_SWIFTSHADER) -+if (FILAMENT_SUPPORTS_OPENGL AND NOT FILAMENT_USE_SWIFTSHADER) - list(APPEND SRCS - include/backend/platforms/OpenGLPlatform.h - src/opengl/gl_headers.cpp -@@ -85,7 +85,7 @@ if (FILAMENT_SUPPORTS_OPENGL AND NOT FILAMENT_USE_EXTERNAL_GLES3 AND NOT FILAMEN - src/opengl/ShaderCompilerService.cpp - src/opengl/ShaderCompilerService.h - ) -- if (EGL) -+ if (EGL OR FILAMENT_USE_EXTERNAL_GLES3) - list(APPEND SRCS src/opengl/platforms/PlatformEGL.cpp) - endif() - if (ANDROID) -@@ -410,39 +410,20 @@ if (APPLE) - - target_link_libraries(backend_test PRIVATE - backend -- getopt -- gtest -+ ${GETOPT_LIBRARY} -+ GTest::gtest - filamat -- SPIRV -+ glslang::SPIRV -+ glslang::SPVRemapper - spirv-cross-glsl) - -- set(BACKEND_TEST_DEPS -- OGLCompiler -- OSDependent -- SPIRV -- SPIRV-Tools -- SPIRV-Tools-opt -- backend_test -- getopt -- gtest -- glslang -- spirv-cross-core -- spirv-cross-glsl -- spirv-cross-msl -- ) -- - if (NOT IOS) - target_link_libraries(backend_test PRIVATE image imageio) -- list(APPEND BACKEND_TEST_DEPS image imageio) - endif() - -- set(BACKEND_TEST_COMBINED_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libbackendtest_combined.a") -- combine_static_libs(backend_test "${BACKEND_TEST_COMBINED_OUTPUT}" "${BACKEND_TEST_DEPS}") -- - set(BACKEND_TEST_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}backend_test${CMAKE_STATIC_LIBRARY_SUFFIX}) - - if (INSTALL_BACKEND_TEST) -- install(FILES "${BACKEND_TEST_COMBINED_OUTPUT}" DESTINATION lib/${DIST_DIR} RENAME ${BACKEND_TEST_LIB_NAME}) - install(FILES test/PlatformRunner.h DESTINATION include/backend_test) - endif() - -@@ -305,7 +305,7 @@ if(FILAMENT_SUPPORTS_OPENGL AND NOT IOS AND NOT ANDROID AND NOT WEBGL) - endif() - - if (FILAMENT_SUPPORTS_VULKAN) -- target_link_libraries(${TARGET} PUBLIC bluevk vkmemalloc vkshaders smol-v) -+ target_link_libraries(${TARGET} PUBLIC bluevk vkshaders smol-v) - endif() - - if (FILAMENT_SUPPORTS_METAL) -@@ -471,8 +452,8 @@ add_executable(compute_test - - target_link_libraries(compute_test PRIVATE - backend -- getopt -- gtest -+ ${GETOPT_LIBRARY} -+ GTest::gtest - ) - - set_target_properties(compute_test PROPERTIES FOLDER Tests) -diff --git a/filament/benchmark/CMakeLists.txt b/filament/benchmark/CMakeLists.txt -index a14f15b..cb24126 100644 ---- a/filament/benchmark/CMakeLists.txt -+++ b/filament/benchmark/CMakeLists.txt -@@ -10,6 +10,6 @@ set(BENCHMARK_SRCS - - add_executable(benchmark_filament ${BENCHMARK_SRCS}) - --target_link_libraries(benchmark_filament PRIVATE benchmark_main utils math filament) -+target_link_libraries(benchmark_filament PRIVATE benchmark::benchmark_main utils math filament) - - set_target_properties(benchmark_filament PROPERTIES FOLDER Benchmarks) -diff --git a/filament/test/CMakeLists.txt b/filament/test/CMakeLists.txt -index f9aedc5..9c05f28 100644 ---- a/filament/test/CMakeLists.txt -+++ b/filament/test/CMakeLists.txt -@@ -48,7 +48,7 @@ if (TNT_DEV) - filament_framegraph_test.cpp - filament_test.cpp) - -- target_link_libraries(test_${TARGET} PRIVATE filament gtest) -+ target_link_libraries(test_${TARGET} PRIVATE filament GTest::gtest) - target_compile_options(test_${TARGET} PRIVATE ${COMPILER_FLAGS}) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - -@@ -59,7 +59,7 @@ endif() - add_executable(test_material_parser - filament_test_material_parser.cpp - ${RESGEN_SOURCE}) --target_link_libraries(test_material_parser PRIVATE filament gtest) -+target_link_libraries(test_material_parser PRIVATE filament GTest::gtest) - target_compile_options(test_material_parser PRIVATE ${COMPILER_FLAGS}) - target_include_directories(test_material_parser PRIVATE ${RESOURCE_DIR}) - set_target_properties(test_material_parser PROPERTIES FOLDER Tests) -diff --git a/libs/bluegl/CMakeLists.txt b/libs/bluegl/CMakeLists.txt -index 9ce75c1..0e8d283 100644 ---- a/libs/bluegl/CMakeLists.txt -+++ b/libs/bluegl/CMakeLists.txt -@@ -72,5 +72,5 @@ endif() - - # and we're linking against the libraries below, importing their public headers - target_link_libraries(test_${TARGET} LINK_PUBLIC ${TARGET}) --target_link_libraries(test_${TARGET} LINK_PUBLIC gtest) -+target_link_libraries(test_${TARGET} LINK_PUBLIC GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) -diff --git a/libs/bluevk/CMakeLists.txt b/libs/bluevk/CMakeLists.txt -index 9e7ee65..ae52cad 100644 ---- a/libs/bluevk/CMakeLists.txt -+++ b/libs/bluevk/CMakeLists.txt -@@ -31,7 +31,7 @@ set_target_properties(${TARGET} PROPERTIES FOLDER Libs) - # test_bluevk is not supported on mobile or Windows - if (NOT ANDROID AND NOT IOS AND NOT WIN32 AND NOT FILAMENT_SKIP_SDL2) - add_executable(test_bluevk tests/test_bluevk_sdl.cpp) -- target_link_libraries(test_bluevk PRIVATE dl bluevk sdl2) -+ target_link_libraries(test_bluevk PRIVATE dl bluevk SDL2::SDL2) - endif() - - install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR}) -diff --git a/libs/camutils/CMakeLists.txt b/libs/camutils/CMakeLists.txt -index 541261c..3931767 100644 ---- a/libs/camutils/CMakeLists.txt -+++ b/libs/camutils/CMakeLists.txt -@@ -52,6 +52,6 @@ install(DIRECTORY ${PUBLIC_HDR_DIR}/camutils DESTINATION include) - # ================================================================================================== - if (NOT ANDROID AND NOT WEBGL AND NOT IOS) - add_executable(test_${TARGET} tests/test_camutils.cpp) -- target_link_libraries(test_${TARGET} PRIVATE camutils gtest) -+ target_link_libraries(test_${TARGET} PRIVATE camutils GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - endif() -diff --git a/libs/filaflat/CMakeLists.txt b/libs/filaflat/CMakeLists.txt -index 0ebf53e..2b475fb 100644 ---- a/libs/filaflat/CMakeLists.txt -+++ b/libs/filaflat/CMakeLists.txt -@@ -20,7 +20,7 @@ set(SRCS - # ================================================================================================== - include_directories(${PUBLIC_HDR_DIR}) - --add_library(${TARGET} ${HDRS} ${SRCS}) -+add_library(${TARGET} STATIC ${HDRS} ${SRCS}) - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) - -diff --git a/libs/filagui/CMakeLists.txt b/libs/filagui/CMakeLists.txt -index e68a511..a4f7f8c 100644 ---- a/libs/filagui/CMakeLists.txt -+++ b/libs/filagui/CMakeLists.txt -@@ -80,7 +80,7 @@ include_directories(${GENERATION_ROOT}) - - add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS} ${RESGEN_SOURCE}) - --target_link_libraries(${TARGET} PUBLIC imgui filament) -+target_link_libraries(${TARGET} PUBLIC imgui::imgui filament) - - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt -index d73065a..cc57292 100644 +index 2fc20d7..00a9987 100644 --- a/libs/filamat/CMakeLists.txt +++ b/libs/filamat/CMakeLists.txt -@@ -104,17 +104,12 @@ target_link_libraries(filamat_lite shaders filabridge utils) - - # We are being naughty and accessing private headers here - # For spirv-tools, we're just following glslang's example --target_include_directories(${TARGET} PRIVATE ${spirv-tools_SOURCE_DIR}/include) -+# target_include_directories(${TARGET} PRIVATE ${spirv-tools_SOURCE_DIR}/include) - - # glslang libraries have circular dependencies. To make sure the proper object are part of the link +@@ -59,7 +59,7 @@ set(PRIVATE_HDRS + src/SpirvFixup.h + src/sca/ASTHelpers.h + src/sca/GLSLTools.h +- src/sca/builtinResource.h) ++ ) + + set(SRCS + ${COMMON_SRCS} +@@ -94,7 +94,7 @@ target_include_directories(${TARGET} PRIVATE ${spirv-tools_SOURCE_DIR}/include) # we need to force archive re-scan on new symbol dependencies via start/end-group. # Read more about this here https://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking --if (APPLE OR MSVC) + if (APPLE OR MSVC) - target_link_libraries(${TARGET} glslang SPIRV SPIRV-Tools-opt spirv-cross-glsl) --else() -- target_link_libraries(${TARGET} -- -Wl,--start-group glslang SPIRV SPIRV-Tools-opt spirv-cross-glsl -Wl,--end-group) --endif() -+target_link_libraries(${TARGET} glslang::glslang glslang::SPIRV glslang::SPVRemapper SPIRV-Tools-opt spirv-cross-glsl spirv-cross-msl) - - # ================================================================================================== - # Compiler flags -@@ -136,28 +131,6 @@ endif() - # Installation - # ================================================================================================== - --# Filamat has dependencies on a bunch of SPIRV-related libraries. To make things simpler, we bundle --# them together into a single shared library and copy this into the installation folder. This --# requires us to explicitly list the dependencies below, as CMake doesn't have a way to recursively --# query dependencies. --set(FILAMAT_DEPS -- OGLCompiler -- OSDependent -- SPIRV -- SPIRV-Tools -- SPIRV-Tools-opt -- filamat -- glslang -- spirv-cross-core -- spirv-cross-glsl -- spirv-cross-msl -- ) -- --set(FILAMAT_COMBINED_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libfilamat_combined.a") --combine_static_libs(filamat "${FILAMAT_COMBINED_OUTPUT}" "${FILAMAT_DEPS}") -- --set(FILAMAT_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}filamat${CMAKE_STATIC_LIBRARY_SUFFIX}) --install(FILES "${FILAMAT_COMBINED_OUTPUT}" DESTINATION lib/${DIST_DIR} RENAME ${FILAMAT_LIB_NAME}) - install(DIRECTORY ${PUBLIC_HDR_DIR}/filamat DESTINATION include) - - install(TARGETS filamat_lite ARCHIVE DESTINATION lib/${DIST_DIR}) -@@ -176,7 +149,7 @@ add_executable(${TARGET} ${SRCS}) - - target_include_directories(${TARGET} PRIVATE src) - --target_link_libraries(${TARGET} filamat gtest) -+target_link_libraries(${TARGET} filamat GTest::gtest) - - set_target_properties(${TARGET} PROPERTIES FOLDER Tests) - -@@ -188,6 +161,6 @@ add_executable(${TARGET} ${SRCS}) - - target_include_directories(${TARGET} PRIVATE src) - --target_link_libraries(${TARGET} filamat_lite gtest) -+target_link_libraries(${TARGET} filamat_lite GTest::gtest) - - set_target_properties(${TARGET} PROPERTIES FOLDER Tests) ++ target_link_libraries(${TARGET} glslang::glslang glslang::SPIRV SPIRV-Tools-opt spirv-cross-glsl) + else() + target_link_libraries(${TARGET} + -Wl,--start-group glslang SPIRV SPIRV-Tools-opt spirv-cross-glsl -Wl,--end-group) diff --git a/libs/filamentapp/CMakeLists.txt b/libs/filamentapp/CMakeLists.txt -index a2c1d0d..a700424 100644 +index 4a8a6c4..e14794e 100644 --- a/libs/filamentapp/CMakeLists.txt +++ b/libs/filamentapp/CMakeLists.txt -@@ -38,20 +38,19 @@ set(SRCS +@@ -38,21 +38,20 @@ set(SRCS ) set(LIBS - assimp + assimp::assimp ++ ${GETOPT_LIBRARY} ++ imgui::imgui ++ SDL2::SDL2 camutils filagui filamat @@ -537,50 +206,18 @@ index a2c1d0d..a700424 100644 filament-iblprefilter geometry - getopt -+ ${GETOPT_LIBRARY} image + imageio - imgui -+ imgui::imgui ktxreader math - sdl2 - stb -+ SDL2::SDL2 utils ) -@@ -73,7 +72,7 @@ endif() - - if (WIN32) - list(APPEND SRCS src/NativeWindowHelperWindows.cpp) -- list(APPEND LIBS sdl2main) -+ list(APPEND LIBS SDL2::SDL2main) - endif() - - # ================================================================================================== -diff --git a/libs/filameshio/CMakeLists.txt b/libs/filameshio/CMakeLists.txt -index eab3192..94d7211 100644 ---- a/libs/filameshio/CMakeLists.txt -+++ b/libs/filameshio/CMakeLists.txt -@@ -23,7 +23,7 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) - target_link_libraries(${TARGET} -- PRIVATE meshoptimizer -+ PRIVATE meshoptimizer::meshoptimizer - PUBLIC filament # Public only because the filamesh API needs Box.h - ) - -@@ -39,6 +39,6 @@ install(FILES ${DIST_HDRS} DESTINATION include/${TARGET}) - # ================================================================================================== - if (NOT IOS AND NOT WEBGL AND NOT ANDROID) - add_executable(test_${TARGET} tests/test_filamesh.cpp ) -- target_link_libraries(test_${TARGET} PRIVATE filameshio gtest) -+ target_link_libraries(test_${TARGET} PRIVATE filameshio GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - endif() diff --git a/libs/geometry/CMakeLists.txt b/libs/geometry/CMakeLists.txt -index d09e1c5..c810109 100644 +index a7e8f39..1d84dab 100644 --- a/libs/geometry/CMakeLists.txt +++ b/libs/geometry/CMakeLists.txt @@ -28,8 +28,8 @@ include_directories(${PUBLIC_HDR_DIR}) @@ -594,112 +231,8 @@ index d09e1c5..c810109 100644 ) target_link_libraries(${TARGET} PUBLIC math utils) -@@ -54,30 +54,17 @@ endif() - install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR}) - install(DIRECTORY ${PUBLIC_HDR_DIR}/geometry DESTINATION include) - --set(COMBINED_DEPS -- ${TARGET} -- ${GEOMETRY_DEPS} --) -- --# Combine the deps into a single static lib so that client only have to link this lib and not have --# to link its dependencies. --set(GEOMETRY_COMBINED_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libgeometry_combined.a") --combine_static_libs(${TARGET} "${GEOMETRY_COMBINED_OUTPUT}" "${COMBINED_DEPS}") -- --set(GEOMETRY_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}geometry${CMAKE_STATIC_LIBRARY_SUFFIX}) --install(FILES "${GEOMETRY_COMBINED_OUTPUT}" DESTINATION lib/${DIST_DIR} RENAME ${GEOMETRY_LIB_NAME}) -- - # ================================================================================================== - # Tests - # ================================================================================================== - if (NOT ANDROID AND NOT WEBGL AND NOT IOS) - set(TARGET test_transcoder) - add_executable(${TARGET} tests/test_transcoder.cpp) -- target_link_libraries(${TARGET} PRIVATE geometry gtest) -+ target_link_libraries(${TARGET} PRIVATE geometry GTest::gtest) - set_target_properties(${TARGET} PROPERTIES FOLDER Tests) - - set(TARGET test_tangent_space_mesh) - add_executable(${TARGET} tests/test_tangent_space_mesh.cpp) -- target_link_libraries(${TARGET} PRIVATE geometry gtest) -+ target_link_libraries(${TARGET} PRIVATE geometry GTest::gtest) - set_target_properties(${TARGET} PROPERTIES FOLDER Tests) - endif() -diff --git a/libs/gltfio/CMakeLists.txt b/libs/gltfio/CMakeLists.txt -index d06676e..59bc378 100644 ---- a/libs/gltfio/CMakeLists.txt -+++ b/libs/gltfio/CMakeLists.txt -@@ -144,7 +144,7 @@ endif() - set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c") - add_custom_command(OUTPUT ${DUMMY_SRC} COMMAND echo "//" > ${DUMMY_SRC}) - --add_library(uberarchive ${DUMMY_SRC} ${RESGEN_SOURCE}) -+add_library(uberarchive STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) - target_include_directories(uberarchive PUBLIC ${RESOURCE_DIR}) - set_target_properties(uberarchive PROPERTIES FOLDER Libs) - -@@ -153,7 +153,7 @@ set_target_properties(uberarchive PROPERTIES FOLDER Libs) - # ================================================================================================== - - include_directories(${PUBLIC_HDR_DIR} ${RESOURCE_DIR}) --link_libraries(math utils filament cgltf stb ktxreader geometry tsl trie uberzlib) -+link_libraries(math utils filament ktxreader geometry tsl::robin_map trie uberzlib) - - add_library(gltfio_core STATIC ${PUBLIC_HDRS} ${SRCS}) - -@@ -161,7 +161,7 @@ target_include_directories(gltfio_core PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(gltfio_core PROPERTIES FOLDER Libs) - - target_compile_definitions(gltfio_core PUBLIC -DGLTFIO_DRACO_SUPPORTED=1) --target_link_libraries(gltfio_core PUBLIC dracodec meshoptimizer) -+target_link_libraries(gltfio_core PUBLIC draco::draco meshoptimizer::meshoptimizer) - - if (WEBGL_PTHREADS) - target_compile_definitions(gltfio_core PUBLIC -DFILAMENT_WASM_THREADS) -diff --git a/libs/ibl/CMakeLists.txt b/libs/ibl/CMakeLists.txt -index aae32fb..a3c7dea 100644 ---- a/libs/ibl/CMakeLists.txt -+++ b/libs/ibl/CMakeLists.txt -@@ -33,12 +33,12 @@ set(SRCS - # ================================================================================================== - include_directories(${PUBLIC_HDR_DIR}) - --add_library(${TARGET} ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS}) -+add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS}) - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) - target_link_libraries(${TARGET} math utils) - --add_library(${TARGET}-lite ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS}) -+add_library(${TARGET}-lite STATIC ${PUBLIC_HDRS} ${PRIVATE_HDRS} ${SRCS}) - target_compile_definitions(${TARGET}-lite PUBLIC -DFILAMENT_IBL_LITE=1) - target_include_directories(${TARGET}-lite PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET}-lite PROPERTIES FOLDER Libs) -@@ -59,6 +59,6 @@ endif() - # ================================================================================================== - # Installation - # ================================================================================================== --install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR}) --install(TARGETS ${TARGET}-lite ARCHIVE DESTINATION lib/${DIST_DIR}) -+install(TARGETS ${TARGET} DESTINATION lib/${DIST_DIR}) -+install(TARGETS ${TARGET}-lite DESTINATION lib/${DIST_DIR}) - install(DIRECTORY ${PUBLIC_HDR_DIR}/ibl DESTINATION include) -diff --git a/libs/image/CMakeLists.txt b/libs/image/CMakeLists.txt -index 8816a8d..5931c7d 100644 ---- a/libs/image/CMakeLists.txt -+++ b/libs/image/CMakeLists.txt -@@ -55,6 +55,6 @@ install(DIRECTORY ${PUBLIC_HDR_DIR}/image DESTINATION include) - # ================================================================================================== - if (NOT ANDROID AND NOT WEBGL AND NOT IOS AND NOT FILAMENT_SKIP_SDL2) - add_executable(test_${TARGET} tests/test_image.cpp) -- target_link_libraries(test_${TARGET} PRIVATE image imageio gtest) -+ target_link_libraries(test_${TARGET} PRIVATE image imageio GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - endif() diff --git a/libs/imageio/CMakeLists.txt b/libs/imageio/CMakeLists.txt -index 4754465..157cbc6 100644 +index 4754465..a51de16 100644 --- a/libs/imageio/CMakeLists.txt +++ b/libs/imageio/CMakeLists.txt @@ -33,7 +33,7 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) @@ -707,125 +240,15 @@ index 4754465..157cbc6 100644 set_target_properties(${TARGET} PROPERTIES FOLDER Libs) -target_link_libraries(${TARGET} PUBLIC image math png tinyexr utils z basis_encoder) -+target_link_libraries(${TARGET} PUBLIC image math PNG::PNG unofficial::tinyexr::tinyexr utils ZLIB::ZLIB ${BASIS_ENCODER_LIBRARY} ${BASIS_TRANSCODER_LIBRARY}) ++target_link_libraries(${TARGET} PUBLIC image math utils PNG::PNG unofficial::tinyexr::tinyexr ZLIB::ZLIB ${BASIS_ENCODER_LIBRARY}) if (WIN32) target_link_libraries(${TARGET} PRIVATE wsock32) endif() -diff --git a/libs/ktxreader/CMakeLists.txt b/libs/ktxreader/CMakeLists.txt -index a9d5714..0edc817 100644 ---- a/libs/ktxreader/CMakeLists.txt -+++ b/libs/ktxreader/CMakeLists.txt -@@ -24,7 +24,7 @@ include_directories(${PUBLIC_HDR_DIR}) - - add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) - --target_link_libraries(${TARGET} PUBLIC utils image filament basis_transcoder) -+target_link_libraries(${TARGET} PUBLIC utils image filament ${BASIS_ENCODER_LIBRARY} ${BASIS_TRANSCODER_LIBRARY}) - - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) -@@ -62,6 +62,6 @@ add_testfile(lightroom_ibl.ktx) - - if (NOT ANDROID AND NOT WEBGL AND NOT IOS) - add_executable(test_ktxreader tests/test_ktxreader.cpp ${TESTFILES}) -- target_link_libraries(test_ktxreader PRIVATE ${TARGET} gtest) -+ target_link_libraries(test_ktxreader PRIVATE ${TARGET} GTest::gtest) - set_target_properties(test_ktxreader PROPERTIES FOLDER Tests) - endif() -diff --git a/libs/matdbg/CMakeLists.txt b/libs/matdbg/CMakeLists.txt -index f53413b..21d6614 100644 ---- a/libs/matdbg/CMakeLists.txt -+++ b/libs/matdbg/CMakeLists.txt -@@ -60,7 +60,7 @@ set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c") - add_custom_command(OUTPUT ${DUMMY_SRC} COMMAND echo "//" > ${DUMMY_SRC}) - - --add_library(matdbg_resources ${DUMMY_SRC} ${RESGEN_SOURCE}) -+add_library(matdbg_resources STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) - set_target_properties(matdbg_resources PROPERTIES FOLDER Libs) - - # ================================================================================================== -@@ -73,13 +73,13 @@ add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) - - target_link_libraries(${TARGET} PUBLIC - backend_headers -- civetweb -+ civetweb::civetweb-cpp - filabridge - filaflat - filamat -- glslang -+ glslang::glslang - matdbg_resources -- SPIRV -+ glslang::SPIRV - spirv-cross-glsl - SPIRV-Tools - utils -@@ -103,22 +103,5 @@ endif() - # Installation - # ================================================================================================== - --# matdbg has dependencies on non-installed libraries. Here we bundle them all together into a single --# library that gets copied into the installation folder so users are only required to link against --# matdbg. --set(MATDBG_DEPS -- matdbg -- matdbg_resources -- civetweb -- SPIRV-Tools -- spirv-cross-core -- spirv-cross-glsl -- ) -- --set(MATDBG_COMBINED_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/libmatdbg_combined.a") --combine_static_libs(matdbg "${MATDBG_COMBINED_OUTPUT}" "${MATDBG_DEPS}") -- --set(MATDBG_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}matdbg${CMAKE_STATIC_LIBRARY_SUFFIX}) --install(FILES "${MATDBG_COMBINED_OUTPUT}" DESTINATION lib/${DIST_DIR} RENAME ${MATDBG_LIB_NAME}) --# We do not need matdbg headers in the install directory --# install(DIRECTORY ${PUBLIC_HDR_DIR}/matdbg DESTINATION include) -+install(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+install(FILES ${PUBLIC_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/matdbg) -diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt -index 838aa2d..3fb6725 100644 ---- a/libs/math/CMakeLists.txt -+++ b/libs/math/CMakeLists.txt -@@ -59,7 +59,7 @@ add_executable(test_${TARGET} - tests/test_vec.cpp - tests/test_quat.cpp - ) --target_link_libraries(test_${TARGET} PRIVATE math gtest) -+target_link_libraries(test_${TARGET} PRIVATE math GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - - # ================================================================================================== -@@ -73,6 +73,6 @@ add_executable(benchmark_${TARGET} ${BENCHMARK_SRCS}) - - target_compile_options(benchmark_${TARGET} PRIVATE ${OPTIMIZATION_FLAGS}) - --target_link_libraries(benchmark_${TARGET} PRIVATE benchmark_main utils math) -+target_link_libraries(benchmark_${TARGET} PRIVATE benchmark::benchmark_main utils math) - - set_target_properties(benchmark_${TARGET} PROPERTIES FOLDER Benchmarks) -diff --git a/libs/uberz/CMakeLists.txt b/libs/uberz/CMakeLists.txt -index 47744e2..d1283ca 100644 ---- a/libs/uberz/CMakeLists.txt -+++ b/libs/uberz/CMakeLists.txt -@@ -25,7 +25,7 @@ include_directories(${PUBLIC_HDR_DIR}) - - add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) - --target_link_libraries(${TARGET} PUBLIC math utils filabridge zstd) -+target_link_libraries(${TARGET} PUBLIC math utils filabridge PkgConfig::ZSTD) - - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt -index 0e26b01..8df3326 100644 +index 7255816..1c32f27 100644 --- a/libs/utils/CMakeLists.txt +++ b/libs/utils/CMakeLists.txt -@@ -103,7 +103,7 @@ include_directories(${PUBLIC_HDR_DIR}) +@@ -105,7 +105,7 @@ include_directories(${PUBLIC_HDR_DIR}) add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) set_target_properties(${TARGET} PROPERTIES FOLDER Libs) @@ -834,105 +257,47 @@ index 0e26b01..8df3326 100644 if (ANDROID) target_link_libraries(${TARGET} PUBLIC log) -@@ -175,7 +175,7 @@ endif() - - add_executable(test_${TARGET} ${TEST_SRCS}) - --target_link_libraries(test_${TARGET} PRIVATE gtest utils tsl math) -+target_link_libraries(test_${TARGET} PRIVATE GTest::gtest utils tsl::robin_map math) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - - # ================================================================================================== -@@ -184,7 +184,7 @@ set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - - if (NOT WEBGL) - -- add_library(benchmark_${TARGET}_callee SHARED benchmark/benchmark_callee.cpp) -+ add_library(benchmark_${TARGET}_callee STATIC benchmark/benchmark_callee.cpp) - set_target_properties(benchmark_${TARGET}_callee PROPERTIES FOLDER Benchmarks) - - set(BENCHMARK_SRCS -@@ -198,7 +198,7 @@ if (NOT WEBGL) - - add_executable(benchmark_${TARGET} ${BENCHMARK_SRCS}) - -- target_link_libraries(benchmark_${TARGET} PRIVATE benchmark_main utils benchmark_${TARGET}_callee) -+ target_link_libraries(benchmark_${TARGET} PRIVATE benchmark::benchmark_main utils benchmark_${TARGET}_callee) - - set_target_properties(benchmark_${TARGET} PROPERTIES FOLDER Benchmarks) - -diff --git a/libs/viewer/CMakeLists.txt b/libs/viewer/CMakeLists.txt -index 5d2a13e..1e8682b 100644 ---- a/libs/viewer/CMakeLists.txt -+++ b/libs/viewer/CMakeLists.txt -@@ -30,7 +30,7 @@ set(SRCS - # Include and target definitions - # ================================================================================================== - add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS}) --target_link_libraries(${TARGET} PUBLIC imgui filament gltfio_core filagui jsmn civetweb) -+target_link_libraries(${TARGET} PUBLIC imgui::imgui filament gltfio_core filagui civetweb::civetweb-cpp) - target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR}) - set_target_properties(${TARGET} PROPERTIES FOLDER Libs) - -@@ -53,6 +53,6 @@ install(DIRECTORY ${PUBLIC_HDR_DIR}/viewer DESTINATION include) - # ================================================================================================== - if (NOT ANDROID AND NOT WEBGL AND NOT IOS) - add_executable(test_settings tests/test_settings.cpp) -- target_link_libraries(test_settings PRIVATE ${TARGET} gtest) -+ target_link_libraries(test_settings PRIVATE ${TARGET} GTest::gtest) - set_target_properties(test_settings PROPERTIES FOLDER Tests) - endif() diff --git a/tools/cmgen/CMakeLists.txt b/tools/cmgen/CMakeLists.txt -index 874cb90..02f7c1b 100644 +index 4913b56..3848bef 100644 --- a/tools/cmgen/CMakeLists.txt +++ b/tools/cmgen/CMakeLists.txt @@ -20,7 +20,7 @@ set(SRCS # ================================================================================================== add_executable(${TARGET} ${HDRS} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE math utils ibl z image imageio getopt) -+target_link_libraries(${TARGET} PRIVATE math utils ibl ZLIB::ZLIB image imageio ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE ibl imageio getopt) ++target_link_libraries(${TARGET} PRIVATE ibl imageio ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================== -@@ -54,6 +54,6 @@ install(TARGETS ${TARGET} RUNTIME DESTINATION bin) - # ================================================================================================== - if (NOT ANDROID) - add_executable(test_${TARGET} tests/test_cmgen.cpp) -- target_link_libraries(test_${TARGET} PRIVATE image imageio gtest) -+ target_link_libraries(test_${TARGET} PRIVATE image imageio GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - endif() diff --git a/tools/cso-lut/CMakeLists.txt b/tools/cso-lut/CMakeLists.txt -index 0d3eab1..9db4350 100644 +index f117a58..d38e266 100644 --- a/tools/cso-lut/CMakeLists.txt +++ b/tools/cso-lut/CMakeLists.txt @@ -15,7 +15,7 @@ set(SRCS src/main.cpp) # ================================================================================================== add_executable(${TARGET} ${HDRS} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE math utils z image imageio getopt) -+target_link_libraries(${TARGET} PRIVATE math utils ZLIB::ZLIB image imageio ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE imageio getopt) ++target_link_libraries(${TARGET} PRIVATE imageio ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================== diff --git a/tools/filamesh/CMakeLists.txt b/tools/filamesh/CMakeLists.txt -index fa97069..31681f1 100644 +index 680262d..db564c1 100644 --- a/tools/filamesh/CMakeLists.txt +++ b/tools/filamesh/CMakeLists.txt -@@ -18,8 +18,8 @@ add_executable(${TARGET} ${SRCS}) +@@ -16,7 +16,7 @@ set(SRCS + # ================================================================================================== + add_executable(${TARGET} ${SRCS}) - target_link_libraries(${TARGET} PUBLIC math) - target_link_libraries(${TARGET} PUBLIC utils) --target_link_libraries(${TARGET} PUBLIC assimp) --target_link_libraries(${TARGET} PRIVATE getopt filameshio meshoptimizer) -+target_link_libraries(${TARGET} PUBLIC assimp::assimp) -+target_link_libraries(${TARGET} PRIVATE filameshio meshoptimizer::meshoptimizer ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE assimp getopt filameshio meshoptimizer) ++target_link_libraries(${TARGET} PRIVATE filameshio assimp::assimp ${GETOPT_LIBRARY} meshoptimizer::meshoptimizer) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================== diff --git a/tools/glslminifier/CMakeLists.txt b/tools/glslminifier/CMakeLists.txt -index c278320..685ddf3 100644 +index c278320..d6309c8 100644 --- a/tools/glslminifier/CMakeLists.txt +++ b/tools/glslminifier/CMakeLists.txt @@ -12,7 +12,7 @@ set(SRCS src/main.cpp src/GlslMinify.cpp) @@ -944,16 +309,8 @@ index c278320..685ddf3 100644 set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================= -@@ -37,6 +37,6 @@ if (NOT ANDROID) - tests/test_glslminifier.cpp - ) - target_include_directories(test_${TARGET} PRIVATE src) -- target_link_libraries(test_${TARGET} PRIVATE gtest) -+ target_link_libraries(test_${TARGET} PRIVATE GTest::gtest) - set_target_properties(test_${TARGET} PROPERTIES FOLDER Tests) - endif() diff --git a/tools/matc/CMakeLists.txt b/tools/matc/CMakeLists.txt -index 8199edc..bdef728 100644 +index 8199edc..4cb8e29 100644 --- a/tools/matc/CMakeLists.txt +++ b/tools/matc/CMakeLists.txt @@ -44,7 +44,7 @@ add_library(${TARGET} STATIC ${SRCS} ${HDRS}) @@ -961,69 +318,59 @@ index 8199edc..bdef728 100644 target_include_directories(${TARGET} PRIVATE ${filamat_SOURCE_DIR}/src) -target_link_libraries(${TARGET} getopt filamat filabridge utils) -+target_link_libraries(${TARGET} ${GETOPT_LIBRARY} filamat filabridge utils) ++target_link_libraries(${TARGET} filamat filabridge utils ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================= -@@ -70,7 +70,7 @@ set(SRCS src/main.cpp) - # Target definitions - # ================================================================================================== - add_executable(${TARGET} ${SRCS} ${HDRS}) --target_link_libraries(${TARGET} matlang) -+target_link_libraries(${TARGET} filamat matlang) - set_target_properties(${TARGET} PROPERTIES FOLDER Tools) +diff --git a/tools/matedit/CMakeLists.txt b/tools/matedit/CMakeLists.txt +index 2c1b247..e912b84 100644 +--- a/tools/matedit/CMakeLists.txt ++++ b/tools/matedit/CMakeLists.txt +@@ -18,7 +18,7 @@ add_executable(${TARGET} ${SRCS}) - # ================================================================================================== -@@ -93,6 +93,6 @@ set(SRCS + target_include_directories(${TARGET} PRIVATE ${filamat_SOURCE_DIR}/src) - add_executable(${TARGET} ${SRCS}) +-target_link_libraries(${TARGET} matdbg getopt) ++target_link_libraries(${TARGET} matdbg ${GETOPT_LIBRARY}) --target_link_libraries(${TARGET} matlang gtest) -+target_link_libraries(${TARGET} matlang GTest::gtest) + set_target_properties(${TARGET} PROPERTIES FOLDER Tools) - set_target_properties(test_matc PROPERTIES FOLDER Tests) diff --git a/tools/matinfo/CMakeLists.txt b/tools/matinfo/CMakeLists.txt -index bddcaaa..2bd2b94 100644 +index 917d464..a487cc0 100644 --- a/tools/matinfo/CMakeLists.txt +++ b/tools/matinfo/CMakeLists.txt -@@ -13,12 +13,12 @@ set(SRCS src/main.cpp) +@@ -13,7 +13,7 @@ set(SRCS src/main.cpp) # ================================================================================================== add_executable(${TARGET} ${SRCS}) --target_link_libraries(${TARGET} matdbg filaflat backend_headers utils getopt SPIRV-Tools spirv-cross-glsl) -+target_link_libraries(${TARGET} matdbg filaflat backend_headers utils ${GETOPT_LIBRARY} SPIRV-Tools spirv-cross-glsl) +-target_link_libraries(${TARGET} matdbg filaflat backend_headers getopt) ++target_link_libraries(${TARGET} matdbg filaflat backend_headers ${GETOPT_LIBRARY}) # glslang contains a copy of the SPIRV headers, so let's just use those. The leading ".." in the # following variable refers to the project name that we define in glslang/tnt, and the trailing ".." - # in the path allows us to do #include --target_include_directories(${TARGET} PRIVATE ${../glslang_SOURCE_DIR}/..) -+# target_include_directories(${TARGET} PRIVATE ${../glslang_SOURCE_DIR}/..) - - set_target_properties(${TARGET} PROPERTIES FOLDER Tools) - diff --git a/tools/mipgen/CMakeLists.txt b/tools/mipgen/CMakeLists.txt -index b26c8b6..567378a 100644 +index ea58e32..37a6f7b 100644 --- a/tools/mipgen/CMakeLists.txt +++ b/tools/mipgen/CMakeLists.txt @@ -12,7 +12,7 @@ set(SRCS src/main.cpp) # Target definitions # ================================================================================================== add_executable(${TARGET} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE math utils z image imageio getopt) -+target_link_libraries(${TARGET} PRIVATE math utils ZLIB::ZLIB image imageio ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE imageio getopt) ++target_link_libraries(${TARGET} PRIVATE imageio zstd::libzstd ${GETOPT_LIBRARY} ${BASIS_TRANSCODER_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================= diff --git a/tools/normal-blending/CMakeLists.txt b/tools/normal-blending/CMakeLists.txt -index 8600334..af2237a 100644 +index 8fbf794..8ae0a30 100644 --- a/tools/normal-blending/CMakeLists.txt +++ b/tools/normal-blending/CMakeLists.txt @@ -15,7 +15,7 @@ set(SRCS src/main.cpp) # ================================================================================================== add_executable(${TARGET} ${HDRS} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE math utils z image imageio getopt) -+target_link_libraries(${TARGET} PRIVATE math utils ZLIB::ZLIB image imageio ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE imageio getopt) ++target_link_libraries(${TARGET} PRIVATE imageio ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) @@ -1041,7 +388,7 @@ index 183d5a6..ca9855c 100644 # ================================================================================================= diff --git a/tools/rgb-to-lmsr/CMakeLists.txt b/tools/rgb-to-lmsr/CMakeLists.txt -index 01b2cbd..1e51875 100644 +index 01b2cbd..b15377b 100644 --- a/tools/rgb-to-lmsr/CMakeLists.txt +++ b/tools/rgb-to-lmsr/CMakeLists.txt @@ -13,7 +13,7 @@ set(SRCS src/main.cpp) @@ -1049,25 +396,25 @@ index 01b2cbd..1e51875 100644 add_executable(${TARGET} ${SRCS}) -target_link_libraries(${TARGET} getopt utils math) -+target_link_libraries(${TARGET} ${GETOPT_LIBRARY} utils math) ++target_link_libraries(${TARGET} utils math ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) diff --git a/tools/roughness-prefilter/CMakeLists.txt b/tools/roughness-prefilter/CMakeLists.txt -index c8387e5..fe484aa 100644 +index 9addaa1..706e6ec 100644 --- a/tools/roughness-prefilter/CMakeLists.txt +++ b/tools/roughness-prefilter/CMakeLists.txt @@ -15,7 +15,7 @@ set(SRCS src/main.cpp) # ================================================================================================== add_executable(${TARGET} ${HDRS} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE math utils z image imageio getopt) -+target_link_libraries(${TARGET} PRIVATE math utils ZLIB::ZLIB image imageio ${GETOPT_LIBRARY}) +-target_link_libraries(${TARGET} PRIVATE imageio getopt) ++target_link_libraries(${TARGET} PRIVATE imageio ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) diff --git a/tools/specular-color/CMakeLists.txt b/tools/specular-color/CMakeLists.txt -index 0aef5d8..a4ebb1a 100644 +index 0aef5d8..5cd277f 100644 --- a/tools/specular-color/CMakeLists.txt +++ b/tools/specular-color/CMakeLists.txt @@ -13,7 +13,7 @@ set(SRCS src/main.cpp) @@ -1075,77 +422,20 @@ index 0aef5d8..a4ebb1a 100644 add_executable(${TARGET} ${SRCS}) -target_link_libraries(${TARGET} getopt utils math) -+target_link_libraries(${TARGET} ${GETOPT_LIBRARY} utils math) ++target_link_libraries(${TARGET} utils math ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) diff --git a/tools/uberz/CMakeLists.txt b/tools/uberz/CMakeLists.txt -index d9352e5..57e349f 100644 +index 8f43412..cbc05e7 100644 --- a/tools/uberz/CMakeLists.txt +++ b/tools/uberz/CMakeLists.txt @@ -13,7 +13,7 @@ set(SRCS # Target definitions # ================================================================================================== add_executable(${TARGET} ${SRCS}) --target_link_libraries(${TARGET} PRIVATE utils getopt uberzlib) -+target_link_libraries(${TARGET} PRIVATE utils ${GETOPT_LIBRARY} uberzlib) +-target_link_libraries(${TARGET} PRIVATE getopt uberzlib) ++target_link_libraries(${TARGET} PRIVATE uberzlib ${GETOPT_LIBRARY}) set_target_properties(${TARGET} PROPERTIES FOLDER Tools) # ================================================================================================= -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cee22ba..ca4d62e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -733,7 +733,8 @@ if (IS_HOST_PLATFORM) - add_subdirectory(${LIBRARIES}/bluegl) - endif() - if (NOT FILAMENT_SKIP_SDL2) -- add_subdirectory(${LIBRARIES}/filamentapp) -+ find_package(assimp CONFIG REQUIRED) # assimp::assimp -+ add_subdirectory(${LIBRARIES}/filamentapp) - endif() - add_subdirectory(${LIBRARIES}/imageio) - -diff --git a/libs/filamentapp/CMakeLists.txt b/libs/filamentapp/CMakeLists.txt -index a700424..bb243c6 100644 ---- a/libs/filamentapp/CMakeLists.txt -+++ b/libs/filamentapp/CMakeLists.txt -@@ -118,7 +118,7 @@ endif() - set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c") - add_custom_command(OUTPUT ${DUMMY_SRC} COMMAND echo "//" > ${DUMMY_SRC}) - --add_library(filamentapp-resources ${DUMMY_SRC} ${RESGEN_SOURCE}) -+add_library(filamentapp-resources STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) - set_target_properties(filamentapp-resources PROPERTIES FOLDER Samples/Resources) - - # ================================================================================================== -diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt -index 340cd02..dfb0ab2 100644 ---- a/samples/CMakeLists.txt -+++ b/samples/CMakeLists.txt -@@ -84,7 +84,7 @@ endif() - set(DUMMY_SRC "${RESOURCE_DIR}/dummy.c") - add_custom_command(OUTPUT ${DUMMY_SRC} COMMAND echo "//" > ${DUMMY_SRC}) - --add_library(sample-resources ${DUMMY_SRC} ${RESGEN_SOURCE}) -+add_library(sample-resources STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) - set_target_properties(sample-resources PROPERTIES FOLDER Samples/Resources) - - # ================================================================================================== -@@ -171,14 +171,14 @@ if (DEFINED RESGEN_SOURCE_FLAGS) - set_source_files_properties(${RESGEN_SOURCE} PROPERTIES COMPILE_FLAGS ${RESGEN_SOURCE_FLAGS}) - endif() - --add_library(suzanne-resources ${DUMMY_SRC} ${RESGEN_SOURCE}) -+add_library(suzanne-resources STATIC ${DUMMY_SRC} ${RESGEN_SOURCE}) - set_target_properties(suzanne-resources PROPERTIES FOLDER Samples/Resources) - - # ================================================================================================== - # Resources for gltf_viewer and gltf_instances - # ================================================================================================== - --add_library(gltf-demo-resources ${DUMMY_SRC}) -+add_library(gltf-demo-resources STATIC ${DUMMY_SRC}) - set_target_properties(gltf-demo-resources PROPERTIES FOLDER Samples/Resources) - - set(GLTF_DEMO_RESOURCES diff --git a/ports/google-filament/fix-sources.patch b/ports/google-filament/fix-sources.patch index f54c504d..465d21b3 100644 --- a/ports/google-filament/fix-sources.patch +++ b/ports/google-filament/fix-sources.patch @@ -12,27 +12,23 @@ index 49fa4b7..1332d78 100644 #include #include diff --git a/filament/backend/test/ShaderGenerator.cpp b/filament/backend/test/ShaderGenerator.cpp -index 8e32948..df67bee 100644 +index 7d0ad71..64504f1 100644 --- a/filament/backend/test/ShaderGenerator.cpp +++ b/filament/backend/test/ShaderGenerator.cpp -@@ -16,10 +16,10 @@ +@@ -24,7 +24,7 @@ - #include "ShaderGenerator.h" + #include "../src/GLSLPostProcessor.h" --#include -+#include - #include +-#include "builtinResource.h" ++#include --#include -+#include - #include + #include - #include "../src/GLSLPostProcessor.h" diff --git a/libs/filamat/src/GLSLPostProcessor.cpp b/libs/filamat/src/GLSLPostProcessor.cpp -index a538d02..850def4 100644 +index 3a4a482..653eb73 100644 --- a/libs/filamat/src/GLSLPostProcessor.cpp +++ b/libs/filamat/src/GLSLPostProcessor.cpp -@@ -16,11 +16,11 @@ +@@ -16,15 +16,15 @@ #include "GLSLPostProcessor.h" @@ -40,43 +36,19 @@ index a538d02..850def4 100644 -#include +#include +#include + #include --#include --#include -+#include -+#include + #include + #include - #include "sca/builtinResource.h" + #include "backend/DriverEnums.h" +-#include "sca/builtinResource.h" ++#include #include "sca/GLSLTools.h" -@@ -240,7 +240,7 @@ void GLSLPostProcessor::spirvToMsl(const SpirvBlob *spirv, std::string *outMsl, - // buffer itself; - MSLResourceBinding argBufferBinding; - // the baseType doesn't matter, but can't be UNKNOWN -- argBufferBinding.basetype = SPIRType::BaseType::Float; -+ //argBufferBinding.basetype = SPIRType::BaseType::Float; - argBufferBinding.stage = executionModel; - argBufferBinding.desc_set = bindingPoint + 1; - argBufferBinding.binding = kArgumentBufferBinding; -@@ -255,7 +255,7 @@ void GLSLPostProcessor::spirvToMsl(const SpirvBlob *spirv, std::string *outMsl, - auto set = mslCompiler.get_decoration(resource.id, spv::DecorationDescriptorSet); - auto binding = mslCompiler.get_decoration(resource.id, spv::DecorationBinding); - MSLResourceBinding newBinding; -- newBinding.basetype = SPIRType::BaseType::Void; -+ //newBinding.basetype = SPIRType::BaseType::Void; - newBinding.stage = executionModel; - newBinding.desc_set = set; - newBinding.binding = binding; -@@ -542,7 +542,7 @@ void GLSLPostProcessor::fullOptimization(const TShader& tShader, - - if (tShader.getStage() == EShLangFragment && glslOptions.es) { - for (auto i : config.glsl.subpassInputToColorLocation) { -- glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second, true); -+ glslCompiler.remap_ext_framebuffer_fetch(i.first, i.second); - } - } + #include "shaders/CodeGenerator.h" diff --git a/libs/filamat/src/GLSLPostProcessor.h b/libs/filamat/src/GLSLPostProcessor.h -index cb95079..2f3c84e 100644 +index c13dece..c2fb87c 100644 --- a/libs/filamat/src/GLSLPostProcessor.h +++ b/libs/filamat/src/GLSLPostProcessor.h @@ -25,7 +25,7 @@ @@ -89,7 +61,7 @@ index cb95079..2f3c84e 100644 #include diff --git a/libs/filamat/src/sca/ASTHelpers.cpp b/libs/filamat/src/sca/ASTHelpers.cpp -index 0ef9ec6..efdaf86 100644 +index d82831a..19df976 100644 --- a/libs/filamat/src/sca/ASTHelpers.cpp +++ b/libs/filamat/src/sca/ASTHelpers.cpp @@ -18,8 +18,8 @@ @@ -104,38 +76,41 @@ index 0ef9ec6..efdaf86 100644 #include diff --git a/libs/filamat/src/sca/ASTHelpers.h b/libs/filamat/src/sca/ASTHelpers.h -index b4e4983..e297a3a 100644 +index 19ec1ce..680466f 100644 --- a/libs/filamat/src/sca/ASTHelpers.h +++ b/libs/filamat/src/sca/ASTHelpers.h -@@ -20,7 +20,7 @@ - #include +@@ -19,7 +19,7 @@ + #include #include -#include +#include - #include "GLSLTools.h" + class TIntermNode; diff --git a/libs/filamat/src/sca/GLSLTools.cpp b/libs/filamat/src/sca/GLSLTools.cpp -index 0ee77a5..9c59a69 100644 +index eeecf89..19aee05 100644 --- a/libs/filamat/src/sca/GLSLTools.cpp +++ b/libs/filamat/src/sca/GLSLTools.cpp -@@ -27,8 +27,8 @@ +@@ -25,10 +25,10 @@ #include "ASTHelpers.h" // GLSLANG headers -#include -#include -+#include ++#include +#include - #include "builtinResource.h" +-#include "builtinResource.h" ++#include + using namespace utils; + using namespace glslang; diff --git a/libs/filamat/src/sca/GLSLTools.h b/libs/filamat/src/sca/GLSLTools.h -index 082a684..8d40a8d 100644 +index 1c7cf16..fb2a610 100644 --- a/libs/filamat/src/sca/GLSLTools.h +++ b/libs/filamat/src/sca/GLSLTools.h -@@ -24,7 +24,7 @@ +@@ -25,7 +25,7 @@ #include @@ -143,13 +118,153 @@ index 082a684..8d40a8d 100644 +#include class TIntermNode; - namespace glslang { + +diff --git a/libs/filamat/src/sca/builtinResource.h b/libs/filamat/src/sca/builtinResource.h +deleted file mode 100644 +index d58f2a9..0000000 +--- a/libs/filamat/src/sca/builtinResource.h ++++ /dev/null +@@ -1,134 +0,0 @@ +-/* +- * Copyright (C) 2018 The Android Open Source Project +- * +- * Licensed under the Apache License, Version 2.0 (the "License"); +- * you may not use this file except in compliance with the License. +- * You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-#include "glslang/Include/intermediate.h" +- +-const TBuiltInResource DefaultTBuiltInResource = { +- /* .MaxLights = */ 32, +- /* .MaxClipPlanes = */ 6, +- /* .MaxTextureUnits = */ 32, +- /* .MaxTextureCoords = */ 32, +- /* .MaxVertexAttribs = */ 64, +- /* .MaxVertexUniformComponents = */ 4096, +- /* .MaxVaryingFloats = */ 64, +- /* .MaxVertexTextureImageUnits = */ 32, +- /* .MaxCombinedTextureImageUnits = */ 80, +- /* .MaxTextureImageUnits = */ 32, +- /* .MaxFragmentUniformComponents = */ 4096, +- /* .MaxDrawBuffers = */ 32, +- /* .MaxVertexUniformVectors = */ 128, +- /* .MaxVaryingVectors = */ 8, +- /* .MaxFragmentUniformVectors = */ 16, +- /* .MaxVertexOutputVectors = */ 16, +- /* .MaxFragmentInputVectors = */ 15, +- /* .MinProgramTexelOffset = */ -8, +- /* .MaxProgramTexelOffset = */ 7, +- /* .MaxClipDistances = */ 8, +- /* .MaxComputeWorkGroupCountX = */ 65535, +- /* .MaxComputeWorkGroupCountY = */ 65535, +- /* .MaxComputeWorkGroupCountZ = */ 65535, +- /* .MaxComputeWorkGroupSizeX = */ 1024, +- /* .MaxComputeWorkGroupSizeY = */ 1024, +- /* .MaxComputeWorkGroupSizeZ = */ 64, +- /* .MaxComputeUniformComponents = */ 1024, +- /* .MaxComputeTextureImageUnits = */ 16, +- /* .MaxComputeImageUniforms = */ 8, +- /* .MaxComputeAtomicCounters = */ 8, +- /* .MaxComputeAtomicCounterBuffers = */ 1, +- /* .MaxVaryingComponents = */ 60, +- /* .MaxVertexOutputComponents = */ 64, +- /* .MaxGeometryInputComponents = */ 64, +- /* .MaxGeometryOutputComponents = */ 128, +- /* .MaxFragmentInputComponents = */ 128, +- /* .MaxImageUnits = */ 8, +- /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8, +- /* .MaxCombinedShaderOutputResources = */ 8, +- /* .MaxImageSamples = */ 0, +- /* .MaxVertexImageUniforms = */ 0, +- /* .MaxTessControlImageUniforms = */ 0, +- /* .MaxTessEvaluationImageUniforms = */ 0, +- /* .MaxGeometryImageUniforms = */ 0, +- /* .MaxFragmentImageUniforms = */ 8, +- /* .MaxCombinedImageUniforms = */ 8, +- /* .MaxGeometryTextureImageUnits = */ 16, +- /* .MaxGeometryOutputVertices = */ 256, +- /* .MaxGeometryTotalOutputComponents = */ 1024, +- /* .MaxGeometryUniformComponents = */ 1024, +- /* .MaxGeometryVaryingComponents = */ 64, +- /* .MaxTessControlInputComponents = */ 128, +- /* .MaxTessControlOutputComponents = */ 128, +- /* .MaxTessControlTextureImageUnits = */ 16, +- /* .MaxTessControlUniformComponents = */ 1024, +- /* .MaxTessControlTotalOutputComponents = */ 4096, +- /* .MaxTessEvaluationInputComponents = */ 128, +- /* .MaxTessEvaluationOutputComponents = */ 128, +- /* .MaxTessEvaluationTextureImageUnits = */ 16, +- /* .MaxTessEvaluationUniformComponents = */ 1024, +- /* .MaxTessPatchComponents = */ 120, +- /* .MaxPatchVertices = */ 32, +- /* .MaxTessGenLevel = */ 64, +- /* .MaxViewports = */ 16, +- /* .MaxVertexAtomicCounters = */ 0, +- /* .MaxTessControlAtomicCounters = */ 0, +- /* .MaxTessEvaluationAtomicCounters = */ 0, +- /* .MaxGeometryAtomicCounters = */ 0, +- /* .MaxFragmentAtomicCounters = */ 8, +- /* .MaxCombinedAtomicCounters = */ 8, +- /* .MaxAtomicCounterBindings = */ 1, +- /* .MaxVertexAtomicCounterBuffers = */ 0, +- /* .MaxTessControlAtomicCounterBuffers = */ 0, +- /* .MaxTessEvaluationAtomicCounterBuffers = */ 0, +- /* .MaxGeometryAtomicCounterBuffers = */ 0, +- /* .MaxFragmentAtomicCounterBuffers = */ 1, +- /* .MaxCombinedAtomicCounterBuffers = */ 1, +- /* .MaxAtomicCounterBufferSize = */ 16384, +- /* .MaxTransformFeedbackBuffers = */ 4, +- /* .MaxTransformFeedbackInterleavedComponents = */ 64, +- /* .MaxCullDistances = */ 8, +- /* .MaxCombinedClipAndCullDistances = */ 8, +- /* .MaxSamples = */ 4, +- /* .maxMeshOutputVerticesNV = */ 256, +- /* .maxMeshOutputPrimitivesNV = */ 512, +- /* .maxMeshWorkGroupSizeX_NV = */ 32, +- /* .maxMeshWorkGroupSizeY_NV = */ 1, +- /* .maxMeshWorkGroupSizeZ_NV = */ 1, +- /* .maxTaskWorkGroupSizeX_NV = */ 32, +- /* .maxTaskWorkGroupSizeY_NV = */ 1, +- /* .maxTaskWorkGroupSizeZ_NV = */ 1, +- /* .maxMeshViewCountNV = */ 4, +- /* .max_mesh_output_vertices_ext = */ 256, +- /* .max_mesh_output_primitives_ext = */ 256, +- /* .max_mesh_work_group_size_x_ext = */ 128, +- /* .max_mesh_work_group_size_y_ext = */ 128, +- /* .max_mesh_work_group_size_z_ext = */ 128, +- /* .max_task_work_group_size_x_ext = */ 128, +- /* .max_task_work_group_size_y_ext = */ 128, +- /* .max_task_work_group_size_z_ext = */ 128, +- /* .max_mesh_view_count_ext = */ 4, +- /* .maxDualSourceDrawBuffersEXT = */ 1, +- +- /* .limits = */ { +- /* .nonInductiveForLoops = */ 1, +- /* .whileLoops = */ 1, +- /* .doWhileLoops = */ 1, +- /* .generalUniformIndexing = */ 1, +- /* .generalAttributeMatrixVectorIndexing = */ 1, +- /* .generalVaryingIndexing = */ 1, +- /* .generalSamplerIndexing = */ 1, +- /* .generalVariableIndexing = */ 1, +- /* .generalConstantMatrixVectorIndexing = */ 1, +- } +-}; diff --git a/libs/geometry/src/MikktspaceImpl.cpp b/libs/geometry/src/MikktspaceImpl.cpp -index f40da14..cb2b914 100644 +index 5c5a1b5..4c6dd9b 100644 --- a/libs/geometry/src/MikktspaceImpl.cpp +++ b/libs/geometry/src/MikktspaceImpl.cpp @@ -21,7 +21,7 @@ - + #include #include -#include @@ -158,7 +273,7 @@ index f40da14..cb2b914 100644 #include diff --git a/libs/imageio/src/BasisEncoder.cpp b/libs/imageio/src/BasisEncoder.cpp -index 0c24e71..19d7e21 100644 +index 0c24e71..fb4eea1 100644 --- a/libs/imageio/src/BasisEncoder.cpp +++ b/libs/imageio/src/BasisEncoder.cpp @@ -22,7 +22,7 @@ @@ -166,12 +281,12 @@ index 0c24e71..19d7e21 100644 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warray-bounds" -#include -+#include ++#include #pragma clang diagnostic pop namespace image { diff --git a/libs/ktxreader/src/Ktx2Reader.cpp b/libs/ktxreader/src/Ktx2Reader.cpp -index 5d53861..d401133 100644 +index 5d53861..f72c108 100644 --- a/libs/ktxreader/src/Ktx2Reader.cpp +++ b/libs/ktxreader/src/Ktx2Reader.cpp @@ -26,7 +26,7 @@ @@ -179,49 +294,26 @@ index 5d53861..d401133 100644 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Warray-bounds" -#include -+#include ++#include #pragma clang diagnostic pop using namespace basist; -diff --git a/libs/matdbg/src/DebugServer.cpp b/libs/matdbg/src/DebugServer.cpp -index 95c5a63..fd2caef 100644 ---- a/libs/matdbg/src/DebugServer.cpp -+++ b/libs/matdbg/src/DebugServer.cpp -@@ -22,7 +22,7 @@ - #include - #include - --#include -+#include - #include - - #include -diff --git a/libs/matdbg/src/ShaderExtractor.cpp b/libs/matdbg/src/ShaderExtractor.cpp -index 3f10b60..bee32dc 100644 ---- a/libs/matdbg/src/ShaderExtractor.cpp -+++ b/libs/matdbg/src/ShaderExtractor.cpp -@@ -26,7 +26,7 @@ - - #include - --#include -+#include - #include - - using namespace filament; diff --git a/libs/matdbg/src/ShaderReplacer.cpp b/libs/matdbg/src/ShaderReplacer.cpp -index 8eb3497..8be176e 100644 +index 9cd8ba4..f388f72 100644 --- a/libs/matdbg/src/ShaderReplacer.cpp +++ b/libs/matdbg/src/ShaderReplacer.cpp -@@ -27,7 +27,7 @@ +@@ -27,9 +27,9 @@ #include -#include +#include - #include "sca/builtinResource.h" +-#include "sca/builtinResource.h" ++#include #include "sca/GLSLTools.h" + + #include "eiff/ChunkContainer.h" diff --git a/libs/viewer/src/RemoteServer.cpp b/libs/viewer/src/RemoteServer.cpp index 441c730..89c492f 100644 --- a/libs/viewer/src/RemoteServer.cpp @@ -264,18 +356,18 @@ index 688272d..5210ebd 100644 #include diff --git a/samples/gltf_viewer.cpp b/samples/gltf_viewer.cpp -index 6f4bf72..787a459 100644 +index 77aee47..b272d0d 100644 --- a/samples/gltf_viewer.cpp +++ b/samples/gltf_viewer.cpp -@@ -41,7 +41,7 @@ +@@ -43,7 +43,7 @@ - #include + #include -#include +#include #include - + #include diff --git a/samples/heightfield.cpp b/samples/heightfield.cpp index 855dabf..92c98ad 100644 --- a/samples/heightfield.cpp @@ -289,8 +381,86 @@ index 855dabf..92c98ad 100644 #include +diff --git a/samples/hellomorphing.cpp b/samples/hellomorphing.cpp +index 54ce244..eb10396 100644 +--- a/samples/hellomorphing.cpp ++++ b/samples/hellomorphing.cpp +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + #include + #include +diff --git a/samples/hellopbr.cpp b/samples/hellopbr.cpp +index f5cae37..08c63d8 100644 +--- a/samples/hellopbr.cpp ++++ b/samples/hellopbr.cpp +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + #include + +diff --git a/samples/helloskinning.cpp b/samples/helloskinning.cpp +index f3d5046..07ee5ab 100644 +--- a/samples/helloskinning.cpp ++++ b/samples/helloskinning.cpp +@@ -35,7 +35,7 @@ + #include + #include + +-#include ++#include + + #include "generated/resources/resources.h" + +diff --git a/samples/helloskinningbuffer.cpp b/samples/helloskinningbuffer.cpp +index 175c62c..59419e3 100644 +--- a/samples/helloskinningbuffer.cpp ++++ b/samples/helloskinningbuffer.cpp +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + #include + #include +diff --git a/samples/helloskinningbuffer_morebones.cpp b/samples/helloskinningbuffer_morebones.cpp +index 184d799..2f7051c 100644 +--- a/samples/helloskinningbuffer_morebones.cpp ++++ b/samples/helloskinningbuffer_morebones.cpp +@@ -29,7 +29,7 @@ + #include + #include + +-#include ++#include + + #include + #include +diff --git a/samples/hellostereo.cpp b/samples/hellostereo.cpp +index fff1616..ef377d7 100644 +--- a/samples/hellostereo.cpp ++++ b/samples/hellostereo.cpp +@@ -37,7 +37,7 @@ + #include + #include + +-#include ++#include + + #include + #include diff --git a/samples/hellotriangle.cpp b/samples/hellotriangle.cpp -index a36df69..590e35a 100644 +index 4477429..67959a5 100644 --- a/samples/hellotriangle.cpp +++ b/samples/hellotriangle.cpp @@ -31,7 +31,7 @@ @@ -393,6 +563,19 @@ index 684b398..f31aa24 100644 #include +diff --git a/samples/skinningtest.cpp b/samples/skinningtest.cpp +index a2da0b1..3c173d2 100644 +--- a/samples/skinningtest.cpp ++++ b/samples/skinningtest.cpp +@@ -30,7 +30,7 @@ + #include + #include + +-#include ++#include + + #include + #include diff --git a/samples/suzanne.cpp b/samples/suzanne.cpp index dae42d3..9e695c7 100644 --- a/samples/suzanne.cpp @@ -472,7 +655,7 @@ index a6d2f56..4f79833 100644 #include #include diff --git a/tools/matc/src/matc/CommandlineConfig.cpp b/tools/matc/src/matc/CommandlineConfig.cpp -index 78460ad..85c4118 100644 +index 6ca6315..11b90b9 100644 --- a/tools/matc/src/matc/CommandlineConfig.cpp +++ b/tools/matc/src/matc/CommandlineConfig.cpp @@ -18,7 +18,7 @@ @@ -485,20 +668,38 @@ index 78460ad..85c4118 100644 #include diff --git a/tools/matc/src/matc/MaterialCompiler.cpp b/tools/matc/src/matc/MaterialCompiler.cpp -index 2785a73..3685dd8 100644 +index 93d0fed..b5f1795 100644 --- a/tools/matc/src/matc/MaterialCompiler.cpp +++ b/tools/matc/src/matc/MaterialCompiler.cpp -@@ -33,7 +33,7 @@ +@@ -34,10 +34,9 @@ #include "JsonishParser.h" #include "ParametersProcessor.h" -#include +-#include "glslang/Include/intermediate.h" +- +-#include "sca/builtinResource.h" +#include ++#include ++#include + + #include + +diff --git a/tools/matedit/src/main.cpp b/tools/matedit/src/main.cpp +index 50b4791..3632102 100644 +--- a/tools/matedit/src/main.cpp ++++ b/tools/matedit/src/main.cpp +@@ -14,7 +14,7 @@ + * limitations under the License. + */ - #include "sca/builtinResource.h" +-#include ++#include + + #include "ExternalCompile.h" diff --git a/tools/matinfo/src/main.cpp b/tools/matinfo/src/main.cpp -index 15a4583..368d7a6 100644 +index ea2d1a0..d60f63d 100644 --- a/tools/matinfo/src/main.cpp +++ b/tools/matinfo/src/main.cpp @@ -14,7 +14,7 @@ @@ -510,15 +711,6 @@ index 15a4583..368d7a6 100644 #include -@@ -25,7 +25,7 @@ - #include - #include - --#include -+#include - #include - - #include diff --git a/tools/mipgen/src/main.cpp b/tools/mipgen/src/main.cpp index c7afabf..8a87dce 100644 --- a/tools/mipgen/src/main.cpp @@ -546,7 +738,7 @@ index e3cadf4..76ec57b 100644 using namespace filament::math; using namespace image; diff --git a/tools/resgen/src/main.cpp b/tools/resgen/src/main.cpp -index 8cae171..26b11ad 100644 +index 1f475c4..d97aaeb 100644 --- a/tools/resgen/src/main.cpp +++ b/tools/resgen/src/main.cpp @@ -16,7 +16,7 @@ @@ -557,7 +749,7 @@ index 8cae171..26b11ad 100644 +#include #include - #include + #include diff --git a/tools/rgb-to-lmsr/src/main.cpp b/tools/rgb-to-lmsr/src/main.cpp index 8d4f3cd..07e8e6b 100644 --- a/tools/rgb-to-lmsr/src/main.cpp @@ -610,49 +802,3 @@ index 43e2005..365222b 100644 #include #include -diff --git a/filament/backend/test/ShaderGenerator.cpp b/filament/backend/test/ShaderGenerator.cpp -index df67bee..7797c6b 100644 ---- a/filament/backend/test/ShaderGenerator.cpp -+++ b/filament/backend/test/ShaderGenerator.cpp -@@ -17,10 +17,10 @@ - #include "ShaderGenerator.h" - - #include --#include -+#include - - #include --#include -+#include - - #include "../src/GLSLPostProcessor.h" - -diff --git a/libs/filamentapp/src/FilamentApp.cpp b/libs/filamentapp/src/FilamentApp.cpp -index 2e7bae9..125d565 100644 ---- a/libs/filamentapp/src/FilamentApp.cpp -+++ b/libs/filamentapp/src/FilamentApp.cpp -@@ -51,6 +51,7 @@ - #include - #include - -+#define STB_IMAGE_IMPLEMENTATION - #include - - #include "generated/resources/filamentapp.h" -diff --git a/libs/filamentapp/src/MeshAssimp.cpp b/libs/filamentapp/src/MeshAssimp.cpp -index 5e3f403..2bf74af 100644 ---- a/libs/filamentapp/src/MeshAssimp.cpp -+++ b/libs/filamentapp/src/MeshAssimp.cpp -@@ -51,7 +51,12 @@ - #include - #include - #include -+#include -+#include - #include -+#if !defined(_AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE) -+#define _AI_MATKEY_GLTF_TEXTURE_TEXCOORD_BASE "$tex.file.texCoord" -+#endif - - #include - diff --git a/ports/google-filament/portfile.cmake b/ports/google-filament/portfile.cmake index 2ca01a67..aa6fe090 100644 --- a/ports/google-filament/portfile.cmake +++ b/ports/google-filament/portfile.cmake @@ -7,31 +7,19 @@ message(STATUS "Using pkgconfig: ${PKGCONFIG}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/filament - REF v1.40.0 - SHA512 479e90710f140f05e07b29fde361ce25841d46da80c123ef99594a2dc253588c6bb561a1ad93580c26280793b1a47c1f89b32e31ac52b00a2fb744c15ee515ba - PATCHES - fix-cmake.patch - fix-sources.patch -) - -file(REMOVE_RECURSE - "${SOURCE_PATH}/android" - "${SOURCE_PATH}/ios" - "${SOURCE_PATH}/web" - "${SOURCE_PATH}/docs" - "${SOURCE_PATH}/site" - "${SOURCE_PATH}/third_party/clang" - "${SOURCE_PATH}/third_party/markdeep" - "${SOURCE_PATH}/third_party/vkmemalloc" + REF v1.54.5 + SHA512 63f43987bd00fbc752f29755a49e0f65bc1ceeb0b6510d43d6da3964ccd06f20fe7f02f631dacd5c0387918e389416cf7818eaf1d3bcc70f7fb98ff2fbdbf59e + # PATCHES + # fix-cmake.patch + # fix-sources.patch ) message(STATUS "Editing third_party folder ...") function(edit_third_party SRC_PORT DST_NAME) get_filename_component(DST_DIR "${SOURCE_PATH}/third_party/${DST_NAME}" ABSOLUTE) - get_filename_component(DST_PATH "${DST_DIR}/LICENSE" ABSOLUTE) file(REMOVE_RECURSE "${DST_DIR}") file(MAKE_DIRECTORY "${DST_DIR}") - file(COPY_FILE "${CURRENT_INSTALLED_DIR}/share/${SRC_PORT}/copyright" "${DST_PATH}") + file(COPY_FILE "${CURRENT_INSTALLED_DIR}/share/${SRC_PORT}/copyright" "${DST_DIR}/LICENSE") endfunction() edit_third_party(glslang glslang) edit_third_party(assimp libassimp) @@ -42,17 +30,15 @@ edit_third_party(stb stb) edit_third_party(mikktspace mikktspace) edit_third_party(meshoptimizer meshoptimizer) edit_third_party(tinyexr tinyexr) -edit_third_party(zlib libz) edit_third_party(sdl2 libsdl2) edit_third_party(draco draco) -edit_third_party(gtest libgtest) -edit_third_party(benchmark benchmark) edit_third_party(civetweb civetweb) edit_third_party(basis-universal basisu) edit_third_party(cgltf cgltf) edit_third_party(imgui imgui) edit_third_party(jsmn jsmn) edit_third_party(robin-map robin-map) +# edit_third_party(zlib libz) if(VCPKG_TARGET_IS_WINDOWS) edit_third_party(getopt-win32 getopt) @@ -60,6 +46,10 @@ endif() if("vulkan" IN_LIST FEATURES) edit_third_party(vulkan-memory-allocator vkmemalloc) endif() +if("test" IN_LIST FEATURES) + edit_third_party(gtest libgtest) + edit_third_party(benchmark benchmark) +endif() vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -78,26 +68,24 @@ else() list(APPEND GENERATOR_OPTIONS GENERATOR Ninja) endif() +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_CRT) + # todo: more precise control for gles3/vulkan features vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" ${GENERATOR_OPTIONS} OPTIONS ${FEATURE_OPTIONS} + -DUSE_STATIC_CRT=${USE_STATIC_CRT} -DPKG_CONFIG_EXECUTABLE:FILEPATH=${PKGCONFIG} -DCMAKE_CROSSCOMPILING=${VCPKG_CROSSCOMPILING} -DFILAMENT_SUPPORTS_XCB=${VCPKG_TARGET_IS_LINUX} -DFILAMENT_SUPPORTS_XLIB=${VCPKG_TARGET_IS_LINUX} -DFILAMENT_SUPPORTS_WAYLAND=${VCPKG_TARGET_IS_LINUX} -DFILAMENT_SUPPORTS_EGL_ON_LINUX=${VCPKG_TARGET_IS_LINUX} - -DFILAMENT_ENABLE_ASAN_UBSAN=OFF - -DFILAMENT_ENABLE_LTO=ON - -DFILAMENT_ENABLE_MATDBG=OFF # matdbg, matdbg_resources - -DFILAMENT_BUILD_FILAMAT=ON - OPTIONS_DEBUG - -DFILAMENT_DISABLE_MATOPT=ON - OPTIONS_RELEASE - -DFILAMENT_DISABLE_MATOPT=OFF + -DFILAMENT_BUILD_FILAMAT=OFF + -DFILAMENT_ENABLE_MATDBG=OFF # material debugger: matdbg, matdbg_resources + -DFILAMENT_DISABLE_MATOPT=ON # material optimization ) # some targets requires tools for resource generation @@ -105,24 +93,19 @@ if(VCPKG_CROSSCOMPILING) vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/bin") vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}") else() - message(STATUS "Building tools ...") - list(APPEND TOOL_TARGET_NAMES - resgen glslminifier matc cmgen mipgen uberz filamesh # matinfo - normal-blending roughness-prefilter specular-color - ) - foreach(NAME ${TOOL_TARGET_NAMES}) - vcpkg_cmake_build(TARGET ${NAME} LOGFILE_BASE build-${NAME} ADD_BIN_TO_PATH) - endforeach() message(STATUS "Building shaders ...") vcpkg_cmake_build(TARGET shaders LOGFILE_BASE build-shaders ADD_BIN_TO_PATH) endif() - -message(STATUS "Building libraries ...") -vcpkg_cmake_build(TARGET filament LOGFILE_BASE build-filament ADD_BIN_TO_PATH) +message(STATUS "Building ...") +# vcpkg_cmake_build(TARGET filament LOGFILE_BASE build-filament ADD_BIN_TO_PATH) vcpkg_cmake_install(ADD_BIN_TO_PATH) vcpkg_copy_pdbs() if(NOT VCPKG_CROSSCOMPILING) + list(APPEND TOOL_TARGET_NAMES + resgen glslminifier matc cmgen mipgen uberz filamesh # matinfo + normal-blending roughness-prefilter specular-color + ) vcpkg_copy_tools(TOOL_NAMES ${TOOL_TARGET_NAMES} AUTO_CLEAN) if("samples" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES gltf_viewer material_sandbox AUTO_CLEAN) diff --git a/ports/google-filament/vcpkg.json b/ports/google-filament/vcpkg.json index 8f9e41e2..343b17ee 100644 --- a/ports/google-filament/vcpkg.json +++ b/ports/google-filament/vcpkg.json @@ -1,9 +1,9 @@ { "name": "google-filament", - "version": "1.40.0", + "version": "1.54.5", "description": "Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2", "homepage": "https://github.com/google/filament", - "supports": "windows | osx | linux", + "supports": "windows", "dependencies": [ "assimp", {