Skip to content

Commit

Permalink
Fix GitHub Action Error and Add New Option for Building SDK (#259)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
denislevesqueAMD committed Jul 10, 2023
1 parent e9b1b99 commit 80284f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 80284f3

Please sign in to comment.