added cpptrace

This commit is contained in:
2024-07-26 07:54:29 -05:00
parent f1ec1fd4a6
commit f3dfadddfa
5 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,22 @@
include(FetchContent)
FetchContent_Declare(
cpptrace
GIT_REPOSITORY https://github.com/jeremy-rifkin/cpptrace.git
GIT_TAG v0.6.3
)
FetchContent_MakeAvailable(cpptrace)
link_libraries(cpptrace::cpptrace)
if(WIN32)
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:cpptrace::cpptrace>
$<TARGET_FILE_DIR:your_target>
)
endif()
set(CMAKE_CXX_FLAGS "-include common.hpp ${CMAKE_CXX_FLAGS}")
add_project_library(lib${PROJECT_NAME} "" "" "${PROJECT_ADDITIONAL_SOURCES}")