Update build script

This commit is contained in:
Tindy X 2019-12-26 23:25:08 +08:00
commit 3971bcc688
No known key found for this signature in database
GPG Key ID: C6AD413169968D58

View File

@ -35,6 +35,7 @@ PKG_CHECK_MODULES(LIBEVENT libevent REQUIRED)
FIND_PATH(LIBEVENT_INCLUDE_DIR NAMES event.h PATHS ${LIBEVENT_INCLUDE_DIRS})
FIND_LIBRARY(LIBEVENT_LIBRARY NAMES event PATHS ${LIBEVENT_LIBRARY_DIRS})
LINK_DIRECTORIES(${LIBEVENT_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${LIBEVENT_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(subconverter ${LIBEVENT_LIBRARY})
FIND_PACKAGE(CURL 7.54.0 REQUIRED)
@ -48,17 +49,20 @@ TARGET_LINK_LIBRARIES(subconverter ${OPENSSL_LIBRARIES})
PKG_CHECK_MODULES(RAPIDJSON RapidJSON REQUIRED)
FIND_PATH(RAPIDJSON_INCLUDE_DIR NAMES rapidjson.h PATHS ${RAPIDJSON_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${RAPIDJSON_INCLUDE_DIR})
PKG_CHECK_MODULES(YAML_CPP yaml-cpp REQUIRED)
FIND_PATH(YAML_CPP_INCLUDE_DIR NAMES yaml.h PATHS ${YAML_CPP_INCLUDE_DIRS})
FIND_LIBRARY(YAML_CPP_LIBRARY NAMES yaml-cpp PATHS ${YAML_CPP_LIBRARY_DIRS})
LINK_DIRECTORIES(${YAML_CPP_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(subconverter ${YAML_CPP_LIBRARY})
PKG_CHECK_MODULES(PCRE libpcre REQUIRED)
FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h PATHS ${PCRE_INCLUDE_DIRS})
FIND_LIBRARY(PCRE_LIBRARY NAMES pcrecpp pcre PATHS ${PCRE_LIBRARY_DIRS})
LINK_DIRECTORIES(${PCRE_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(subconverter ${PCRE_LIBRARY})
ADD_DEFINITIONS(-DPCRE_STATIC)