From f0c5702702e28b34b650963d39313c44dab867e7 Mon Sep 17 00:00:00 2001 From: slambon <39929800+slambon@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:21:20 -0400 Subject: [PATCH] Setting CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY to lib folder There's currently a warning message when using YAML-CPP as static library in debug mode because the library yaml-cppd.lib is expecting / missing pdb information. By setting the pdb generation folder to the lib folder, the compiler is no longer complaining. It now looks like this: .\RootBuildFolder\Release - yaml-cpp.lib .\RootBuildFolder\Debug - yaml-cpp static.pdb - yaml-cppd.lib See more about the problem: https://stackoverflow.com/questions/25843883/how-to-remove-warning-lnk4099-pdb-lib-pdb-was-not-found --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b13e77fa7..cbc376666 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,8 @@ else() set(yaml-cpp-label-postfix "static") endif() +set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}/../") + set(build-shared $) set(build-windows-dll $,${build-shared}>) set(not-msvc $>)