Skip to content

Commit

Permalink
link to pthreads on non-apple/non-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Mar 9, 2022
1 parent e889a69 commit 2357644
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ if(CMARK_SHARED OR CMARK_STATIC)

set(CMARK_TARGETS_FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)
export(TARGETS ${CMARK_INSTALL} FILE ${CMARK_TARGETS_FILE})

if(CMARK_THREADING AND NOT APPLE AND NOT MSVC)
if(CMARK_SHARED)
target_link_libraries(${LIBRARY} pthread)
endif(CMARK_SHARED)

if(CMARK_STATIC)
target_link_libraries(${STATICLIBRARY} pthread)
endif(CMARK_STATIC)
endif()
endif()

# Feature tests
Expand Down

0 comments on commit 2357644

Please sign in to comment.