Allow system libktx for Linux client
This commit is contained in:
@@ -26,6 +26,7 @@ include(GNUInstallDirs)
|
||||
option(WIVRN_USE_SYSTEM_FREETYPE "Use system FreeType" ON)
|
||||
option(WIVRN_USE_SYSTEM_BOOST "Use system Boost headers" ON)
|
||||
option(WIVRN_USE_SYSTEM_OPENXR "Use system OpenXR headers" ON)
|
||||
option(WIVRN_USE_SYSTEM_LIBKTX "Use system KTX-Software library" ON)
|
||||
option(WIVRN_USE_SYSTEMD "Use libsystemd" ON)
|
||||
option(WIVRN_COMPRESS_GLB "Compress textures in GLB files with gltf-transform" OFF)
|
||||
option(WIVRN_USE_ANDROID_VALIDATION_LAYER "Download the android version of the Vulkan validation layer" OFF)
|
||||
@@ -206,6 +207,9 @@ if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
|
||||
find_package(OpenXR 1.1.48 REQUIRED)
|
||||
endif()
|
||||
|
||||
if (WIVRN_USE_SYSTEM_LIBKTX)
|
||||
find_package(Ktx REQUIRED)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
@@ -22,6 +22,7 @@ if(ANDROID AND WIVRN_USE_ANDROID_BIN_LIBKTX)
|
||||
add_library(ktx INTERFACE)
|
||||
target_link_libraries(ktx INTERFACE ${CMAKE_BINARY_DIR}/KTX-Software-${KTX_VERSION}-Android/${ANDROID_ABI}/lib/libktx.so)
|
||||
target_include_directories(ktx INTERFACE ${CMAKE_BINARY_DIR}/KTX-Software-${KTX_VERSION}-Android/${ANDROID_ABI}/include)
|
||||
elseif(WIVRN_USE_SYSTEM_LIBKTX AND NOT ANDROID)
|
||||
else()
|
||||
FetchContent_MakeAvailable(libktx)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user