Skip to content

Commit

Permalink
Merge pull request google#11 from ittiam-systems/cmake-pthread
Browse files Browse the repository at this point in the history
cmake: Add pthread dependendency
  • Loading branch information
DichenZhang1 authored Oct 3, 2023
2 parents 17f81fb + 843083c commit 66cc9e8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ set(CMAKE_CXX_STANDARD 17)

include(ExternalProject)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

# Check the target architecture and set compiler flags accordingly
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
# 64-bit architecture
Expand Down Expand Up @@ -89,6 +92,7 @@ target_include_directories(ultrahdr PRIVATE
target_link_libraries(ultrahdr PRIVATE
${SRC_DIR}/third_party/build/libjpeg-turbo/src/libjpeg-turbo-build/libjpeg.a
image_io
Threads::Threads
)

libultrahdr_add_executable(ultrahdr_unit_test
Expand Down

0 comments on commit 66cc9e8

Please sign in to comment.