Make the plain nginx version the same as nginx-ssl. In a further change we will replace nginx by a dummy package, depending on +nginx-ssl instead. This allows a smooth upgrade. For nginx-util leave the ssl and the ssl-nopcre versions only. For nginx-mod-luci remove the duplicate ssl version. Replace the removed packages by dummies for a smooth upgrade. The dummy packages will be removed after a transition period. Additionally, enable the http2 module for nginx-ssl by default and cleanup the nginx.init file. Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
57 lines
1.9 KiB
CMake
57 lines
1.9 KiB
CMake
cmake_minimum_required(VERSION 2.6)
|
|
|
|
PROJECT(nginx-util CXX)
|
|
SET(CMAKE_CXX_STANDARD 17)
|
|
|
|
INCLUDE(CheckFunctionExists)
|
|
|
|
ADD_DEFINITIONS(-Os -Wall -Werror -Wextra -g3)
|
|
ADD_DEFINITIONS(-Wno-unused-parameter -Wmissing-declarations -Wshadow)
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
|
|
|
|
|
IF(UBUS)
|
|
|
|
ADD_COMPILE_DEFINITIONS(VERSION=${VERSION})
|
|
|
|
FIND_PATH(ubus_include_dir libubus.h)
|
|
FIND_LIBRARY(ubus NAMES ubus)
|
|
INCLUDE_DIRECTORIES(${ubus_include_dir})
|
|
|
|
FIND_PATH(ubox_include_dir libubox/blobmsg.h)
|
|
FIND_LIBRARY(ubox NAMES ubox)
|
|
INCLUDE_DIRECTORIES(${ubox_include_dir})
|
|
|
|
ADD_EXECUTABLE(nginx-ssl-util nginx-util.cpp)
|
|
TARGET_LINK_LIBRARIES(nginx-ssl-util ${ubox} ${ubus} pthread ssl crypto pcre)
|
|
INSTALL(TARGETS nginx-ssl-util RUNTIME DESTINATION bin)
|
|
|
|
ADD_EXECUTABLE(nginx-ssl-util-nopcre nginx-util.cpp)
|
|
TARGET_COMPILE_DEFINITIONS(nginx-ssl-util-nopcre PUBLIC -DNO_PCRE)
|
|
TARGET_LINK_LIBRARIES(nginx-ssl-util-nopcre ${ubox} ${ubus} pthread ssl crypto)
|
|
INSTALL(TARGETS nginx-ssl-util-nopcre RUNTIME DESTINATION bin)
|
|
|
|
ELSE()
|
|
|
|
ADD_COMPILE_DEFINITIONS(VERSION=0)
|
|
|
|
CONFIGURE_FILE(test-px5g.sh test-px5g.sh COPYONLY)
|
|
CONFIGURE_FILE(test-nginx-util.sh test-nginx-util.sh COPYONLY)
|
|
CONFIGURE_FILE(test-nginx-util-root.sh test-nginx-util-root.sh COPYONLY)
|
|
|
|
ADD_EXECUTABLE(px5g px5g.cpp)
|
|
TARGET_LINK_LIBRARIES(px5g ssl crypto)
|
|
INSTALL(TARGETS px5g RUNTIME DESTINATION bin)
|
|
|
|
ADD_EXECUTABLE(nginx-ssl-util-noubus nginx-util.cpp)
|
|
TARGET_COMPILE_DEFINITIONS(nginx-ssl-util-noubus PUBLIC -DNO_UBUS)
|
|
TARGET_LINK_LIBRARIES(nginx-ssl-util-noubus pthread ssl crypto pcre)
|
|
INSTALL(TARGETS nginx-ssl-util-noubus RUNTIME DESTINATION bin)
|
|
|
|
ADD_EXECUTABLE(nginx-ssl-util-nopcre-noubus nginx-util.cpp)
|
|
TARGET_COMPILE_DEFINITIONS(nginx-ssl-util-nopcre-noubus PUBLIC -DNO_PCRE -DNO_UBUS)
|
|
TARGET_LINK_LIBRARIES(nginx-ssl-util-nopcre-noubus pthread ssl crypto)
|
|
INSTALL(TARGETS nginx-ssl-util-nopcre-noubus RUNTIME DESTINATION bin)
|
|
|
|
ENDIF()
|