Descent3/ddebug/CMakeLists.txt
Louis Gombert 60c5dbf1fe CMake: add all headers to target sources
This can help with CMake IDE integration and file indexing.
2024-08-09 17:09:14 +02:00

31 lines
532 B
CMake

set(HEADERS
debug.h
debugbreak.h
mono.h)
set(CPPS
debug.cpp
$<$<PLATFORM_ID:Darwin,Linux>:
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
mem
$<$<PLATFORM_ID:Windows>:
misc
>
)