Skip to content

Commit

Permalink
Add libdeflate as a submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
mmp committed Aug 7, 2021
1 parent 4e62583 commit 6f685a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
path = src/ext/openvdb
url = https://github.com/AcademySoftwareFoundation/openvdb.git
branch = feature/nanovdb
[submodule "src/ext/libdeflate"]
path = src/ext/libdeflate
url = https://github.com/mmp/libdeflate.git
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ function (CHECK_EXT NAME DIR HASH)
endfunction ()

check_ext ("OpenEXR" "openexr/OpenEXR" 5cfb5dab6dfada731586b0281bdb15ee75e26782)
check_ext ("OpenVDB" "openvdb/nanovdb" 1c306bcaf7e9f7d52525bab716202bd4f7fff5d1)
check_ext ("Ptex" "ptex/src" 4cd8e9a6db2b06e478dfbbd8c26eb6df97f84483)
check_ext ("double-conversion" "double-conversion/cmake" cc1f75a114aca8d2af69f73a5a959aecbab0e87a)
check_ext ("filesystem" "filesystem/filesystem" f45da753728cde9b1c380b343e41c8b1ca6498d7)
check_ext ("libdeflate" "libdeflate/common" 1fd0bea6ca2073c68493632dafc4b1ddda1bcbc3)
check_ext ("stb" "stb/tools" b42009b3b9d4ca35bc703f5310eedc74f584be58)
check_ext ("OpenVDB" "openvdb/nanovdb" 1c306bcaf7e9f7d52525bab716202bd4f7fff5d1)
check_ext ("zlib" "zlib/doc" 54d591eabf9fe0e84c725638f8d5d8d202a093fa)

add_compile_definitions ("$<$<CONFIG:DEBUG>:PBRT_DEBUG_BUILD>")
Expand Down Expand Up @@ -821,6 +822,7 @@ target_include_directories (pbrt_lib PUBLIC
${STB_INCLUDE}
${OPENEXR_INCLUDE}
${ZLIB_INCLUDE_DIRS}
${LIBDEFLATE_INCLUDE_DIRS}
${FILESYSTEM_INCLUDE}
${PTEX_INCLUDE}
${DOUBLE_CONVERSION_INCLUDE}
Expand Down Expand Up @@ -848,6 +850,7 @@ set (ALL_PBRT_LIBS
${OPENEXR_LIBS}
Ptex_static
${ZLIB_LIBRARIES}
${LIBDEFLATE_LIBRARIES}
double-conversion
${PBRT_CUDA_LIB}
)
Expand Down
8 changes: 8 additions & 0 deletions src/ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ set (STB_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE)

set (FILESYSTEM_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/filesystem PARENT_SCOPE)

###########################################################################
# libdeflate

add_subdirectory (libdeflate)

set (LIBDEFLATE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libdeflate PARENT_SCOPE)
set (LIBDEFLATE_LIBRARIES deflate::deflate PARENT_SCOPE)

###########################################################################
# zlib

Expand Down
1 change: 1 addition & 0 deletions src/ext/libdeflate
Submodule libdeflate added at 1fd0be

0 comments on commit 6f685a2

Please sign in to comment.