Commit | Line | Data |
---|---|---|
298654c8 FF |
1 | diff -u -r ../mosquitto-1.4.10/lib/CMakeLists.txt ./lib/CMakeLists.txt |
2 | --- ../mosquitto-1.4.10/lib/CMakeLists.txt 2016-08-17 13:05:14.000000000 +0200 | |
3 | +++ ./lib/CMakeLists.txt 2017-01-15 21:09:21.548573341 +0100 | |
4 | @@ -7,7 +7,12 @@ | |
5 | set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) | |
6 | set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) | |
7 | else (WIN32) | |
8 | - set (PTHREAD_LIBRARIES pthread) | |
9 | + find_library(LIBPTHREAD pthread) | |
10 | + if (LIBPTHREAD) | |
11 | + set (PTHREAD_LIBRARIES pthread) | |
12 | + else (LIBPTHREAD) | |
13 | + set (PTHREAD_LIBRARIES "") | |
14 | + endif() | |
15 | set (PTHREAD_INCLUDE_DIR "") | |
16 | endif (WIN32) | |
17 | else (${WITH_THREADING} STREQUAL ON) | |
18 | @@ -44,7 +49,10 @@ | |
19 | set (LIBRARIES ${OPENSSL_LIBRARIES} ${PTHREAD_LIBRARIES}) | |
20 | ||
21 | if (UNIX AND NOT APPLE) | |
22 | - set (LIBRARIES ${LIBRARIES} rt) | |
23 | + find_library(LIBRT rt) | |
24 | + if (LIBRT) | |
25 | + set (LIBRARIES ${LIBRARIES} rt) | |
26 | + endif (LIBRT) | |
27 | endif (UNIX AND NOT APPLE) | |
28 | ||
29 | if (WIN32) |