From d1c2659dda688459a7b2aeb675718c65880ffd1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Fri, 19 Apr 2024 15:14:11 +0200 Subject: [PATCH] CMake: Debug build type fix --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 337c753bc..0edb47d8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,12 @@ set(CMAKE_CXX_STANDARD 14) option(NATRON_SYSTEM_LIBS "use system versions of dependencies instead of bundled ones" OFF) option(NATRON_BUILD_TESTS "build the Natron test suite" ON) +if(CMAKE_BUILD_TYPE MATCHES "^(debug|Debug|DEBUG)$") + add_definitions(-DDEBUG) +else() + add_definitions(-DQT_NO_DEBUG_OUTPUT) +endif() + if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build." FORCE) message(STATUS "Setting build type to '${CMAKE_BUILD_TYPE}' as none was specified.")