Skip to content

Instantly share code, notes, and snippets.

@Romain-P
Created March 7, 2019 08:08
Show Gist options
  • Save Romain-P/ab5f68b24e4f7040c0c378c469517c1f to your computer and use it in GitHub Desktop.
Save Romain-P/ab5f68b24e4f7040c0c378c469517c1f to your computer and use it in GitHub Desktop.
Cmake php-cgi install on UNIX
if (UNIX)
execute_process(
COMMAND bash "-c" "bash ${CMAKE_SOURCE_DIR}/sources/modules/php/dist/php-cgi/linux/install.sh"
RESULT_VARIABLE
RET
)
if(RET EQUAL "1")
message(FATAL_ERROR "Error while installing php-cgi, please install it manually")
endif()
endif(UNIX)
#!/usr/bin/env bash
if [ -n "$(command -v php-cgi --version)" ]; then
exit 0
elif [ -n "$(command -v yum)" ]; then
sudo yum install php-cgi
elif [ -n "$(command -v apt-get)" ]; then
sudo apt-get install php-cgi
else
echo -e "no package installer found on your distribution"
exit 1
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment