Skip to content

Commit d8c0d61

Browse files
committed
Fix DLL build on Windows
1 parent c682643 commit d8c0d61

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,14 @@ if(GRAPHQL_UPDATE_VERSION)
356356
update_version_rc(graphqlclient)
357357
endif()
358358

359+
if(WIN32 AND BUILD_SHARED_LIBS)
360+
target_compile_definitions(graphqlclient
361+
PUBLIC GRAPHQL_DLLEXPORTS
362+
PRIVATE IMPL_GRAPHQLCLIENT_DLL)
363+
364+
add_version_rc(graphqlclient)
365+
endif()
366+
359367
# RapidJSON is the only option for JSON serialization used in this project, but if you want
360368
# to use another JSON library you can implement an alternate version of the functions in
361369
# JSONResponse.cpp to serialize to and from GraphQLResponse and build graphqljson from that.

0 commit comments

Comments
 (0)