aboutsummaryrefslogtreecommitdiffstats
path: root/thirdparty/apps/CMakeLists.txt
diff options
context:
space:
mode:
authorYalei Wang <william.wangyalei@huawei.com>2018-03-09 11:04:03 +0800
committerYalei Wang <william.wangyalei@huawei.com>2018-03-09 11:08:49 +0800
commit71e33ec17c12e6ca43f149215ca05fc9d8b1d5a9 (patch)
tree0156b92e35311499b75ba21d5b547b47b10061a9 /thirdparty/apps/CMakeLists.txt
parent71a4e2f34afa8018426f0e830050e50a1de6d375 (diff)
Add some third-party src code for DMM
glog-0.3.4 is necessary for the DMM project. Change-Id: Id42f7370ebaff0e584a00d57d66bca98db8004e1 Signed-off-by: Yalei Wang <william.wangyalei@huawei.com>
Diffstat (limited to 'thirdparty/apps/CMakeLists.txt')
-rw-r--r--thirdparty/apps/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/thirdparty/apps/CMakeLists.txt b/thirdparty/apps/CMakeLists.txt
new file mode 100644
index 0000000..379f3e4
--- /dev/null
+++ b/thirdparty/apps/CMakeLists.txt
@@ -0,0 +1,27 @@
+LINK_DIRECTORIES(${LIB_PATH_SHARED})
+SET(NGINX_URL http://nginx.org/download/nginx-1.12.2.tar.gz)
+SET(NGINX_DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}/nginx/)
+SET(NGINX_SRC ${CMAKE_CURRENT_LIST_DIR}/nginx/nginx-1.12.2)
+SET(NGINX_RELEASE ${CMAKE_CURRENT_LIST_DIR}/nginx/release)
+
+if(EXISTS "${NGINX_DOWNLOAD_DIR}/nginx-1.12.2.tar.gz")
+ SET(NGINX_DOWNLOAD_CMD tar -xvf ${NGINX_DOWNLOAD_DIR}/nginx-1.12.2.tar.gz -C ${NGINX_DOWNLOAD_DIR}/nginx-1.12.2 --strip-components 1)
+else()
+ SET(NGINX_DOWNLOAD_CMD wget --no-check-certificate -O nginx-1.12.2.tar.gz ${NGINX_URL} && tar -xvf ${NGINX_DOWNLOAD_DIR}/nginx-1.12.2.tar.gz -C ${NGINX_DOWNLOAD_DIR}/nginx-1.12.2 --strip-components 1)
+endif()
+
+INCLUDE(ExternalProject)
+ExternalProject_Add(
+ NGINX
+ URL ${NGINX_URL}
+ DOWNLOAD_DIR ${NGINX_DOWNLOAD_DIR}
+ DOWNLOAD_COMMAND ${NGINX_DOWNLOAD_CMD}
+ BUILD_IN_SOURCE 1
+ SOURCE_DIR ${NGINX_SRC}
+ PATCH_COMMAND echo "./configure --with-ld-opt=\"-L${LIB_PATH_SHARED}/ -lnStackAPI -Wl,-rpath=${LIB_PATH_SHARED}\" --sbin-path=${NGINX_RELEASE}/nginx --conf-path=${NGINX_RELEASE}/nginx.conf --pid-path=${NGINX_RELEASE}/nginx.pid " > configure.sh
+ CONFIGURE_COMMAND sh configure.sh
+ BUILD_COMMAND make
+ INSTALL_COMMAND make install
+ DEPENDS nStackAPI
+)
+