Skip to content

Commit d88b5ee

Browse files
committed
try to fix windows export
1 parent 2cb3dc9 commit d88b5ee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmake_modules/BuildUtils.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,10 @@ function(add_iceberg_lib LIB_NAME)
215215
string(TOUPPER ${LIB_NAME} LIB_NAME_UPPER)
216216
if(BUILD_SHARED)
217217
generate_export_header(${LIB_NAME}_shared BASE_NAME ${LIB_NAME_UPPER})
218+
target_compile_definitions(${LIB_NAME}_shared PRIVATE ${LIB_NAME}_EXPORTS)
218219
if(BUILD_STATIC)
219-
set_target_properties(${LIB_NAME}_static
220-
PROPERTIES COMPILE_FLAGS -D${LIB_NAME_UPPER}_STATIC_DEFINE)
220+
target_compile_definitions(${LIB_NAME}_static
221+
PRIVATE ${LIB_NAME_UPPER}_STATIC_DEFINE)
221222
endif()
222223
elseif(BUILD_STATIC)
223224
generate_export_header(${LIB_NAME}_static BASE_NAME ${LIB_NAME_UPPER})

0 commit comments

Comments
 (0)