From 1e5f11599dd15e8040447fea027ef0ae87951755 Mon Sep 17 00:00:00 2001 From: kakwa Date: Fri, 21 Apr 2017 02:25:03 +0200 Subject: [PATCH] linking libpthread is necessary everywhere if bundling civetweb --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bbf377..9c1ac0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,21 +63,20 @@ else() endif() endif() + IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(SED_FREEBSD "*.c.bak") find_package(argp REQUIRED) add_definitions(-DBSD) - set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread -lrt") + set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lrt") ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") IF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") find_package(argp REQUIRED) add_definitions(-DBSD) - set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread") ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") - if(BUNDLE_CIVETWEB) ExternalProject_Add( civetweb GIT_REPOSITORY https://github.com/kakwa/civetweb @@ -99,6 +98,7 @@ if(BUNDLE_CIVETWEB) ) set(LIBCIVETWEB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vendor/usr/include") set(LIBCIVETWEB_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/vendor/usr/lib/libcivetweb.a") + set (CMAKE_C_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -lpthread") else(BUNDLE_CIVETWEB) find_package(libcivetweb REQUIRED) endif(BUNDLE_CIVETWEB)