diff --git a/src/3P/civetweb/builders/cmake/CMakeLists.txt b/src/3P/civetweb/builders/cmake/CMakeLists.txt index 00b39255..45ddcc4c 100644 --- a/src/3P/civetweb/builders/cmake/CMakeLists.txt +++ b/src/3P/civetweb/builders/cmake/CMakeLists.txt @@ -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)