From 45bd17b7e8cdc7d550c435de4a29b5ba76bc9893 Mon Sep 17 00:00:00 2001 From: Honeybunch Date: Tue, 3 May 2022 18:31:49 -0700 Subject: Slight tweak to get client library working with mingw --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 15991852..c9019d8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,11 @@ target_link_libraries( ${CMAKE_DL_LIBS} ) +# Public dependency on some libraries required when using Mingw +if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + target_link_libraries(TracyClient PUBLIC ws2_32 dbghelp) +endif() + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") find_library(EXECINFO_LIBRARY NAMES execinfo REQUIRED) target_link_libraries(TracyClient PUBLIC ${EXECINFO_LIBRARY}) @@ -123,6 +128,6 @@ install(FILES ${client_includes} install(FILES ${common_includes} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/common) install(EXPORT TracyConfig - NAMESPACE Tracy:: + NAMESPACE Tracy:: FILE TracyConfig.cmake DESTINATION share/Tracy) -- cgit v1.2.3