Move pvrtc to file

This commit is contained in:
Sandy Carter
2023-01-14 07:51:42 -05:00
committed by Sandy
parent edb0b19c6f
commit e2c9bd0254
3 changed files with 29 additions and 2 deletions

25
cmake/bimg/3rdparty/pvrtc.cmake vendored Normal file
View File

@@ -0,0 +1,25 @@
# bgfx.cmake - bgfx building in cmake
# Written in 2017 by Joshua Brookover <joshua.al.brookover@gmail.com>
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication along with
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# Ensure the directory exists
if(NOT IS_DIRECTORY ${BIMG_DIR})
message(SEND_ERROR "Could not load bimg, directory does not exist. ${BIMG_DIR}")
return()
endif()
if(NOT PVRTC_LIBRARIES)
file(
GLOB_RECURSE #
PVRTC_SOURCES #
${BIMG_DIR}/3rdparty/pvrtc/**.cpp #
${BIMG_DIR}/3rdparty/pvrtc/**.h #
)
set(PVRTC_INCLUDE_DIR ${BIMG_DIR}/3rdparty)
endif()

View File

@@ -11,6 +11,7 @@
include(3rdparty/loadpng.cmake)
include(3rdparty/libsquish.cmake)
include(3rdparty/astc_encoder.cmake)
include(3rdparty/pvrtc.cmake)
include(3rdparty/tinyexr.cmake)
include(3rdparty/iqa.cmake)
include(3rdparty/miniz.cmake)

View File

@@ -26,6 +26,7 @@ target_include_directories(
${LIBSQUISH_INCLUDE_DIR} #
${ASTC_ENCODER_INCLUDE_DIR}
${BIMG_DIR}/3rdparty/nvtt #
${PVRTC_INCLUDE_DIR}
${TINYEXR_INCLUDE_DIR} #
${IQA_INCLUDE_DIR} #
${MINIZ_INCLUDE_DIR} #
@@ -46,8 +47,7 @@ file(
${BIMG_DIR}/3rdparty/etc2/**.hpp #
${BIMG_DIR}/3rdparty/nvtt/**.cpp #
${BIMG_DIR}/3rdparty/nvtt/**.h #
${BIMG_DIR}/3rdparty/pvrtc/**.cpp #
${BIMG_DIR}/3rdparty/pvrtc/**.h #
${PVRTC_SOURCES} #
${TINYEXR_SOURCES}
${IQA_SOURCES} #
)
@@ -59,6 +59,7 @@ target_link_libraries(
PUBLIC bx #
${LIBSQUISH_LIBRARIES} #
${ASTC_ENCODER_LIBRARIES} #
${PVRTC_LIBRARIES} #
${TINYEXR_LIBRARIES} #
${IQA_LIBRARIES} #
)