Skip to content

Commit 2c25a74

Browse files
authored
Fix c-ares CARES_EXTERN for static builds (#315)
Co-authored-by: antores <antores@users.noreply.github.com>
1 parent e33dd7d commit 2c25a74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ if (BUILD_C-ARES)
228228
endif ()
229229

230230
if(HAVE_C-ARES)
231+
if (NOT BUILD_SHARED_LIBS)
232+
target_compile_definitions(${PROJECT_NAME} PRIVATE CARES_STATICLIB)
233+
endif ()
231234
target_link_libraries(${PROJECT_NAME} PRIVATE c-ares_lib)
232235
set(TRANTOR_SOURCES
233236
${TRANTOR_SOURCES}

0 commit comments

Comments
 (0)