From dbe37d9b186053530390f3915da08603ac32d28f Mon Sep 17 00:00:00 2001 From: kakwa Date: Thu, 26 Jan 2017 19:54:03 +0100 Subject: [PATCH] fix sed command in patching civetweb on FreeBSD * sed -i requires an extension parameter on FreeBSD, providing one --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12e66d0..9aea4ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,10 +36,14 @@ else() set(OPENSSL_API_1_1 OFF) endif() +IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(SED_FREEBSD "*.c") +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + if(BUNDLE_CIVETWEB) ExternalProject_Add( civetweb GIT_REPOSITORY https://github.com/kakwa/civetweb - PATCH_COMMAND sed -i s/__DATE__/"110973"/ src/main.c src/civetweb.c + PATCH_COMMAND sed -i ${SED_FREEBSD} s/__DATE__/"110973"/ src/main.c src/civetweb.c INSTALL_DIR /usr/local CMAKE_ARGS .. -DCMAKE_INSTALL_PREFIX=/usr -DCIVETWEB_DISABLE_CGI=ON