Explicitly add thread linking

This commit is contained in:
Jason Rhinelander 2020-03-13 15:27:29 -03:00
parent 1f99a70f48
commit 4f4862fd0b
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ install(
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq
) )
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(lokimq PRIVATE Threads::Threads)
# We require cppzmq >= 4.3, and versions before 4.3.2 have some security issues, so try to find # We require cppzmq >= 4.3, and versions before 4.3.2 have some security issues, so try to find
# >=4.3.2 on the system and, if we don't (or found an old one) build a bundled one. # >=4.3.2 on the system and, if we don't (or found an old one) build a bundled one.
include(FindPkgConfig) include(FindPkgConfig)