diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c9b40b2..30cd3965 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,10 +55,3 @@ set_option(TRACY_NO_FRAME_IMAGE) set_option(TRACE_NO_SAMPLING) set_option(TRACY_NO_VERIFY) set_option(TRACY_NO_VSYNC_CAPTURE) - -if(NOT TRACY_PORT) - set(TRACY_PORT 8086) -endif() - -message(STATUS "TRACY_PORT: ${TRACY_PORT}") -target_compile_definitions(TracyClient PUBLIC TRACY_PORT=${TRACY_PORT}) diff --git a/manual/tracy.tex b/manual/tracy.tex index 635ca7cb..4bec38c1 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -425,6 +425,27 @@ The application you want to profile should be compiled with all the usual optimi Finally, on Unix make sure that the application is linked with libraries \texttt{libpthread} and \texttt{libdl}. BSD systems will also need to be linked with \texttt{libexecinfo}. +\begin{bclogo}[ +noborder=true, +couleur=black!5, +logo=\bclampe +]{CMake integration} +You can integrate Tracy easily with CMake by adding the git submodule folder as a subdirectory. + +\begin{lstlisting} +# set options before add_subdirectory +# available options: TRACY_ENABLE, TRACY_ON_DEMAND, TRACY_NO_BROADCAST, TRACY_NO_CODE_TRANSFER, ... +option(TRACY_ENABLE "" ON) +option(TRACY_ON_DEMAND "" ON) +add_subdirectory(3rdparty/tracy) # target: TracyClient or alias Tracy::TracyClient +\end{lstlisting} + +Link \texttt{Tracy::TracyClient} to any target where you use Tracy for profiling: + +\begin{lstlisting} +target_link_libraries( PUBLIC Tracy::TracyClient) +\end{lstlisting} +\end{bclogo} \begin{bclogo}[ noborder=true, @@ -448,7 +469,7 @@ FetchContent_MakeAvailable(tracy) Then add this to any target where you use tracy for profiling: \begin{lstlisting} -target_link_libraries(${_target} PUBLIC TracyClient) +target_link_libraries( PUBLIC TracyClient) \end{lstlisting} \end{bclogo}