baseline CI jobs

-ivi-homescreen
-clang-format
-clang-tidy

Signed-off-by: Joel Winarske <joel.winarske@toyotaconnected.com>
This commit is contained in:
Joel Winarske
2024-08-27 08:07:23 -07:00
parent c35f27d8d0
commit f3fc7dc8e6
11 changed files with 1279 additions and 1 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ Standard: c++17
SortIncludes: CaseSensitive
---
Language: ObjC
ColumnLimit: 100
ColumnLimit: 100
+42
View File
@@ -0,0 +1,42 @@
name: clang-format
on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
jobs:
format:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install packages
run: |
sudo apt-get -o DPkg::Lock::Timeout=1200 -y update
sudo apt-get -o DPkg::Lock::Timeout=1200 -y install clang-format libtinfo5
mkdir clang18 && cd clang18
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar -xJf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components=1
bin/clang-format --version
- name: Run Clang-format
working-directory: ${{github.workspace}}
run: |
find plugins -name '*.cc' -o -name '*.hpp' -o -name '*.h' > clang-format-files
clang18/bin/clang-format -n --Werror --files=clang-format-files 2> clang-format-results.txt
- name: Show results
if: always()
run: |
cat clang-format-results.txt
- name: Publish Report
if: always()
uses: actions/upload-artifact@v3
with:
name: clang-format-results
path: clang-format-*
+150
View File
@@ -0,0 +1,150 @@
name: clang-tidy
on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
jobs:
tidy:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: plugins
submodules: 'true'
persist-credentials: false
- name: Fetch ivi-homescreen
working-directory: ${{github.workspace}}
run: |
git clone https://github.com/toyota-connected/ivi-homescreen.git
cd ivi-homescreen
git submodule update --init --recursive
- name: Install packages
run: |
sudo apt-get -o DPkg::Lock::Timeout=1200 -y install \
\
ninja-build \
\
libwayland-dev wayland-protocols libxkbcommon-dev \
\
mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev \
mesa-utils \
\
libcurl4-openssl-dev \
libevent-dev \
libglfw3-dev \
libicu-dev \
libsecret-1-dev \
libsdl2-dev \
libuv1-dev \
\
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libavformat-dev libavutil-dev \
\
libunwind-dev \
\
libjpeg-turbo8-dev libturbojpeg0-dev libjpeg-dev \
libpng-dev libwebp-dev
sudo apt-get -o DPkg::Lock::Timeout=1200 -y install rpm clang-tidy libtinfo5
mkdir clang18 && cd clang18
curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.8/clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar -xJf clang+llvm-18.1.8-x86_64-linux-gnu-ubuntu-18.04.tar.xz --strip-components=1
bin/clang-format --version
- name: Cache libcamera
id: cache-libcamera
uses: actions/cache@v4
with:
save-always: true
path: |
${{github.workspace}}/libcamera/buildDir/staging/release
key: ${{ runner.os }}-libcamera
- name: Cache filament
id: cache-filament
uses: actions/cache@v4
with:
save-always: true
path: |
${{github.workspace}}/filament/cmake-build-release/staging/release
key: ${{ runner.os }}-filament
- name: Configure CMake
working-directory: ${{github.workspace}}
run: |
mkdir -p ${{github.workspace}}/build/debug
PKG_CONFIG_PATH=${{github.workspace}}/libcamera/buildDir/staging/release/lib/x86_64-linux-gnu/pkgconfig \
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -GNinja \
${{github.workspace}}/ivi-homescreen \
-B ${{github.workspace}}/build/debug \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_STAGING_PREFIX=${{github.workspace}}/build/staging/usr/local \
-D BUILD_NUMBER=${GITHUB_RUN_ID} \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D ENABLE_DLT=OFF \
-D BUILD_CRASH_HANDLER=OFF \
-D ENABLE_LTO=ON \
\
-D PLUGINS_DIR=${{github.workspace}}/plugins \
\
-D DEBUG_PLATFORM_MESSAGES=OFF \
\
-D BUILD_PLUGIN_AUDIOPLAYERS_LINUX=OFF \
-D BUILD_PLUGIN_CAMERA=ON \
-D BUILD_PLUGIN_CLOUD_FIRESTORE=OFF \
-D BUILD_PLUGIN_COMP_REGION=OFF \
-D BUILD_PLUGIN_COMP_SURF=OFF \
-D BUILD_PLUGIN_DESKTOP_WINDOW_LINUX=ON \
-D BUILD_PLUGIN_FILAMENT_VIEW=ON \
-D FILAMENT_INCLUDE_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/include \
-D FILAMENT_LINK_LIBRARIES_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/lib/x86_64 \
-D BUILD_PLUGIN_FILE_SELECTOR=ON \
-D BUILD_PLUGIN_FIREBASE_AUTH=OFF \
-D BUILD_PLUGIN_FIREBASE_CORE=OFF \
-D BUILD_PLUGIN_FIREBASE_STORAGE=OFF \
-D BUILD_PLUGIN_GO_ROUTER=ON \
-D BUILD_PLUGIN_GOOGLE_SIGN_IN=OFF \
-D BUILD_PLUGIN_INTEGRATION_TEST=OFF \
-D BUILD_PLUGIN_LAYER_PLAYGROUND_VIEW=ON \
-D BUILD_PLUGIN_NAV_RENDER_VIEW=ON \
-D BUILD_PLUGIN_PDF=OFF \
-D BUILD_PLUGIN_SECURE_STORAGE=ON \
-D BUILD_PLUGIN_URL_LAUNCHER=ON \
-D BUILD_PLUGIN_VIDEO_PLAYER_LINUX=OFF \
-D BUILD_PLUGIN_WEBVIEW_FLUTTER_VIEW=ON \
\
-D ENABLE_CLANG_STATIC_LINK=OFF \
-D BUILD_WATCHDOG=OFF \
-D BUILD_SYSTEMD_WATCHDOG=OFF \
\
-D CMAKE_EXPORT_COMPILE_COMMANDS=ON
ln -s ${{github.workspace}}/build/debug/compile_commands.json ..
- name: clang-tidy
working-directory: ${{github.workspace}}
run: |
export FILE_LIST=$(find plugins -name '*.cc' -o -name '*.hpp' -o -name '*.h')
echo $FILE_LIST
clang18/bin/clang-tidy --warnings-as-errors='*,-bugprone-macro-parentheses' --quiet --export-fixes=tidy-results-suggested-fixes.txt $FILE_LIST 2> tidy-results-log.txt
- name: Show results
if: always()
run: |
cat tidy-results-log.txt
cat tidy-results-suggested-fixes.txt
- name: Publish Report
if: always()
uses: actions/upload-artifact@v3
with:
name: clang-tidy-results
path: tidy-results-*
+298
View File
@@ -0,0 +1,298 @@
---
name: ivi-homescreen-plugins
on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
release:
types: [ published, created, edited ]
workflow_dispatch:
schedule:
# daily
- cron: '0 0 * * *'
jobs:
homescreen:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: plugins
submodules: 'true'
persist-credentials: false
- name: Fetch ivi-homescreen
working-directory: ${{github.workspace}}
run: |
git clone https://github.com/toyota-connected/ivi-homescreen.git
cd ivi-homescreen
git submodule update --init --recursive
- name: Install runtime packages
run: |
sudo apt-get -y install \
\
ninja-build \
\
libwayland-dev wayland-protocols libxkbcommon-dev \
\
mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev \
mesa-utils \
\
libcurl4-openssl-dev \
libevent-dev \
libglfw3-dev \
libicu-dev \
libsecret-1-dev \
libsdl2-dev \
libuv1-dev \
\
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libavformat-dev libavutil-dev \
\
libunwind-dev \
\
libjpeg-turbo8-dev libturbojpeg0-dev libjpeg-dev \
libpng-dev libwebp-dev
sudo apt-get -y install \
clang \
llvm \
lldb \
lld \
libc++-dev \
libc++abi-dev \
libc++1 \
libc++abi1
pip3 install absl-py jinja2 ply meson --user
cmake --version
gcc --version
- name: Cache libcamera
id: cache-libcamera
uses: actions/cache@v4
with:
key: ${{ runner.os }}-libcamera
save-always: true
path: |
${{github.workspace}}/libcamera/buildDir/staging/release/*
- name: Build libcamera
if: steps.cache-libcamera.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}
run: |
git clone https://git.libcamera.org/libcamera/libcamera.git
cd libcamera && git checkout v0.3.1
LIBCAMERA_STAGING=$PWD/buildDir/staging/release
CC=/usr/bin/clang CXX=/usr/bin/clang++ \
meson setup buildDir -Dqcam="disabled" -Dlc-compliance="disabled" -Dcam="disabled" -Dgstreamer="disabled" --prefix $LIBCAMERA_STAGING
ninja -C buildDir install
ls -laR $LIBCAMERA_STAGING
- name: Cache filament
id: cache-filament
uses: actions/cache@v4
with:
save-always: true
path: |
${{github.workspace}}/filament/cmake-build-release/staging/release/*
key: ${{ runner.os }}-filament
- name: Build Filament
if: steps.cache-filament.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}
run: |
git clone https://github.com/google/filament.git
cd filament
git checkout v1.52.3
PATCHES=$(find ${{github.workspace}} -iname patches)
git apply $PATCHES/filament/0001-error-ignoring-return-value-of-function-declared-wit.patch
git apply $PATCHES/filament/0002-disable-backend-tests.patch
git apply $PATCHES/filament/0003-install-required-files.patch
git apply $PATCHES/filament/0004-move-include-contents-to-include-filament.patch
git apply $PATCHES/filament/0005-move-libraries-so-they-install.patch
git apply $PATCHES/filament/0006-return-shader-type-mobile-for-linux-vulkan.patch
FILAMENT_BUILD_DIR=$PWD/cmake-build-release
FILAMENT_STAGING_DIR=${FILAMENT_BUILD_DIR}/staging/release
mkdir -p $FILAMENT_BUILD_DIR
cd $FILAMENT_BUILD_DIR
CC=/usr/bin/clang CXX=/usr/bin/clang++ \
cmake .. -GNinja \
-DFILAMENT_SUPPORTS_VULKAN=ON \
-DFILAMENT_ENABLE_LTO=ON \
-DFILAMENT_SUPPORTS_OPENGL=OFF \
-DFILAMENT_USE_EXTERNAL_GLES3=OFF \
-DFILAMENT_SUPPORTS_WAYLAND=ON \
-DFILAMENT_SUPPORTS_X11=OFF \
-DFILAMENT_SUPPORTS_XCB=OFF \
-DFILAMENT_SUPPORTS_EGL_ON_LINUX=OFF \
-DFILAMENT_SKIP_SDL2=ON \
-DFILAMENT_SKIP_SAMPLES=ON \
-DFILAMENT_USE_SWIFTSHADER=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_STAGING_PREFIX=${FILAMENT_STAGING_DIR} \
-DCMAKE_BUILD_TYPE=Release
ninja -C . install
- name: Configure Debug
run: |
mkdir -p ${{github.workspace}}/build/debug
PKG_CONFIG_PATH=${{github.workspace}}/libcamera/buildDir/staging/release/lib/x86_64-linux-gnu/pkgconfig \
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -GNinja \
${{github.workspace}}/ivi-homescreen \
-B ${{github.workspace}}/build/debug \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_STAGING_PREFIX=${{github.workspace}}/build/staging/usr/local \
-D BUILD_NUMBER=${GITHUB_RUN_ID} \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D ENABLE_DLT=OFF \
-D BUILD_CRASH_HANDLER=OFF \
-D ENABLE_LTO=ON \
\
-D PLUGINS_DIR=${{github.workspace}}/plugins \
\
-D DEBUG_PLATFORM_MESSAGES=OFF \
\
-D BUILD_PLUGIN_AUDIOPLAYERS_LINUX=OFF \
-D BUILD_PLUGIN_CAMERA=ON \
-D BUILD_PLUGIN_CLOUD_FIRESTORE=OFF \
-D BUILD_PLUGIN_COMP_REGION=OFF \
-D BUILD_PLUGIN_COMP_SURF=OFF \
-D BUILD_PLUGIN_DESKTOP_WINDOW_LINUX=ON \
-D BUILD_PLUGIN_FILAMENT_VIEW=ON \
-D FILAMENT_INCLUDE_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/include \
-D FILAMENT_LINK_LIBRARIES_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/lib/x86_64 \
-D BUILD_PLUGIN_FILE_SELECTOR=ON \
-D BUILD_PLUGIN_FIREBASE_AUTH=OFF \
-D BUILD_PLUGIN_FIREBASE_CORE=OFF \
-D BUILD_PLUGIN_FIREBASE_STORAGE=OFF \
-D BUILD_PLUGIN_GO_ROUTER=ON \
-D BUILD_PLUGIN_GOOGLE_SIGN_IN=OFF \
-D BUILD_PLUGIN_INTEGRATION_TEST=OFF \
-D BUILD_PLUGIN_LAYER_PLAYGROUND_VIEW=ON \
-D BUILD_PLUGIN_NAV_RENDER_VIEW=ON \
-D BUILD_PLUGIN_PDF=OFF \
-D BUILD_PLUGIN_SECURE_STORAGE=ON \
-D BUILD_PLUGIN_URL_LAUNCHER=ON \
-D BUILD_PLUGIN_VIDEO_PLAYER_LINUX=OFF \
-D BUILD_PLUGIN_WEBVIEW_FLUTTER_VIEW=ON \
\
-D ENABLE_CLANG_STATIC_LINK=OFF \
-D BUILD_WATCHDOG=OFF \
-D BUILD_SYSTEMD_WATCHDOG=OFF
- name: Build Debug Package
working-directory: ${{github.workspace}}/build/debug
run: |
rm -rf _packages || true
ninja -C . package
ls -la _packages
- name: Publish Debug Artifact TGZ
uses: actions/upload-artifact@v4
with:
name: homescreen-dbg.Linux.tar.gz.zip
path: |
build/debug/_packages/homescreen-dbg-*-Linux.tar.gz
- name: Publish Debug Artifact Debian
uses: actions/upload-artifact@v4
with:
name: homescreen-dbg.amd64.deb.zip
path: |
build/debug/_packages/homescreen-dbg*_amd64.*deb
- name: Publish Debug Artifact RPM
uses: actions/upload-artifact@v4
with:
name: homescreen-dbg.x86_64.rpm.zip
path: |
build/debug/_packages/homescreen-dbg-*.x86_64.rpm
- name: Configure Release
run: |
mkdir -p ${{github.workspace}}/build/release
PKG_CONFIG_PATH=${{github.workspace}}/libcamera/buildDir/staging/release/lib/x86_64-linux-gnu/pkgconfig \
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -GNinja \
${{github.workspace}}/ivi-homescreen \
-B ${{github.workspace}}/build/release \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_STAGING_PREFIX=${{github.workspace}}/build/staging/usr/local \
-D BUILD_NUMBER=${GITHUB_RUN_ID} \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D ENABLE_DLT=OFF \
-D BUILD_CRASH_HANDLER=OFF \
-D ENABLE_LTO=ON \
\
-D PLUGINS_DIR=${{github.workspace}}/plugins \
\
-D DEBUG_PLATFORM_MESSAGES=OFF \
\
-D BUILD_PLUGIN_AUDIOPLAYERS_LINUX=OFF \
-D BUILD_PLUGIN_CAMERA=ON \
-D BUILD_PLUGIN_CLOUD_FIRESTORE=OFF \
-D BUILD_PLUGIN_COMP_REGION=OFF \
-D BUILD_PLUGIN_COMP_SURF=OFF \
-D BUILD_PLUGIN_DESKTOP_WINDOW_LINUX=ON \
-D BUILD_PLUGIN_FILAMENT_VIEW=ON \
-D FILAMENT_INCLUDE_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/include \
-D FILAMENT_LINK_LIBRARIES_DIR=${{github.workspace}}/filament/cmake-build-release/staging/release/lib/x86_64 \
-D BUILD_PLUGIN_FILE_SELECTOR=ON \
-D BUILD_PLUGIN_FIREBASE_AUTH=OFF \
-D BUILD_PLUGIN_FIREBASE_CORE=OFF \
-D BUILD_PLUGIN_FIREBASE_STORAGE=OFF \
-D BUILD_PLUGIN_GO_ROUTER=ON \
-D BUILD_PLUGIN_GOOGLE_SIGN_IN=OFF \
-D BUILD_PLUGIN_INTEGRATION_TEST=OFF \
-D BUILD_PLUGIN_LAYER_PLAYGROUND_VIEW=ON \
-D BUILD_PLUGIN_NAV_RENDER_VIEW=ON \
-D BUILD_PLUGIN_PDF=OFF \
-D BUILD_PLUGIN_SECURE_STORAGE=ON \
-D BUILD_PLUGIN_URL_LAUNCHER=ON \
-D BUILD_PLUGIN_VIDEO_PLAYER_LINUX=OFF \
-D BUILD_PLUGIN_WEBVIEW_FLUTTER_VIEW=ON \
\
-D ENABLE_CLANG_STATIC_LINK=OFF \
-D BUILD_WATCHDOG=OFF \
-D BUILD_SYSTEMD_WATCHDOG=OFF
- name: Build Release Package
working-directory: ${{github.workspace}}/build/release
run: |
rm -rf _packages || true
ninja -C . package
ls -la _packages
echo "Release Info"
ls -la shell/homescreen
echo "Strip executable"
strip shell/homescreen
ls -la shell/homescreen
echo "List Dependencies"
ldd shell/homescreen
- name: Publish Release Artifact TGZ
uses: actions/upload-artifact@v4
with:
name: homescreen.Linux.tar.gz.zip
path: |
build/release/_packages/homescreen-*-Linux.tar.gz
- name: Publish Release Artifact Debian
uses: actions/upload-artifact@v4
with:
name: homescreen.amd64.deb.zip
path: |
build/release/_packages/homescreen_*_amd64.deb
- name: Publish Release Artifact RPM
uses: actions/upload-artifact@v4
with:
name: homescreen.x86_64.rpm.zip
path: |
build/release/_packages/homescreen-*.x86_64.rpm
@@ -0,0 +1,26 @@
From 5b050dc0b7fb21fd5752ca98b434950791400df2 Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Wed, 12 Jun 2024 06:40:59 -0700
Subject: [PATCH 1/5] error ignoring return value of function declared wit
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
libs/utils/include/utils/memalign.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/utils/include/utils/memalign.h b/libs/utils/include/utils/memalign.h
index 4c048bffd..a96a08a70 100644
--- a/libs/utils/include/utils/memalign.h
+++ b/libs/utils/include/utils/memalign.h
@@ -40,7 +40,7 @@ inline void* aligned_alloc(size_t size, size_t align) noexcept {
#if defined(WIN32)
p = ::_aligned_malloc(size, align);
#else
- ::posix_memalign(&p, align, size);
+ (void)::posix_memalign(&p, align, size);
#endif
return p;
}
--
2.45.1
@@ -0,0 +1,134 @@
From 6a920a7612cfea25bbea78600b16e3075a30a8f7 Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Wed, 12 Jun 2024 06:41:19 -0700
Subject: [PATCH 2/5] disable backend tests
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
filament/backend/CMakeLists.txt | 113 --------------------------------
1 file changed, 113 deletions(-)
diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt
index 6a7f66cc2..378f45aed 100644
--- a/filament/backend/CMakeLists.txt
+++ b/filament/backend/CMakeLists.txt
@@ -400,116 +400,3 @@ set(INSTALL_TYPE ARCHIVE)
install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
install(TARGETS vkshaders ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
install(DIRECTORY ${PUBLIC_HDR_DIR}/backend DESTINATION include)
-
-# ==================================================================================================
-# Test
-# ==================================================================================================
-option(INSTALL_BACKEND_TEST "Install the backend test library so it can be consumed on iOS" OFF)
-
-if (APPLE OR LINUX)
- set(BACKEND_TEST_SRC
- test/BackendTest.cpp
- test/ShaderGenerator.cpp
- test/TrianglePrimitive.cpp
- test/Arguments.cpp
- test/test_FeedbackLoops.cpp
- test/test_Blit.cpp
- test/test_MissingRequiredAttributes.cpp
- test/test_ReadPixels.cpp
- test/test_BufferUpdates.cpp
- test/test_Callbacks.cpp
- test/test_MRT.cpp
- test/test_PushConstants.cpp
- test/test_LoadImage.cpp
- test/test_StencilBuffer.cpp
- test/test_Scissor.cpp
- test/test_MipLevels.cpp
- )
- set(BACKEND_TEST_LIBS
- backend
- getopt
- gtest
- imageio
- filamat
- SPIRV
- spirv-cross-glsl)
-endif()
-
-if (APPLE)
- # TODO: we should expand this test to Linux and other platforms.
- list(APPEND BACKEND_TEST_SRC
- test/test_RenderExternalImage.cpp)
- add_library(backend_test STATIC ${BACKEND_TEST_SRC})
- target_link_libraries(backend_test PRIVATE ${BACKEND_TEST_LIBS})
-
- 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)
- 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()
-
- set_target_properties(backend_test PROPERTIES FOLDER Tests)
-
- if (APPLE AND NOT IOS)
- add_executable(backend_test_mac test/mac_runner.mm)
- target_link_libraries(backend_test_mac PRIVATE "-framework Metal -framework AppKit -framework QuartzCore")
- # Because each test case is a separate file, the -force_load flag is necessary to prevent the
- # linker from removing "unused" symbols.
- target_link_libraries(backend_test_mac PRIVATE -force_load backend_test)
- set_target_properties(backend_test_mac PROPERTIES FOLDER Tests)
-
- # This is needed after XCode 15.3
- set_target_properties(backend_test_mac PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
- set_target_properties(backend_test_mac PROPERTIES INSTALL_RPATH /usr/local/lib)
- endif()
-endif()
-
-if (LINUX)
- add_executable(backend_test_linux test/linux_runner.cpp ${BACKEND_TEST_SRC})
- target_link_libraries(backend_test_linux PRIVATE ${BACKEND_TEST_LIBS})
- set_target_properties(backend_test_linux PROPERTIES FOLDER Tests)
-endif()
-
-# ==================================================================================================
-# Compute tests
-
-if (NOT IOS AND NOT WEBGL)
-
-add_executable(compute_test
- test/ComputeTest.cpp
- test/Arguments.cpp
- test/test_ComputeBasic.cpp
- )
-
-target_link_libraries(compute_test PRIVATE
- backend
- getopt
- gtest
- )
-
-set_target_properties(compute_test PROPERTIES FOLDER Tests)
-
-endif()
--
2.45.1
@@ -0,0 +1,73 @@
From cc923cd0b88c587f0559fe2d6a830f3781154a69 Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Wed, 12 Jun 2024 06:43:06 -0700
Subject: [PATCH 3/5] install required files
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
libs/imageio/CMakeLists.txt | 10 ++++++++--
third_party/libpng/tnt/CMakeLists.txt | 2 ++
third_party/stb/tnt/CMakeLists.txt | 1 +
third_party/tinyexr/tnt/CMakeLists.txt | 5 ++++-
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/libs/imageio/CMakeLists.txt b/libs/imageio/CMakeLists.txt
index 47544655b..69dc695c4 100644
--- a/libs/imageio/CMakeLists.txt
+++ b/libs/imageio/CMakeLists.txt
@@ -36,11 +36,17 @@ set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
target_link_libraries(${TARGET} PUBLIC image math png tinyexr utils z basis_encoder)
if (WIN32)
target_link_libraries(${TARGET} PRIVATE wsock32)
-endif()
+endif ()
# ==================================================================================================
# Compiler flags
# ==================================================================================================
if (NOT MSVC)
target_compile_options(${TARGET} PRIVATE -Wno-deprecated-register)
-endif()
+endif ()
+
+# ==================================================================================================
+# Installation
+# ==================================================================================================
+install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
+install(DIRECTORY ${PUBLIC_HDR_DIR}/imageio DESTINATION include)
diff --git a/third_party/libpng/tnt/CMakeLists.txt b/third_party/libpng/tnt/CMakeLists.txt
index cd5a033f5..4925a0474 100644
--- a/third_party/libpng/tnt/CMakeLists.txt
+++ b/third_party/libpng/tnt/CMakeLists.txt
@@ -57,3 +57,5 @@ target_link_libraries(${TARGET} PUBLIC z)
# specify where the public headers of this library are
target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
+
+install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
diff --git a/third_party/stb/tnt/CMakeLists.txt b/third_party/stb/tnt/CMakeLists.txt
index 0c25061c0..563a2604d 100644
--- a/third_party/stb/tnt/CMakeLists.txt
+++ b/third_party/stb/tnt/CMakeLists.txt
@@ -15,3 +15,4 @@ target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
install(TARGETS stb ARCHIVE DESTINATION lib/${DIST_DIR})
+install(FILES ${PUBLIC_HDRS} DESTINATION include)
diff --git a/third_party/tinyexr/tnt/CMakeLists.txt b/third_party/tinyexr/tnt/CMakeLists.txt
index 20955b77b..ffe7cdfe1 100644
--- a/third_party/tinyexr/tnt/CMakeLists.txt
+++ b/third_party/tinyexr/tnt/CMakeLists.txt
@@ -20,4 +20,7 @@ include_directories(${PUBLIC_HDR_DIR})
add_library(${TARGET} STATIC ${PUBLIC_HDRS} ${SRCS})
target_include_directories (${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_link_libraries(${TARGET} LINK_PUBLIC z)
-set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
\ No newline at end of file
+set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
+
+install(FILES ${PUBLIC_HDRS} DESTINATION include)
+install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
--
2.45.1
@@ -0,0 +1,363 @@
From 97fd693d50312f684c209262de99383c0347f00c Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Wed, 12 Jun 2024 06:47:04 -0700
Subject: [PATCH 4/5] move include contents to include filament
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
filament/CMakeLists.txt | 2 +-
filament/backend/CMakeLists.txt | 2 +-
libs/camutils/CMakeLists.txt | 2 +-
libs/filabridge/CMakeLists.txt | 2 +-
libs/filaflat/CMakeLists.txt | 2 +-
libs/filamat/CMakeLists.txt | 2 +-
libs/filameshio/CMakeLists.txt | 2 +-
libs/geometry/CMakeLists.txt | 2 +-
libs/gltfio/CMakeLists.txt | 4 ++--
libs/ibl/CMakeLists.txt | 2 +-
libs/iblprefilter/CMakeLists.txt | 2 +-
libs/image/CMakeLists.txt | 2 +-
libs/imageio/CMakeLists.txt | 2 +-
libs/ktxreader/CMakeLists.txt | 2 +-
libs/matdbg/CMakeLists.txt | 2 +-
libs/math/CMakeLists.txt | 2 +-
libs/mathio/CMakeLists.txt | 2 +-
libs/uberz/CMakeLists.txt | 2 +-
libs/utils/CMakeLists.txt | 6 +++---
libs/viewer/CMakeLists.txt | 2 +-
third_party/libassimp/contrib/zip/CMakeLists.txt | 2 +-
third_party/libpng/CMakeLists.txt | 4 ++--
third_party/libsdl2/CMakeLists.txt | 2 +-
third_party/mikktspace/CMakeLists.txt | 2 +-
third_party/robin-map/tnt/CMakeLists.txt | 2 +-
third_party/stb/tnt/CMakeLists.txt | 2 +-
third_party/tinyexr/tnt/CMakeLists.txt | 2 +-
27 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/filament/CMakeLists.txt b/filament/CMakeLists.txt
index 796acedb7..f9453335f 100644
--- a/filament/CMakeLists.txt
+++ b/filament/CMakeLists.txt
@@ -614,7 +614,7 @@ 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)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/filament DESTINATION include/filament)
install(FILES "README.md" DESTINATION .)
install(FILES "../LICENSE" DESTINATION .)
diff --git a/filament/backend/CMakeLists.txt b/filament/backend/CMakeLists.txt
index 378f45aed..0cfbc6f82 100644
--- a/filament/backend/CMakeLists.txt
+++ b/filament/backend/CMakeLists.txt
@@ -399,4 +399,4 @@ target_link_libraries(${TARGET} PRIVATE
set(INSTALL_TYPE ARCHIVE)
install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
install(TARGETS vkshaders ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/backend DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/backend DESTINATION include/filament)
diff --git a/libs/camutils/CMakeLists.txt b/libs/camutils/CMakeLists.txt
index 541261c1a..013cbce09 100644
--- a/libs/camutils/CMakeLists.txt
+++ b/libs/camutils/CMakeLists.txt
@@ -45,7 +45,7 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/camutils DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/camutils DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/libs/filabridge/CMakeLists.txt b/libs/filabridge/CMakeLists.txt
index ffcd1ce23..27ed9e33b 100644
--- a/libs/filabridge/CMakeLists.txt
+++ b/libs/filabridge/CMakeLists.txt
@@ -31,5 +31,5 @@ target_link_libraries(${TARGET} backend_headers)
# ==================================================================================================
# Installation
# ==================================================================================================
-install(DIRECTORY ${PUBLIC_HDR_DIR}/filament DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/filament DESTINATION include/filament)
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
diff --git a/libs/filaflat/CMakeLists.txt b/libs/filaflat/CMakeLists.txt
index 0ebf53e06..5fff8201b 100644
--- a/libs/filaflat/CMakeLists.txt
+++ b/libs/filaflat/CMakeLists.txt
@@ -34,5 +34,5 @@ endif()
# Installation
# ==================================================================================================
# We do not need filaflat headers in the install directory
-# install(DIRECTORY ${PUBLIC_HDR_DIR}/filaflat DESTINATION include)
+# install(DIRECTORY ${PUBLIC_HDR_DIR}/filaflat DESTINATION include/filament)
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
diff --git a/libs/filamat/CMakeLists.txt b/libs/filamat/CMakeLists.txt
index 2fc20d7e9..41c1f6c20 100644
--- a/libs/filamat/CMakeLists.txt
+++ b/libs/filamat/CMakeLists.txt
@@ -140,7 +140,7 @@ 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(DIRECTORY ${PUBLIC_HDR_DIR}/filamat DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/libs/filameshio/CMakeLists.txt b/libs/filameshio/CMakeLists.txt
index eab319211..714300219 100644
--- a/libs/filameshio/CMakeLists.txt
+++ b/libs/filameshio/CMakeLists.txt
@@ -32,7 +32,7 @@ target_link_libraries(${TARGET}
# ==================================================================================================
set(INSTALL_TYPE ARCHIVE)
install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
-install(FILES ${DIST_HDRS} DESTINATION include/${TARGET})
+install(FILES ${DIST_HDRS} DESTINATION include/filament/${TARGET})
# ==================================================================================================
# Tests
diff --git a/libs/geometry/CMakeLists.txt b/libs/geometry/CMakeLists.txt
index a7e8f398e..5a5bb88ec 100644
--- a/libs/geometry/CMakeLists.txt
+++ b/libs/geometry/CMakeLists.txt
@@ -55,7 +55,7 @@ endif()
# No need to install since we're combining this lib and the dependent libs into a combined lib
# install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/geometry DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/geometry DESTINATION include/filament)
set(COMBINED_DEPS
${TARGET}
diff --git a/libs/gltfio/CMakeLists.txt b/libs/gltfio/CMakeLists.txt
index c066cc229..a383410c0 100644
--- a/libs/gltfio/CMakeLists.txt
+++ b/libs/gltfio/CMakeLists.txt
@@ -257,5 +257,5 @@ endif()
# ==================================================================================================
install(TARGETS gltfio_core uberarchive ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/gltfio DESTINATION include)
-install(FILES ${RESOURCE_DIR}/materials/uberarchive.h DESTINATION include/gltfio/materials)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/gltfio DESTINATION include/filament)
+install(FILES ${RESOURCE_DIR}/materials/uberarchive.h DESTINATION include/filament/gltfio/materials)
diff --git a/libs/ibl/CMakeLists.txt b/libs/ibl/CMakeLists.txt
index aae32fbaa..3d8cbe16d 100644
--- a/libs/ibl/CMakeLists.txt
+++ b/libs/ibl/CMakeLists.txt
@@ -61,4 +61,4 @@ endif()
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
install(TARGETS ${TARGET}-lite ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/ibl DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/ibl DESTINATION include/filament)
diff --git a/libs/iblprefilter/CMakeLists.txt b/libs/iblprefilter/CMakeLists.txt
index c001de6bf..62066b302 100644
--- a/libs/iblprefilter/CMakeLists.txt
+++ b/libs/iblprefilter/CMakeLists.txt
@@ -135,4 +135,4 @@ target_link_libraries(${TARGET} PRIVATE
# ==================================================================================================
set(INSTALL_TYPE ARCHIVE)
install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/filament-iblprefilter DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/filament-iblprefilter DESTINATION include/filament)
diff --git a/libs/image/CMakeLists.txt b/libs/image/CMakeLists.txt
index 351d39548..3ac6ff402 100644
--- a/libs/image/CMakeLists.txt
+++ b/libs/image/CMakeLists.txt
@@ -48,7 +48,7 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/image DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/image DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/libs/imageio/CMakeLists.txt b/libs/imageio/CMakeLists.txt
index 69dc695c4..8711a78fa 100644
--- a/libs/imageio/CMakeLists.txt
+++ b/libs/imageio/CMakeLists.txt
@@ -49,4 +49,4 @@ endif ()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/imageio DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/imageio DESTINATION include/filament)
diff --git a/libs/ktxreader/CMakeLists.txt b/libs/ktxreader/CMakeLists.txt
index a9d5714e0..039ee6a3d 100644
--- a/libs/ktxreader/CMakeLists.txt
+++ b/libs/ktxreader/CMakeLists.txt
@@ -41,7 +41,7 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/${TARGET} DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/${TARGET} DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/libs/matdbg/CMakeLists.txt b/libs/matdbg/CMakeLists.txt
index e58058548..47b516c9e 100644
--- a/libs/matdbg/CMakeLists.txt
+++ b/libs/matdbg/CMakeLists.txt
@@ -122,4 +122,4 @@ 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(DIRECTORY ${PUBLIC_HDR_DIR}/matdbg DESTINATION include/filament)
diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt
index 838aa2d53..4256d6607 100644
--- a/libs/math/CMakeLists.txt
+++ b/libs/math/CMakeLists.txt
@@ -47,7 +47,7 @@ set_target_properties(${TARGET} PROPERTIES FOLDER Libs)
# ==================================================================================================
# Installation
# ==================================================================================================
-install(DIRECTORY ${PUBLIC_HDR_DIR}/math DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/math DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/libs/mathio/CMakeLists.txt b/libs/mathio/CMakeLists.txt
index 4ad5126fc..96b5287d2 100644
--- a/libs/mathio/CMakeLists.txt
+++ b/libs/mathio/CMakeLists.txt
@@ -27,5 +27,5 @@ target_link_libraries(${TARGET} PRIVATE math)
# ==================================================================================================
# Installation
# ==================================================================================================
-install(DIRECTORY ${PUBLIC_HDR_DIR}/mathio DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/mathio DESTINATION include/filament)
diff --git a/libs/uberz/CMakeLists.txt b/libs/uberz/CMakeLists.txt
index 47744e225..85569b534 100644
--- a/libs/uberz/CMakeLists.txt
+++ b/libs/uberz/CMakeLists.txt
@@ -44,4 +44,4 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/uberz DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/uberz DESTINATION include/filament)
diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt
index 72558167b..fe6289830 100644
--- a/libs/utils/CMakeLists.txt
+++ b/libs/utils/CMakeLists.txt
@@ -135,11 +135,11 @@ endif()
# ==================================================================================================
set(INSTALL_TYPE ARCHIVE)
install(TARGETS ${TARGET} ${INSTALL_TYPE} DESTINATION lib/${DIST_DIR})
-install(FILES ${DIST_HDRS} DESTINATION include/${TARGET})
+install(FILES ${DIST_HDRS} DESTINATION include/filament/${TARGET})
if (ANDROID)
- install(FILES ${DIST_ANDROID_HDRS} DESTINATION include/${TARGET_LINUX})
+ install(FILES ${DIST_ANDROID_HDRS} DESTINATION include/filament/${TARGET_LINUX})
else()
- install(FILES ${DIST_GENERIC_HDRS} DESTINATION include/${TARGET_GENERIC})
+ install(FILES ${DIST_GENERIC_HDRS} DESTINATION include/filament/${TARGET_GENERIC})
endif()
# ==================================================================================================
diff --git a/libs/viewer/CMakeLists.txt b/libs/viewer/CMakeLists.txt
index 58fe66c98..018e4086b 100644
--- a/libs/viewer/CMakeLists.txt
+++ b/libs/viewer/CMakeLists.txt
@@ -52,7 +52,7 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/viewer DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/viewer DESTINATION include/filament)
# ==================================================================================================
# Tests
diff --git a/third_party/libassimp/contrib/zip/CMakeLists.txt b/third_party/libassimp/contrib/zip/CMakeLists.txt
index b46dbb1db..368017ace 100644
--- a/third_party/libassimp/contrib/zip/CMakeLists.txt
+++ b/third_party/libassimp/contrib/zip/CMakeLists.txt
@@ -33,7 +33,7 @@ install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library)
-install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION include)
+install(FILES ${PROJECT_SOURCE_DIR}/src/zip.h DESTINATION include/filament)
# uninstall target (https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake)
if(NOT TARGET uninstall)
diff --git a/third_party/libpng/CMakeLists.txt b/third_party/libpng/CMakeLists.txt
index dbca05776..54c4a28de 100644
--- a/third_party/libpng/CMakeLists.txt
+++ b/third_party/libpng/CMakeLists.txt
@@ -992,9 +992,9 @@ endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
install(FILES ${libpng_public_hdrs}
- DESTINATION include)
+ DESTINATION include/filament)
install(FILES ${libpng_public_hdrs}
- DESTINATION include/${PNGLIB_NAME})
+ DESTINATION include/filament/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
if(NOT WIN32 OR CYGWIN OR MINGW)
diff --git a/third_party/libsdl2/CMakeLists.txt b/third_party/libsdl2/CMakeLists.txt
index 8f1e828d1..b1d7cbde5 100644
--- a/third_party/libsdl2/CMakeLists.txt
+++ b/third_party/libsdl2/CMakeLists.txt
@@ -1806,7 +1806,7 @@ foreach(_FNAME ${BIN_INCLUDE_FILES})
list(REMOVE_ITEM INCLUDE_FILES ${SDL2_SOURCE_DIR}/include/${_INCNAME})
endforeach()
list(APPEND INCLUDE_FILES ${BIN_INCLUDE_FILES})
-install(FILES ${INCLUDE_FILES} DESTINATION include/SDL2)
+install(FILES ${INCLUDE_FILES} DESTINATION include/filament/SDL2)
if(NOT (WINDOWS OR CYGWIN))
if(SDL_SHARED)
diff --git a/third_party/mikktspace/CMakeLists.txt b/third_party/mikktspace/CMakeLists.txt
index 36959aebf..6c8fead98 100644
--- a/third_party/mikktspace/CMakeLists.txt
+++ b/third_party/mikktspace/CMakeLists.txt
@@ -26,4 +26,4 @@ endif()
# Installation
# ==================================================================================================
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
-install(DIRECTORY ${PUBLIC_HDR_DIR}/mikktspace DESTINATION include)
+install(DIRECTORY ${PUBLIC_HDR_DIR}/mikktspace DESTINATION include/filament)
diff --git a/third_party/robin-map/tnt/CMakeLists.txt b/third_party/robin-map/tnt/CMakeLists.txt
index 300da5248..ef5ef82d6 100644
--- a/third_party/robin-map/tnt/CMakeLists.txt
+++ b/third_party/robin-map/tnt/CMakeLists.txt
@@ -27,4 +27,4 @@ set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
# ==================================================================================================
# Installation
# ==================================================================================================
-install(FILES ${PUBLIC_HDRS} DESTINATION include/${TARGET})
+install(FILES ${PUBLIC_HDRS} DESTINATION include/filament/${TARGET})
diff --git a/third_party/stb/tnt/CMakeLists.txt b/third_party/stb/tnt/CMakeLists.txt
index 563a2604d..946aa9264 100644
--- a/third_party/stb/tnt/CMakeLists.txt
+++ b/third_party/stb/tnt/CMakeLists.txt
@@ -15,4 +15,4 @@ target_include_directories(${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
install(TARGETS stb ARCHIVE DESTINATION lib/${DIST_DIR})
-install(FILES ${PUBLIC_HDRS} DESTINATION include)
+install(FILES ${PUBLIC_HDRS} DESTINATION include/filament)
diff --git a/third_party/tinyexr/tnt/CMakeLists.txt b/third_party/tinyexr/tnt/CMakeLists.txt
index ffe7cdfe1..6ae9c7787 100644
--- a/third_party/tinyexr/tnt/CMakeLists.txt
+++ b/third_party/tinyexr/tnt/CMakeLists.txt
@@ -22,5 +22,5 @@ target_include_directories (${TARGET} PUBLIC ${PUBLIC_HDR_DIR})
target_link_libraries(${TARGET} LINK_PUBLIC z)
set_target_properties(${TARGET} PROPERTIES FOLDER ThirdParty)
-install(FILES ${PUBLIC_HDRS} DESTINATION include)
+install(FILES ${PUBLIC_HDRS} DESTINATION include/filament)
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
--
2.45.1
@@ -0,0 +1,51 @@
From ce9796a1f7af7dde4fbf1659630aaa038d048f2c Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Wed, 12 Jun 2024 06:49:14 -0700
Subject: [PATCH 5/5] move libraries so they install
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 283778b32..9f0d7ca2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -725,6 +725,7 @@ add_subdirectory(${LIBRARIES}/gltfio)
add_subdirectory(${LIBRARIES}/ibl)
add_subdirectory(${LIBRARIES}/iblprefilter)
add_subdirectory(${LIBRARIES}/image)
+add_subdirectory(${LIBRARIES}/imageio)
add_subdirectory(${LIBRARIES}/ktxreader)
add_subdirectory(${LIBRARIES}/math)
add_subdirectory(${LIBRARIES}/mathio)
@@ -746,6 +747,9 @@ add_subdirectory(${EXTERNAL}/draco/tnt)
add_subdirectory(${EXTERNAL}/jsmn/tnt)
add_subdirectory(${EXTERNAL}/stb/tnt)
add_subdirectory(${EXTERNAL}/getopt)
+add_subdirectory(${EXTERNAL}/libpng/tnt)
+add_subdirectory(${EXTERNAL}/tinyexr/tnt)
+add_subdirectory(${EXTERNAL}/libz/tnt)
# Note that this has to be placed after mikktspace in order for combine_static_libs to work.
add_subdirectory(${LIBRARIES}/geometry)
@@ -785,15 +789,11 @@ if (IS_HOST_PLATFORM)
if (NOT FILAMENT_SKIP_SDL2)
add_subdirectory(${LIBRARIES}/filamentapp)
endif()
- add_subdirectory(${LIBRARIES}/imageio)
add_subdirectory(${FILAMENT}/samples)
add_subdirectory(${EXTERNAL}/libassimp/tnt)
- add_subdirectory(${EXTERNAL}/libpng/tnt)
add_subdirectory(${EXTERNAL}/libsdl2/tnt)
- add_subdirectory(${EXTERNAL}/libz/tnt)
- add_subdirectory(${EXTERNAL}/tinyexr/tnt)
add_subdirectory(${TOOLS}/cmgen)
add_subdirectory(${TOOLS}/cso-lut)
--
2.45.1
@@ -0,0 +1,26 @@
From 9823c889f42e6b8b8b7caf8647479856574b1b4c Mon Sep 17 00:00:00 2001
From: Joel Winarske <joel.winarske@gmail.com>
Date: Mon, 10 Jun 2024 13:25:27 -0700
Subject: [PATCH 7/7] return shader type mobile for linux vulkan
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
---
filament/backend/src/vulkan/VulkanDriver.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/filament/backend/src/vulkan/VulkanDriver.cpp b/filament/backend/src/vulkan/VulkanDriver.cpp
index 1cea2ca31..f69ef59d3 100644
--- a/filament/backend/src/vulkan/VulkanDriver.cpp
+++ b/filament/backend/src/vulkan/VulkanDriver.cpp
@@ -222,7 +222,7 @@ Driver* VulkanDriver::create(VulkanPlatform* platform, VulkanContext const& cont
}
ShaderModel VulkanDriver::getShaderModel() const noexcept {
-#if defined(__ANDROID__) || defined(IOS)
+#if defined(__ANDROID__) || defined(IOS) || defined(__linux__)
return ShaderModel::MOBILE;
#else
return ShaderModel::DESKTOP;
--
2.45.1
@@ -0,0 +1,115 @@
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
message(FATAL_ERROR "CMake >= 2.8.0 required")
endif()
if(CMAKE_VERSION VERSION_LESS "2.8.3")
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.8.3...3.25)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_cmake_targets_defined "")
set(_cmake_targets_not_defined "")
set(_cmake_expected_targets "")
foreach(_cmake_expected_target IN ITEMS matc cmgen filamesh mipgen resgen uberz glslminifier)
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
if(TARGET "${_cmake_expected_target}")
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
else()
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
endif()
endforeach()
unset(_cmake_expected_target)
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
unset(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT _cmake_targets_defined STREQUAL "")
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
endif()
unset(_cmake_targets_defined)
unset(_cmake_targets_not_defined)
unset(_cmake_expected_targets)
# Create imported target matc
add_executable(matc IMPORTED)
# Create imported target cmgen
add_executable(cmgen IMPORTED)
# Create imported target filamesh
add_executable(filamesh IMPORTED)
# Create imported target mipgen
add_executable(mipgen IMPORTED)
# Create imported target resgen
add_executable(resgen IMPORTED)
# Create imported target uberz
add_executable(uberz IMPORTED)
# Create imported target glslminifier
add_executable(glslminifier IMPORTED)
# Import target "matc" for configuration "Release"
set_property(TARGET matc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(matc PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/matc"
)
# Import target "cmgen" for configuration "Release"
set_property(TARGET cmgen APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(cmgen PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/cmgen"
)
# Import target "filamesh" for configuration "Release"
set_property(TARGET filamesh APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(filamesh PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/filamesh"
)
# Import target "mipgen" for configuration "Release"
set_property(TARGET mipgen APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(mipgen PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/mipgen"
)
# Import target "resgen" for configuration "Release"
set_property(TARGET resgen APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(resgen PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/resgen"
)
# Import target "uberz" for configuration "Release"
set_property(TARGET uberz APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(uberz PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/uberz"
)
# Import target "glslminifier" for configuration "Release"
set_property(TARGET glslminifier APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(glslminifier PROPERTIES
IMPORTED_LOCATION_RELEASE "${FILAMENT_HOST_TOOLS_ROOT}/glslminifier"
)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)