Skip to content

Commit

Permalink
Merge pull request google#32 from ittiam-systems/cmakefix
Browse files Browse the repository at this point in the history
CMakeLists.txt: Add missing add_dependencies
  • Loading branch information
DichenZhang1 authored Oct 26, 2023
2 parents f553325 + 21560da commit 65b7567
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ add_library(ultrahdr STATIC
"${SRC_DIR}/jpegdecoderhelper.cpp"
"${SRC_DIR}/multipictureformat.cpp"
)
add_dependencies(ultrahdr libjpeg-turbo)

target_include_directories(ultrahdr PRIVATE
${JPEG_INCLUDE_DIRS}
Expand All @@ -145,6 +146,7 @@ libultrahdr_add_executable(ultrahdr_app
${JPEG_INCLUDE_DIRS}
"${SRC_DIR}/include"
)
add_dependencies(ultrahdr_app libjpeg-turbo)

if (${ENABLE_FUZZERS})
libultrahdr_add_fuzzer(ultrahdr_enc_fuzzer ultrahdr
Expand All @@ -154,6 +156,7 @@ if (${ENABLE_FUZZERS})
${JPEG_INCLUDE_DIRS}
"${SRC_DIR}/include"
)
add_dependencies(ultrahdr_enc_fuzzer libjpeg-turbo)

libultrahdr_add_fuzzer(ultrahdr_dec_fuzzer ultrahdr
SOURCES
Expand All @@ -162,6 +165,7 @@ if (${ENABLE_FUZZERS})
${JPEG_INCLUDE_DIRS}
"${SRC_DIR}/include"
)
add_dependencies(ultrahdr_dec_fuzzer libjpeg-turbo)
endif()

if(${ENABLE_TESTS})
Expand All @@ -179,6 +183,11 @@ if(${ENABLE_TESTS})
${GTEST_INCLUDE_DIRS}
"${SRC_DIR}/include"
)
if(GTest_FOUND)
add_dependencies(ultrahdr_unit_test libjpeg-turbo)
else()
add_dependencies(ultrahdr_unit_test googletest libjpeg-turbo)
endif()

target_link_libraries(ultrahdr_unit_test ${GTEST_BOTH_LIBRARIES})

Expand Down

0 comments on commit 65b7567

Please sign in to comment.