1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Emscripten support.

Doesn't work due to i64 vs i32 type mismatch in glGetIntegerv, which
seems like some general compatibility bullshit, not something related
to CMake.
This commit is contained in:
Bartosz Taudul
2024-03-20 22:25:24 +01:00
parent 8ee866e840
commit 434d73c7bd
9 changed files with 23 additions and 61 deletions
+1 -1
View File
@@ -25,6 +25,6 @@ if(WIN32)
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN)
endif()
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT EMSCRIPTEN)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
endif()
+1 -1
View File
@@ -33,7 +33,7 @@ if(NO_STATISTICS)
target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS)
endif()
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
target_link_libraries(TracyServer PRIVATE TracyTbb)
endif()
+3 -7
View File
@@ -33,7 +33,7 @@ endif()
# GLFW
if(NOT USE_WAYLAND)
if(NOT USE_WAYLAND AND NOT EMSCRIPTEN)
pkg_check_modules(GLFW glfw3)
if (GLFW_FOUND AND NOT DOWNLOAD_GLFW)
add_library(TracyGlfw3 INTERFACE)
@@ -161,13 +161,9 @@ add_library(TracyImGui STATIC ${IMGUI_SOURCES})
target_include_directories(TracyImGui PUBLIC ${IMGUI_DIR})
target_link_libraries(TracyImGui PUBLIC TracyFreetype)
if (NOT USE_WAYLAND)
target_link_libraries(TracyImGui PUBLIC TracyGlfw3)
endif()
# NFD
if (NOT NO_FILESELECTOR)
if (NOT NO_FILESELECTOR AND NOT EMSCRIPTEN)
set(NFD_DIR "${ROOT_DIR}/nfd")
if (WIN32)
@@ -215,7 +211,7 @@ endif()
# TBB
if (UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
# Tracy does not use TBB directly, but the implementation of parallel algorithms
# in some versions of libstdc++ depends on TBB. When it does, you must
# explicitly link against -ltbb.