From 80284f3544a9ebb2a47b49691213be77929a0727 Mon Sep 17 00:00:00 2001 From: Denis Levesque <110566772+denislevesqueAMD@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:13:09 -0400 Subject: [PATCH] Fix GitHub Action Error and Add New Option for Building SDK (#259) * Update to version 4.4 * Update GitHub workflow file * Fix GitHub workflow issue * Fix Compressonator Framework build * Fix Compressonator Framework build * Add new option to build only the SDK --- .github/workflows/cmake.yml | 10 +++++----- CMakeLists.txt | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index d0458be88..88663a3ea 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -121,11 +121,11 @@ jobs: - name: Copy files into build results directory shell: bash run: | - cp build/bin/Release*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/ - cp build/bin/Release*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/ - cp build/bin/Debug*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/ - cp build/bin/Debug*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/ - cp build/bin/Release/x64/Plugins/Compute/{*.h,*.hlsl,*.cpp} CompressonatorFramework_result/lib/encoders/ + cp build/Release*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/ + cp build/Release*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/ + cp build/Debug*/x64/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x64/ + cp build/Debug*/Win32/{*.lib,*.dll} CompressonatorFramework_result/lib/VS2019/x86/ + cp build/Release/x64/Plugins/Compute/{*.h,*.hlsl,*.cpp} CompressonatorFramework_result/lib/encoders/ cp cmp_compressonatorlib/compressonator.h CompressonatorFramework_result/include/ # Will probably want to collect the files into a better structure before running this command diff --git a/CMakeLists.txt b/CMakeLists.txt index 47bfaa3aa..ea54fe80a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,16 +73,18 @@ option(OPTION_ENABLE_ALL_APPS "Enable all apps" ON) if (OPTION_ENABLE_ALL_APPS) set(OPTION_BUILD_APPS_CMP_CLI "Build Application: compressonatorcli" ON) set(OPTION_BUILD_APPS_CMP_GUI "Build Application: compressonator gui" ON) + set(OPTION_BUILD_CMP_SDK "Build Compressonator SDK" ON) set(OPTION_BUILD_APPS_CMP_UNITTESTS "Build Application: cmp_unittests" ON) set(OPTION_BUILD_APPS_CMP_EXAMPLES "Build Application: examples" ON) else() option(OPTION_BUILD_APPS_CMP_CLI OFF) option(OPTION_BUILD_APPS_CMP_GUI OFF) + option(OPTION_BUILD_CMP_SDK OFF) option(OPTION_BUILD_APPS_CMP_UNITTESTS OFF) option(OPTION_BUILD_APPS_CMP_EXAMPLES OFF) endif() -# Minimum Lib Dependencies for CLI and GUI (GUI has addtion lib requirements condition later in this cmake) +# Minimum Lib Dependencies for CLI, GUI, and SDK (GUI has additional lib requirements added later in this cmake) if (OPTION_BUILD_APPS_CMP_CLI OR OPTION_BUILD_APPS_CMP_GUI) set(LIB_BUILD_COMPRESSONATOR_SDK ON) set(LIB_BUILD_FRAMEWORK_SDK ON) @@ -91,6 +93,14 @@ if (OPTION_BUILD_APPS_CMP_CLI OR OPTION_BUILD_APPS_CMP_GUI) set(LIB_BUILD_COMMON ON) set(LIB_BUILD_CORE ON) set(LIB_BUILD_GPUDECODE ON) +elseif(OPTION_BUILD_CMP_SDK) + set(LIB_BUILD_COMPRESSONATOR_SDK ON) + set(LIB_BUILD_FRAMEWORK_SDK ON) + set(LIB_BUILD_IMAGEIO ON) + set(LIB_BUILD_ANALYSIS OFF) + set(LIB_BUILD_COMMON ON) + set(LIB_BUILD_CORE ON) + set(LIB_BUILD_GPUDECODE ON) endif() if (OPTION_BUILD_APPS_CMP_VISION) @@ -116,9 +126,9 @@ cmp_option(OPTION_BUILD_EXR "Build CLI EXR Support" CMP_HOST_WINDOWS OR CMP_ cmp_option(OPTION_BUILD_GUI "Build the GUI Application" CMP_HOST_WINDOWS OR OPTION_BUILD_APPS_CMP_GUI) cmp_option(OPTION_CMP_DIRECTX "Use Directx" CMP_HOST_WINDOWS) # set for windows only cmp_option(OPTION_CMP_VULKAN "Use Vulkan" OPTION_ENABLE_ALL_APPS) -cmp_option(OPTION_CMP_OPENGL "Use OpenGL" ON) # available on all platforms +cmp_option(OPTION_CMP_OPENGL "Use OpenGL" OPTION_BUILD_APPS_CMP_CLI OR OPTION_BUILD_APPS_CMP_GUI) cmp_option(OPTION_CMP_QT "Use Qt for Image Loading" OPTION_ENABLE_ALL_APPS OR OPTION_BUILD_APPS_CMP_GUI) -cmp_option(OPTION_CMP_OPENCV "Use OpenCV" ON) # available on all platforms +cmp_option(OPTION_CMP_OPENCV "Use OpenCV" OPTION_BUILD_APPS_CMP_CLI OR OPTION_BUILD_APPS_CMP_GUI) cmp_option(OPTION_CMP_GTC "Use GTC Codec" OFF) # Internal R&D cmp_option(OPTION_BUILD_BROTLIG "Use Brotli-G Codec for Commandline" CMP_HOST_WINDOWS) # BrotliG Compression & Decompression support cmp_option(OPTION_BUILD_BROTLIG_GUI "Use Brotli-G Codec for GUI" OFF) # BrotliG Compression & Decompression support on GUI (In development for v4.4) @@ -283,7 +293,7 @@ else() endif() endif() - if (UNIX) + if (UNIX AND (OPTION_BUILD_EXR OR OPTION_BUILD_DRACO OR OPTION_CMP_OPENCV)) find_package(PkgConfig REQUIRED) if (OPTION_BUILD_EXR)