add cmake for civetweb.

This commit is contained in:
jbnadal
2017-06-07 17:03:45 +02:00
parent f4bf901f9a
commit 49053e9b45

View File

@@ -1,33 +1,32 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required (VERSION 3.0)
include (libwolfssl)
include (libcivetweb)
project(libcivetweb-cpp)
project(libcivetweb)
set (CMAKE_MODULE_PATH "${MODULE_PATH}")
set (CMAKE_CXX_STANDARD 11)
ADD_DEFINITIONS(-DUSE_YASSL -DNO_SSL_DL)
include (br)
include_directories($ENV{SRC_DIR}/src/3P/civetweb/include)
file(
GLOB
source_files
../../src/civetweb.c
../../src/CivetServer.cpp
$ENV{SRC_DIR}/src/3P/civetweb/src/civetweb.c
$ENV{SRC_DIR}/src/3P/civetweb/src/CivetServer.cpp
)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")
set(CMAKE_C_FLAGS "-W -Wall -O2 -Iinclude")
add_library(civetweb-cpp SHARED ${source_files})
add_library(
civetweb
SHARED
${source_files}
)
target_link_libraries (civetweb
target_link_libraries (civetweb-cpp
LINK_PUBLIC
wolfssl
pthread
m
)
target_include_directories (civetweb PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
install (TARGETS civetweb-cpp LIBRARY DESTINATION local/lib)
file (GLOB headers $ENV{SRC_DIR}/src/3P/civetweb/include/*.h)
install (FILES ${headers} DESTINATION include/civetweb)