diff --git a/CMakeLists.txt b/CMakeLists.txt index f089879..84019ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ if( BGFX_INSTALL ) INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) if( NOT BGFX_LIBRARY_TYPE MATCHES "SHARED" ) - install( TARGETS bimg bx astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc + install( TARGETS bimg bx astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr EXPORT "${TARGETS_EXPORT_NAME}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/cmake/3rdparty/tinyexr.cmake b/cmake/3rdparty/tinyexr.cmake new file mode 100644 index 0000000..9f72523 --- /dev/null +++ b/cmake/3rdparty/tinyexr.cmake @@ -0,0 +1,9 @@ +if( TARGET tinyexr ) + return() +endif() + +file( GLOB_RECURSE TINYEXR_SOURCES ${BIMG_DIR}/3rdparty/tinyexr/*.c ${BIMG_DIR}/3rdparty/tinyexr/*.h ) + +add_library( tinyexr STATIC ${TINYEXR_SOURCES} ) +target_include_directories( tinyexr PUBLIC $ $ ) +set_target_properties( tinyexr PROPERTIES FOLDER "bgfx/3rdparty" ) \ No newline at end of file diff --git a/cmake/bimg.cmake b/cmake/bimg.cmake index f403771..4c3401f 100644 --- a/cmake/bimg.cmake +++ b/cmake/bimg.cmake @@ -18,6 +18,7 @@ include( cmake/3rdparty/iqa.cmake ) include( cmake/3rdparty/libsquish.cmake ) include( cmake/3rdparty/nvtt.cmake ) include( cmake/3rdparty/pvrtc.cmake ) +include( cmake/3rdparty/tinyexr.cmake ) # Ensure the directory exists if( NOT IS_DIRECTORY ${BIMG_DIR} ) @@ -38,7 +39,7 @@ target_include_directories( bimg $) # bimg dependencies -target_link_libraries( bimg PUBLIC bx PRIVATE astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc ) +target_link_libraries( bimg PUBLIC bx PRIVATE astc-codec astc edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr ) # Put in a "bgfx" folder in Visual Studio set_target_properties( bimg PROPERTIES FOLDER "bgfx" ) \ No newline at end of file