GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

-DOPTION_BUILD_KTX2=OFF has no effect

bekorn opened this issue · comments

commented

OPTION_BUILD_KTX2 has no effect because it is overwritten by this section that only depends on CMake version(?).

if(${CMAKE_VERSION} VERSION_GREATER "3.14.0")
cmp_option(OPTION_BUILD_KTX2 "Build CLI KTX2 Support" ON)
else()
cmp_option(OPTION_BUILD_KTX2 "Build CLI KTX2 Support" OFF)
endif()

Maybe it can be replaced with this?

if(OPTION_BUILD_KTX2 AND ${CMAKE_VERSION} VERSION_LESS_EQUAL "3.14.0")
    message(WARNING "Turning off KTX2 because current CMake version is not supported")
    cmp_option(OPTION_BUILD_KTX2 "Build CLI KTX2 Support" OFF)
endif()

Though even with this change, there are several other points where KTX2 is included without checking the OPTION_BUILD_KTX2. Is it okay if I create a patch that makes KTX2 actually optional? If yes, should I enable/disable KTX and KTX2 together?

@bekorn Yes, let's make both enable/disable KTX and KTX2 together.

commented

Hi again. I think I've made the CMake -D arguments have an effect on the build (none were effective as I understand). You can check it here master...bekorn:compressonator:improving_CMakeLists

However, I can't be sure if everything works, because I can't build the project because of all the dependencies that I don't have on my machine :/ Are there automated tests for this? Or can you test it? I can make a PR if that would be easier.