Skip to content

Commit

Permalink
build: fix shared lib mode only (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 8, 2024
1 parent 0e8312a commit b2f93f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ endif()

if (CIO_LIB_SHARED)
add_library(chunkio-shared SHARED ${src})
target_link_libraries(chunkio-static ${libs})
target_link_libraries(chunkio-shared ${libs})
if(CIO_SANITIZE_ADDRESS)
add_sanitizers(chunkio-shared)
endif()
Expand Down
7 changes: 6 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ set(src
cio.c)

add_executable(cio ${src})
target_link_libraries(cio chunkio-static)

if (CIO_LIB_SHARED)
target_link_libraries(cio chunkio-shared)
elseif (CIO_LIB_STATIC)
target_link_libraries(cio chunkio-static)
endif()

0 comments on commit b2f93f0

Please sign in to comment.