Commit 7e057311 authored by jehan's avatar jehan

add link dependency en libpthread

parent c4416060
......@@ -134,6 +134,8 @@ if(ENABLE_TESTS AND CUNIT_FOUND)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bctoolbox-tester.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
find_package(Threads REQUIRED)
include_directories(
include
src
......
......@@ -39,6 +39,7 @@ endif()
if(ENABLE_STATIC)
add_library(bctoolbox-static STATIC ${BCTOOLBOX_SOURCE_FILES})
target_link_libraries(bctoolbox-static ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(bctoolbox-static PROPERTIES OUTPUT_NAME bctoolbox)
if(CUNIT_FOUND)
add_library(bctoolbox-tester-static STATIC ${BCTOOLBOX_TESTER_SOURCE_FILES})
......@@ -47,6 +48,7 @@ if(ENABLE_STATIC)
endif()
if(ENABLE_SHARED)
add_library(bctoolbox SHARED ${BCTOOLBOX_SOURCE_FILES})
target_link_libraries(bctoolbox ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(bctoolbox PROPERTIES LINKER_LANGUAGE "CXX")
if(ANDROID)
set_target_properties(bctoolbox PROPERTIES OUTPUT_NAME "bctoolbox-${CMAKE_SYSTEM_PROCESSOR}")
......
......@@ -42,7 +42,7 @@ static void log_handler(int lev, const char *fmt, va_list args) {
void bctoolbox_tester_init(void(*ftester_printf)(int level, const char *fmt, va_list args)) {
bc_tester_init(log_handler,BCTOOLBOX_ERROR, NULL,NULL);
bc_tester_init(log_handler,BCTOOLBOX_ERROR, 0,NULL);
bc_tester_add_suite(&containers_test_suite);
}
......
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