Skip to content

Commit 36eb57e

Browse files
committed
cmake: On Windows install PDB files if available.
1 parent bbd42f5 commit 36eb57e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
PROJECT(MYSQLCPPCONN)
31-
cmake_minimum_required(VERSION 3.0)
31+
cmake_minimum_required(VERSION 3.1)
3232

3333
if(POLICY CMP0003)
3434
cmake_policy(SET CMP0003 NEW)
@@ -270,6 +270,14 @@ install(TARGETS connector-jdbc
270270
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
271271
)
272272

273+
if(MSVC AND NOT BUILD_STATIC)
274+
install(FILES $<TARGET_PDB_FILE:connector-jdbc>
275+
CONFIGURATIONS Debug RelWithDebInfo
276+
DESTINATION "${INSTALL_LIB_DIR}"
277+
COMPONENT Debuginfo
278+
)
279+
endif()
280+
273281
# Install some MySQL specific headers
274282
SET(MYSQLCPPCONN_SPECIFIC_INSTALL_HEADERS
275283
driver/mysql_connection.h

0 commit comments

Comments
 (0)