Skip to content

Commit 766a0f0

Browse files
committed
Fix TIFF support
1 parent 465e0a1 commit 766a0f0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/apps/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ if( OJPH_ENABLE_TIFF_SUPPORT )
88
if( TIFF_FOUND )
99
set(USE_TIFF TRUE CACHE BOOL "Add TIFF support")
1010
add_definitions(-DOJPH_ENABLE_TIFF_SUPPORT)
11-
# include_directories(${TIFF_INCLUDE_DIRS})
1211
else()
1312
message(WARNING "TIFF support has been requested but no path to the TIFF library "
1413
"has been specified; please configure with -DCMAKE_PREFIX_PATH=<TIFF library directory>, "

src/apps/ojph_compress/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ if(EMSCRIPTEN)
2121
source_group("others" FILES ${OJPH_IMG_IO_SSE4})
2222
target_include_directories(ojph_compress_simd PRIVATE ../common)
2323
target_link_libraries(ojph_compress_simd PRIVATE openjphsimd)
24+
if (TIFF_FOUND)
25+
target_link_libraries(ojph_compress_simd PRIVATE openjphsimd TIFF::TIFF)
26+
else()
27+
target_link_libraries(ojph_compress_simd PRIVATE openjphsimd)
28+
endif()
2429
install(TARGETS ojph_compress_simd)
2530
else()
2631
if (NOT OJPH_DISABLE_SIMD)

src/apps/ojph_expand/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ if(EMSCRIPTEN)
2121
target_compile_options(ojph_expand_simd PRIVATE -DOJPH_ENABLE_WASM_SIMD -msimd128 -msse4.1)
2222
source_group("others" FILES ${OJPH_IMG_IO_SSE4})
2323
target_include_directories(ojph_expand_simd PRIVATE ../common)
24-
target_link_libraries(ojph_expand_simd PRIVATE openjphsimd)
24+
if (TIFF_FOUND)
25+
target_link_libraries(ojph_expand_simd PRIVATE openjphsimd TIFF::TIFF)
26+
else()
27+
target_link_libraries(ojph_expand_simd PRIVATE openjphsimd)
28+
endif()
2529
install(TARGETS ojph_expand_simd)
2630
else()
2731
if (NOT OJPH_DISABLE_SIMD)

0 commit comments

Comments
 (0)