MXS-81: allow building without checking for init scripts (-DWITH_SCRIPTS=N)
This commit is contained in:
parent
593f88489a
commit
532c37fadc
28
macros.cmake
28
macros.cmake
@ -262,20 +262,22 @@ debugmsg("Search returned: ${MYSQL_DIR_LOC}")
|
||||
|
||||
|
||||
# Check which init.d script to install
|
||||
find_file(RPM_FNC functions PATHS /etc/rc.d/init.d)
|
||||
if(${RPM_FNC} MATCHES "RPM_FNC-NOTFOUND")
|
||||
find_file(DEB_FNC init-functions PATHS /lib/lsb)
|
||||
if(${DEB_FNC} MATCHES "DEB_FNC-NOTFOUND")
|
||||
set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
|
||||
message(FATAL_ERROR "Cannot find required init-functions in /lib/lsb/ or /etc/rc.d/init.d/, please confirm that your system files are OK.")
|
||||
else()
|
||||
set(DEB_BASED TRUE CACHE BOOL "If init.d script uses /lib/lsb/init-functions instead of /etc/rc.d/init.d/functions.")
|
||||
endif()
|
||||
else()
|
||||
set(DEB_BASED FALSE CACHE BOOL "If init.d script uses /lib/lsb/init-functions instead of /etc/rc.d/init.d/functions.")
|
||||
if(WITH_SCRIPTS)
|
||||
find_file(RPM_FNC functions PATHS /etc/rc.d/init.d)
|
||||
if(${RPM_FNC} MATCHES "RPM_FNC-NOTFOUND")
|
||||
find_file(DEB_FNC init-functions PATHS /lib/lsb)
|
||||
if(${DEB_FNC} MATCHES "DEB_FNC-NOTFOUND")
|
||||
set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.")
|
||||
message(FATAL_ERROR "Cannot find required init-functions in /lib/lsb/ or /etc/rc.d/init.d/, please confirm that your system files are OK.")
|
||||
else()
|
||||
set(DEB_BASED TRUE CACHE BOOL "If init.d script uses /lib/lsb/init-functions instead of /etc/rc.d/init.d/functions.")
|
||||
endif()
|
||||
else()
|
||||
set(DEB_BASED FALSE CACHE BOOL "If init.d script uses /lib/lsb/init-functions instead of /etc/rc.d/init.d/functions.")
|
||||
endif()
|
||||
unset(DEB_FNC)
|
||||
unset(RPM_FNC)
|
||||
endif()
|
||||
unset(DEB_FNC)
|
||||
unset(RPM_FNC)
|
||||
|
||||
#Check RabbitMQ headers and libraries
|
||||
if(BUILD_RABBITMQ)
|
||||
|
Loading…
x
Reference in New Issue
Block a user