@@ -148,9 +148,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
148
148
else ()
149
149
target_compile_options (unwind_shared_objects PRIVATE -fno-rtti)
150
150
endif ()
151
- target_link_libraries (unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
152
151
target_compile_options (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
153
- target_link_libraries (unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
152
+ target_link_libraries (unwind_shared_objects
153
+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
154
+ PRIVATE unwind-headers libunwind-libc-headers ${LIBUNWIND_LIBRARIES} )
154
155
set_target_properties (unwind_shared_objects
155
156
PROPERTIES
156
157
CXX_EXTENSIONS OFF
@@ -164,7 +165,7 @@ endif()
164
165
165
166
if (LIBUNWIND_ENABLE_SHARED)
166
167
add_library (unwind_shared SHARED)
167
- target_link_libraries (unwind_shared PUBLIC unwind_shared_objects)
168
+ target_link_libraries (unwind_shared PUBLIC unwind_shared_objects libunwind-libc-shared )
168
169
set_target_properties (unwind_shared
169
170
PROPERTIES
170
171
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
@@ -188,9 +189,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
188
189
else ()
189
190
target_compile_options (unwind_static_objects PRIVATE -fno-rtti)
190
191
endif ()
191
- target_link_libraries (unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
192
192
target_compile_options (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_COMPILE_FLAGS} " )
193
- target_link_libraries (unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} " )
193
+ target_link_libraries (unwind_static_objects
194
+ PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRARIES} "
195
+ PRIVATE unwind-headers libunwind-libc-headers ${LIBUNWIND_LIBRARIES} )
194
196
set_target_properties (unwind_static_objects
195
197
PROPERTIES
196
198
CXX_EXTENSIONS OFF
@@ -210,7 +212,7 @@ endif()
210
212
211
213
if (LIBUNWIND_ENABLE_STATIC)
212
214
add_library (unwind_static STATIC )
213
- target_link_libraries (unwind_static PUBLIC unwind_static_objects)
215
+ target_link_libraries (unwind_static PUBLIC unwind_static_objects libunwind-libc- static )
214
216
set_target_properties (unwind_static
215
217
PROPERTIES
216
218
LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
0 commit comments