mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
freetype with CPM
This commit is contained in:
parent
1a3985ec93
commit
c8a87b01aa
7
.github/workflows/linux.yml
vendored
7
.github/workflows/linux.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
||||
continue-on-error: true # Allow other platforms to build even if one fails
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Linux Dependencies
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
@ -31,7 +31,8 @@ jobs:
|
||||
|
||||
- name: Install Windows Dependencies
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: ./vcpkg/install_vcpkg_dependencies.bat
|
||||
# run: ./vcpkg/install_vcpkg_dependencies.bat
|
||||
run: echo "Windows dependencies"
|
||||
|
||||
- name: Install MacOS Dependencies
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
@ -39,7 +40,7 @@ jobs:
|
||||
|
||||
- name: Build Profiler
|
||||
run: |
|
||||
cmake -B build/profiler -S profiler -DLEGACY=ON
|
||||
cmake -B build/profiler -S profiler -DLEGACY=ON -DTRACY_DOWNLOAD_FREETYPE=ON
|
||||
cmake --build build/profiler --config Release --parallel
|
||||
|
||||
- name: Build Update
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
set (ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../")
|
||||
|
||||
if (EXISTS ${ROOT_DIR}/vcpkg_installed/x64-windows-static/lib/pkgconfig)
|
||||
message(STATUS "Using vcpkg_installed/x64-windows-static/lib/pkgconfig")
|
||||
set(ENV{PKG_CONFIG_PATH} "${ROOT_DIR}/vcpkg_installed/x64-windows-static/lib/pkgconfig")
|
||||
endif()
|
||||
|
||||
@ -66,6 +67,7 @@ endif()
|
||||
|
||||
# freetype
|
||||
|
||||
if (IMGUI_ENABLE_FREETYPE)
|
||||
pkg_check_modules(FREETYPE freetype2)
|
||||
if (FREETYPE_FOUND AND NOT TRACY_DOWNLOAD_FREETYPE)
|
||||
add_library(TracyFreetype INTERFACE)
|
||||
@ -75,11 +77,15 @@ else()
|
||||
CPMAddPackage(
|
||||
NAME freetype
|
||||
GITHUB_REPOSITORY freetype/freetype
|
||||
GIT_TAG VER-2-13-2
|
||||
GIT_TAG VER-2-10-0
|
||||
OPTIONS
|
||||
"FT_DISABLE_HARFBUZZ ON"
|
||||
"FT_WITH_HARFBUZZ OFF"
|
||||
)
|
||||
add_library(TracyFreetype INTERFACE)
|
||||
target_link_libraries(TracyFreetype INTERFACE freetype)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# zstd
|
||||
|
||||
@ -157,13 +163,17 @@ set(IMGUI_SOURCES
|
||||
${IMGUI_DIR}/imgui_tables.cpp
|
||||
)
|
||||
|
||||
set(IMGUI_FREETYPE_SOURCES
|
||||
${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp
|
||||
)
|
||||
if (IMGUI_ENABLE_FREETYPE)
|
||||
add_definitions(-DIMGUI_ENABLE_FREETYPE)
|
||||
list(APPEND IMGUI_SOURCES ${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp)
|
||||
endif()
|
||||
|
||||
add_library(TracyImGui STATIC ${IMGUI_SOURCES} ${IMGUI_FREETYPE_SOURCES})
|
||||
add_library(TracyImGui STATIC ${IMGUI_SOURCES})
|
||||
target_include_directories(TracyImGui PUBLIC ${IMGUI_DIR})
|
||||
|
||||
if (IMGUI_ENABLE_FREETYPE)
|
||||
target_link_libraries(TracyImGui PUBLIC TracyFreetype)
|
||||
endif()
|
||||
|
||||
if (LEGACY)
|
||||
target_link_libraries(TracyImGui PUBLIC TracyGlfw3)
|
||||
@ -230,7 +240,18 @@ if (NOT NO_TBB)
|
||||
# Some distributions have pgk-config files for TBB, others don't.
|
||||
|
||||
pkg_check_modules(TBB tbb)
|
||||
if (TBB_FOUND)
|
||||
add_library(TracyTbb INTERFACE)
|
||||
target_include_directories(TracyTbb INTERFACE ${TBB_INCLUDE_DIRS})
|
||||
target_link_libraries(TracyTbb INTERFACE ${TBB_LINK_LIBRARIES})
|
||||
else()
|
||||
CPMAddPackage(
|
||||
NAME tbb
|
||||
GITHUB_REPOSITORY oneapi-src/oneTBB
|
||||
GIT_TAG v2021.12.0-rc2
|
||||
OPTIONS "TBB_TEST OFF"
|
||||
)
|
||||
add_library(TracyTbb INTERFACE)
|
||||
target_link_libraries(TracyTbb INTERFACE tbb)
|
||||
endif()
|
||||
endif()
|
||||
@ -3,6 +3,8 @@ project(Profiler C CXX ASM)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(IMGUI_ENABLE_FREETYPE ON)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user