Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
Add shared library (#110)
Browse files Browse the repository at this point in the history
libtuv-DCO-1.0-Signed-off-by: Hosung Kim [email protected]
  • Loading branch information
hs0225 authored and yichoi committed May 31, 2018
1 parent 2eb8944 commit 1cd6395
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/libtuv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<TARGET_FILE:${TARGETLIBNAME}>
Expand Down

0 comments on commit 1cd6395

Please sign in to comment.