Update target names, pointed out in #66

This commit is contained in:
Jeremy 2023-12-05 10:24:02 -05:00
parent 56b50d279a
commit 1f7c14ebb6
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E

View File

@ -106,14 +106,14 @@ FetchContent_Declare(
GIT_TAG v0.3.1 # <HASH or TAG>
)
FetchContent_MakeAvailable(cpptrace)
target_link_libraries(your_target cpptrace)
target_link_libraries(your_target cpptrace::cpptrace)
# On windows copy cpptrace.dll to the same directory as the executable for your_target
if(WIN32)
add_custom_command(
TARGET your_target POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:cpptrace>
$<TARGET_FILE:cpptrace::cpptrace>
$<TARGET_FILE_DIR:your_target>
)
endif()
@ -553,7 +553,7 @@ FetchContent_Declare(
GIT_TAG v0.3.1 # <HASH or TAG>
)
FetchContent_MakeAvailable(cpptrace)
target_link_libraries(your_target cpptrace)
target_link_libraries(your_target cpptrace::cpptrace)
```
It's as easy as that. Cpptrace will automatically configure itself for your system. Note: On windows and macos some
@ -683,7 +683,7 @@ if(WIN32)
add_custom_command(
TARGET your_target POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_FILE:cpptrace>
$<TARGET_FILE:cpptrace::cpptrace>
$<TARGET_FILE_DIR:your_target>
)
endif()