diff --git a/CMakeLists.txt b/CMakeLists.txt index f0b7c9532..6be0e1f03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ option(IMHEX_STRICT_WARNINGS "Enable most available warnings and treat them as e option(IMHEX_STATIC_LINK_PLUGINS "Statically link all plugins into the main executable" OFF) option(IMHEX_GENERATE_PACKAGE "Specify if a native package should be built. Only usable on Windows and MacOS" OFF) option(IMHEX_ENABLE_UNITY_BUILD "Enables building ImHex as a unity build." OFF) +option(IMHEX_GENERATE_PDBS "Enable generating PDB files in non-debug builds" ON) # Basic compiler and cmake configurations set(CMAKE_CXX_STANDARD 23) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index bee3fca4f..ad1acbde3 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -648,6 +648,10 @@ function(enableUnityBuild TARGET) endfunction() function(generatePDBs) + if (NOT IMHEX_GENERATE_PDBS) + return() + endif () + if (NOT WIN32 OR CMAKE_BUILD_TYPE STREQUAL "Debug") return() endif ()