Descent3/ddebug/CMakeLists.txt
Azamat H. Hackimov f7b7f18e0d Replace debugbreak with SDL_assert()
Reworked ASSERT() and Int3() macros to use SDL_assert(). SDL_assert() allows to debug break from user decision.

Major reorganizing platform-dependent code to make it platform-independent.
2024-09-24 23:03:02 +03:00

36 lines
583 B
CMake

set(HEADERS
debug.h
mono.h
pserror.h
)
set(CPPS
debug.cpp
error.cpp
$<$<PLATFORM_ID:Darwin,Linux,OpenBSD>:
lnxdebug.cpp
lnxmono.cpp
>
$<$<PLATFORM_ID:Windows>:
windebug.cpp
winmono.cpp
>
)
add_library(ddebug STATIC ${HEADERS} ${CPPS})
add_dependencies(ddebug get_git_hash)
target_include_directories(ddebug PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/ddebug
>
PRIVATE ${PROJECT_BINARY_DIR}/lib # For d3_version.h
)
target_link_libraries(ddebug PRIVATE
$<$<PLATFORM_ID:Windows>:
mem
misc
>
PUBLIC
SDL2::SDL2
logger
)