diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cpack_rpm.cmake | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 6321b125f84..bfc06d52efe 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -260,5 +260,24 @@ ENDIF(compat_rpm) SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1 SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5") -ENDIF(RPM) +################ +IF(CMAKE_VERSION VERSION_GREATER "3.9.99") + +SET(CPACK_SOURCE_GENERATOR "RPM") +SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS + "-DBUILD_CONFIG=mysql_release" + "-DRPM=${RPM}" + "-DCPACK_RPM_BUILD_SOURCE_DIRS_PREFIX=/usr/src/debug/${CPACK_RPM_PACKAGE_NAME}-${VERSION}" + ) + +MACRO(ADDIF var) + IF(DEFINED ${var}) + SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS "-D${var}=${${var}}") + ENDIF() +ENDMACRO() +ADDIF(BUILD_CONFIG) +ADDIF(WITH_SSL) + +ENDIF() +ENDIF(RPM) |