Commit 02be5e7e authored by Ian Craggs's avatar Ian Craggs

Libs again 2!

parent aeaa1fea
...@@ -32,6 +32,18 @@ IF (PAHO_WITH_SSL) ...@@ -32,6 +32,18 @@ IF (PAHO_WITH_SSL)
) )
ENDIF () ENDIF ()
IF (WIN32)
SET(LIBS_SYSTEM ws2_32)
ELSEIF (UNIX)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(LIBS_SYSTEM c dl pthread)
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
SET(LIBS_SYSTEM compat pthread)
ELSE()
SET(LIBS_SYSTEM c pthread)
ENDIF()
ENDIF()
ADD_EXECUTABLE( ADD_EXECUTABLE(
thread thread
thread.c ../src/Thread.c thread.c ../src/Thread.c
...@@ -42,7 +54,10 @@ SET_TARGET_PROPERTIES( ...@@ -42,7 +54,10 @@ SET_TARGET_PROPERTIES(
COMPILE_DEFINITIONS "NOSTACKTRACE" COMPILE_DEFINITIONS "NOSTACKTRACE"
) )
TARGET_LINK_LIBRARIES(thread ${LIBS_SYSTEM}) TARGET_LINK_LIBRARIES(
thread
${LIBS_SYSTEM}
)
ADD_EXECUTABLE( ADD_EXECUTABLE(
test1 test1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment