Manually link to thread library. This allows libcreate to build on ARM.
This commit is contained in:
parent
1df7861f24
commit
b8002c0456
1 changed files with 10 additions and 0 deletions
|
@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
|
||||||
project(libcreate)
|
project(libcreate)
|
||||||
|
|
||||||
find_package(Boost REQUIRED system thread)
|
find_package(Boost REQUIRED system thread)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
## Specify additional locations of header files
|
## Specify additional locations of header files
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -16,6 +17,15 @@ add_library(create
|
||||||
src/packet.cpp
|
src/packet.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(THREADS_HAVE_PTHREAD_ARG)
|
||||||
|
set_property(TARGET create PROPERTY COMPILE_OPTIONS "-pthread")
|
||||||
|
set_property(TARGET create PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_THREAD_LIBS_INIT)
|
||||||
|
target_link_libraries(create "${CMAKE_THREAD_LIBS_INIT}")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(create
|
target_link_libraries(create
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue