From 7ffb5ad416f55f72d6218666427e1cfb342cf3a7 Mon Sep 17 00:00:00 2001 From: Markus Rickert Date: Mon, 11 Sep 2017 23:13:15 +0200 Subject: [PATCH] Install PDB file with debug information when using Visual Studio --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4864478..a1dbbd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,6 +259,10 @@ install ( TARGETS ${nlopt_lib} ARCHIVE DESTINATION ${RELATIVE_INSTALL_LIB_DIR} ) +if (MSVC AND BUILD_SHARED_LIBS AND NOT CMAKE_VERSION VERSION_LESS 3.1) + install (FILES $ DESTINATION ${RELATIVE_INSTALL_BIN_DIR} CONFIGURATIONS Debug RelWithDebInfo COMPONENT Debug) +endif () + add_subdirectory (api) if (BUILD_PYTHON) -- 2.30.2