From e8bc60d9263e5b0dd213bcc85f9655ebebcedf49 Mon Sep 17 00:00:00 2001 From: Ryze <50497128+ryze312@users.noreply.github.com> Date: Sun, 3 Mar 2024 08:55:12 +0000 Subject: [PATCH] Add CMake option for additional compiler definitions (#275) originally intended for miniaudio options --------- Co-authored-by: ouwou <26526779+ouwou@users.noreply.github.com> --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24074d7c..d1b56fc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,3 +217,8 @@ if (USE_MINIAUDIO) target_include_directories(abaddon PUBLIC ${MINIAUDIO_INCLUDE_DIR}) target_compile_definitions(abaddon PRIVATE WITH_MINIAUDIO) endif () + +set(ABADDON_COMPILER_DEFS "" CACHE STRING "Additional compiler definitions") +foreach (COMPILER_DEF IN LISTS ABADDON_COMPILER_DEFS) + target_compile_definitions(abaddon PRIVATE "${COMPILER_DEF}") +endforeach ()