]> git.cworth.org Git - apitrace/blobdiff - CMakeLists.txt
cmake: Link ${LIBBACKTRACE_LIBRARIES} once.
[apitrace] / CMakeLists.txt
index b2de6bbc0844c16c6786c84bcc04781d24a8d406..4566db59ad487b920dc62d92b1cd9313b0c17681 100644 (file)
@@ -268,7 +268,7 @@ endif ()
 if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF")
     add_subdirectory (thirdparty/libbacktrace)
     include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libbacktrace)
-    set (LIBBACKTRACE_LIBRARIES backtrace)
+    set (LIBBACKTRACE_LIBRARIES dl backtrace)
 endif ()
 
 # Always use bundled QJSon.
@@ -339,6 +339,9 @@ set_target_properties (common PROPERTIES
     COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
 )
 
+target_link_libraries (common
+    ${LIBBACKTRACE_LIBRARIES}
+)
 if (ANDROID)
     target_link_libraries (common
         log