mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 13:02:33 +01:00
Move iqa sources to file
This commit is contained in:
25
cmake/bimg/3rdparty/iqa.cmake
vendored
Normal file
25
cmake/bimg/3rdparty/iqa.cmake
vendored
Normal 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 IQA_LIBRARIES)
|
||||
file(
|
||||
GLOB_RECURSE #
|
||||
IQA_SOURCES #
|
||||
${BIMG_DIR}/3rdparty/iqa/include/**.h #
|
||||
${BIMG_DIR}/3rdparty/iqa/source/**.c #
|
||||
)
|
||||
set(IQA_INCLUDE_DIR ${BIMG_DIR}/3rdparty/iqa/include)
|
||||
endif()
|
||||
@@ -12,6 +12,7 @@ include(3rdparty/loadpng.cmake)
|
||||
include(3rdparty/libsquish.cmake)
|
||||
include(3rdparty/astc_encoder.cmake)
|
||||
include(3rdparty/tinyexr.cmake)
|
||||
include(3rdparty/iqa.cmake)
|
||||
include(3rdparty/miniz.cmake)
|
||||
include(bimg.cmake)
|
||||
include(bimg_decode.cmake)
|
||||
|
||||
@@ -25,9 +25,9 @@ target_include_directories(
|
||||
PRIVATE ${BIMG_DIR}/3rdparty #
|
||||
${LIBSQUISH_INCLUDE_DIR} #
|
||||
${ASTC_ENCODER_INCLUDE_DIR}
|
||||
${BIMG_DIR}/3rdparty/iqa/include #
|
||||
${BIMG_DIR}/3rdparty/nvtt #
|
||||
${TINYEXR_INCLUDE_DIR} #
|
||||
${IQA_INCLUDE_DIR} #
|
||||
${MINIZ_INCLUDE_DIR} #
|
||||
)
|
||||
|
||||
@@ -49,8 +49,7 @@ file(
|
||||
${BIMG_DIR}/3rdparty/pvrtc/**.cpp #
|
||||
${BIMG_DIR}/3rdparty/pvrtc/**.h #
|
||||
${TINYEXR_SOURCES}
|
||||
${BIMG_DIR}/3rdparty/iqa/include/**.h #
|
||||
${BIMG_DIR}/3rdparty/iqa/source/**.c #
|
||||
${IQA_SOURCES} #
|
||||
)
|
||||
|
||||
target_sources(bimg_encode PRIVATE ${BIMG_ENCODE_SOURCES})
|
||||
@@ -61,6 +60,7 @@ target_link_libraries(
|
||||
${LIBSQUISH_LIBRARIES} #
|
||||
${ASTC_ENCODER_LIBRARIES} #
|
||||
${TINYEXR_LIBRARIES} #
|
||||
${IQA_LIBRARIES} #
|
||||
)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
Reference in New Issue
Block a user