summaryrefslogtreecommitdiff
path: root/cmake/install_macros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/install_macros.cmake')
-rw-r--r--cmake/install_macros.cmake17
1 files changed, 13 insertions, 4 deletions
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 54f3225ed7e..be243a42924 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -21,26 +21,35 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
GET_TARGET_PROPERTY(location ${target} LOCATION)
GET_TARGET_PROPERTY(type ${target} TYPE)
IF(NOT INSTALL_LOCATION)
- IF(type MATCHES "STATIC_LIBRARY" OR type MATCHES "MODULE_LIBRARY" OR type MATCHES "SHARED_LIBRARY")
+ IF(type MATCHES "STATIC_LIBRARY"
+ OR type MATCHES "MODULE_LIBRARY"
+ OR type MATCHES "SHARED_LIBRARY")
SET(INSTALL_LOCATION "lib")
ELSEIF(type MATCHES "EXECUTABLE")
SET(INSTALL_LOCATION "bin")
ELSE()
- MESSAGE(FATAL_ERROR "cannot determine type of ${target}. Don't now where to install")
+ MESSAGE(FATAL_ERROR
+ "cannot determine type of ${target}. Don't now where to install")
ENDIF()
ENDIF()
STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
- STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
+ STRING(REPLACE
+ "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
+ pdb_location ${pdb_location})
ENDIF()
IF(target STREQUAL "mysqld")
SET(comp Server)
ELSE()
SET(comp Debuginfo)
ENDIF()
- INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
+ # No .pdb file for static libraries.
+ IF(NOT type MATCHES "STATIC_LIBRARY")
+ INSTALL(FILES ${pdb_location}
+ DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
+ ENDIF()
ENDFOREACH()
ENDIF()
ENDMACRO()