This commit splits out synchronization primitives from LibThreading into LibSync. This is because LibThreading depends on LibCore, while LibCore needs the synchronization primitives from LibThreading. This worked while they were header only, but when I tried to add an implementation file it ran into the circular dependency. To abstract away the pthread implementation using cpp files is necessary so the synchronization primitives were moved to a separate library.
13 lines
351 B
CMake
13 lines
351 B
CMake
set(SOURCES
|
|
BackgroundAction.cpp
|
|
Thread.cpp
|
|
ThreadPool.cpp
|
|
)
|
|
|
|
ladybird_lib(LibThreading threading)
|
|
target_link_libraries(LibThreading PRIVATE LibCore LibSync)
|
|
|
|
if (WIN32)
|
|
target_include_directories(LibThreading PUBLIC $<BUILD_INTERFACE:${PTHREAD_INCLUDE_DIR}>)
|
|
target_link_libraries(LibThreading PUBLIC ${PTHREAD_LIBRARY})
|
|
endif()
|