Package building now requires CMake version 2.8.12 or greater.

This commit is contained in:
Markus Makela
2014-12-18 15:27:37 +02:00
parent 58f25fdf9b
commit 4d21e901ef

View File

@ -120,6 +120,10 @@ install(FILES server/MaxScale_template.cnf DESTINATION etc)
install(FILES ${ERRMSG} DESTINATION mysql) install(FILES ${ERRMSG} DESTINATION mysql)
install(FILES ${DOCS} DESTINATION Documentation) install(FILES ${DOCS} DESTINATION Documentation)
install(DIRECTORY DESTINATION log) install(DIRECTORY DESTINATION log)
if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
message(WARNING "CMake version is ${CMAKE_VERSION}. Building of packages requires version 2.8.12 or greater.")
else()
# See if we are on a RPM-capable or DEB-capable system # See if we are on a RPM-capable or DEB-capable system
find_program(RPMBUILD rpmbuild) find_program(RPMBUILD rpmbuild)
find_program(DEBBUILD dpkg-buildpackage) find_program(DEBBUILD dpkg-buildpackage)
@ -157,6 +161,8 @@ set(CPACK_RPM_USER_FILELIST "%ignore /etc/init.d")
set(CPACK_RPM_USER_FILELIST "%ignore /etc/ld.so.conf.d") set(CPACK_RPM_USER_FILELIST "%ignore /etc/ld.so.conf.d")
set(CPACK_RPM_USER_FILELIST "%ignore /etc") set(CPACK_RPM_USER_FILELIST "%ignore /etc")
include(CPack) include(CPack)
endif()
add_custom_target(buildtests add_custom_target(buildtests
COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR} COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR}