From 1cd6395c5ff51577499c4b1e466c24d41632ddf3 Mon Sep 17 00:00:00 2001 From: HoSung Kim Date: Thu, 31 May 2018 18:30:33 +0900 Subject: [PATCH] Add shared library (#110) libtuv-DCO-1.0-Signed-off-by: Hosung Kim hs852.kim@samsung.com --- cmake/libtuv.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmake/libtuv.cmake b/cmake/libtuv.cmake index 211cb01c..435b7a4c 100644 --- a/cmake/libtuv.cmake +++ b/cmake/libtuv.cmake @@ -58,6 +58,16 @@ set_target_properties(${TARGETLIBNAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${LIB_OUT}" RUNTIME_OUTPUT_DIRECTORY "${BIN_OUT}") +# build tuv shared library +set(TARGETSHAREDLIBNAME tuv_shared) +add_library(${TARGETSHAREDLIBNAME} SHARED ${LIB_TUV_SRCFILES}) +target_include_directories(${TARGETSHAREDLIBNAME} SYSTEM PRIVATE ${TARGET_INC}) +target_include_directories(${TARGETSHAREDLIBNAME} PUBLIC ${LIB_TUV_INCDIRS}) +set_target_properties(${TARGETSHAREDLIBNAME} PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "${LIB_OUT}" + COMPILE_FLAGS -fPIC + OUTPUT_NAME tuv) + if(DEFINED COPY_TARGET_LIB) add_custom_command(TARGET ${TARGETLIBNAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $