Fix issues related to export directives

This commit is contained in:
Jeremy 2024-02-07 21:40:52 -06:00
parent adefa5c234
commit 60dd6b5065
No known key found for this signature in database
GPG Key ID: BE03111EB7ED6E2E
2 changed files with 6 additions and 1 deletions

View File

@ -243,8 +243,9 @@ endif()
# ---- Generate Build Info Headers ----
# used in export header generated below
if(NOT CPPTRACE_BUILD_SHARED)
if(build_type STREQUAL "STATIC")
target_compile_definitions(${target_name} PUBLIC CPPTRACE_STATIC_DEFINE)
set(CPPTRACE_STATIC_DEFINE TRUE)
endif()
# ---- Library Properties ----

View File

@ -15,3 +15,7 @@ if(NOT TARGET cpptrace::cpptrace)
include("${CMAKE_CURRENT_LIST_DIR}/@package_name@-targets.cmake")
endif()
if(@CPPTRACE_STATIC_DEFINE@)
target_compile_definitions(cpptrace::cpptrace INTERFACE CPPTRACE_STATIC_DEFINE)
endif()