Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back in a link to Threads::Threads #245

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/anariConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

include(CMakeFindDependencyMacro)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_dependency(Threads)

if (@VIEWER_ENABLE_GLTF@)
find_dependency(draco)
find_dependency(WebP)
Expand Down
6 changes: 5 additions & 1 deletion src/anari/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
option(ANARI_FRONTEND_CATCH_EXCEPTIONS "Have libanari catch all exceptions" ON)
mark_as_advanced(ANARI_FRONTEND_CATCH_EXCEPTIONS)

# Some platforms simply don't function without linking against Threads::Threads
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

macro(add_anari_frontend_library_target LIB_TYPE)
project_add_library(${LIB_TYPE}
anari_cpp_linalg_defs.cpp
Expand Down Expand Up @@ -31,7 +35,7 @@ macro(add_anari_frontend_library_target LIB_TYPE)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

project_link_libraries(PUBLIC ${CMAKE_DL_LIBS})
project_link_libraries(PUBLIC Threads::Threads ${CMAKE_DL_LIBS})

set_target_properties(${PROJECT_NAME}
PROPERTIES
Expand Down
Loading