# Copyright 2017-2020 The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 add_executable( transcodetests transcodetests.cc ) target_include_directories( transcodetests PRIVATE $ $ ${CMAKE_CURRENT_SOURCE_DIR}/../../other_include ${CMAKE_CURRENT_SOURCE_DIR}/../../lib ) target_link_libraries( transcodetests gtest ktx obj_basisu_cbind ${CMAKE_THREAD_LIBS_INIT} ) target_compile_definitions( transcodetests PRIVATE $ $ ) target_compile_features(transcodetests PUBLIC cxx_std_11) gtest_discover_tests( transcodetests TEST_PREFIX transcodetest EXTRA_ARGS "${PROJECT_SOURCE_DIR}/tests/testimages/" ) if(WIN32) # The Windows ktx.dll seem to not include needed symbols from basisu_transcoder.cpp # This is a workaround to get it linking add_library(obj_tmp_basisu OBJECT ${PROJECT_SOURCE_DIR}/lib/basisu/transcoder/basisu_transcoder.cpp ${PROJECT_SOURCE_DIR}/lib/basisu/zstd/zstd.c ) target_compile_definitions( obj_tmp_basisu PUBLIC # only for basisu_c_binding. BASISU_NO_ITERATOR_DEBUG_LEVEL ) target_link_libraries(transcodetests obj_tmp_basisu) endif()