@@ -148,9 +148,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
148148else ()
149149 target_compile_options (unwind_shared_objects PRIVATE -fno-rtti)
150150endif ()
151- target_link_libraries (unwind_shared_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
152151target_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} )
154155set_target_properties (unwind_shared_objects
155156 PROPERTIES
156157 CXX_EXTENSIONS OFF
@@ -164,7 +165,7 @@ endif()
164165
165166if (LIBUNWIND_ENABLE_SHARED)
166167 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 )
168169 set_target_properties (unwind_shared
169170 PROPERTIES
170171 LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
@@ -188,9 +189,10 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC)
188189else ()
189190 target_compile_options (unwind_static_objects PRIVATE -fno-rtti)
190191endif ()
191- target_link_libraries (unwind_static_objects PRIVATE unwind-headers ${LIBUNWIND_LIBRARIES} )
192192target_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} )
194196set_target_properties (unwind_static_objects
195197 PROPERTIES
196198 CXX_EXTENSIONS OFF
@@ -210,7 +212,7 @@ endif()
210212
211213if (LIBUNWIND_ENABLE_STATIC)
212214 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 )
214216 set_target_properties (unwind_static
215217 PROPERTIES
216218 LINK_FLAGS "${LIBUNWIND_LINK_FLAGS} "
0 commit comments