Skip to content

Commit 9f6c6cb

Browse files
committed
Add static library export definition for Windows builds
1 parent 836cb0a commit 9f6c6cb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ set_target_properties(jres_solver_lib PROPERTIES OUTPUT_NAME "jres_solver")
166166

167167
if(WIN32)
168168
target_sources(jres_solver_lib PRIVATE ${VERSION_RC})
169-
# Only export symbols if we are actually building shared
169+
170170
if(BUILD_SHARED_LIBS)
171171
target_compile_definitions(jres_solver_lib PRIVATE JRES_SOLVER_EXPORTS)
172+
else()
173+
target_compile_definitions(jres_solver_lib PUBLIC JRES_STATIC)
172174
endif()
173175
endif()
174176

0 commit comments

Comments
 (0)