From 16fb35fe6f9949b1646a361ea75a99263e110685 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 20:47:08 +0800 Subject: [PATCH 1/8] Update build scripts --- scripts/build.alpine.release.sh | 7 +------ scripts/build.macos.release.sh | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/build.alpine.release.sh b/scripts/build.alpine.release.sh index acc073c..9233514 100644 --- a/scripts/build.alpine.release.sh +++ b/scripts/build.alpine.release.sh @@ -3,7 +3,7 @@ mkdir obj set -xe apk add gcc g++ build-base linux-headers cmake make autoconf automake libtool -apk add libressl-dev zlib-dev rapidjson-dev libevent-dev libevent-static zlib-static pcre-dev +apk add libressl-dev zlib-dev rapidjson-dev libevent-dev libevent-static zlib-static pcre-dev bzip2-static git clone https://github.com/curl/curl cd curl @@ -18,11 +18,6 @@ cmake . > /dev/null make install -j4 > /dev/null cd .. -git clone git://sourceware.org/git/bzip2.git -cd bzip2 -make install -j4 > /dev/null -cd .. - cmake . make -j4 g++ -o base/subconverter CMakeFiles/subconverter.dir/src/*.o -static -lpcrecpp -lpcre -levent -lyaml-cpp -lcurl -lssl -lcrypto -lz -lbz2 -ldl -lpthread -O3 -s diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index f5a5d4e..dbce492 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -25,7 +25,7 @@ cp /usr/local/lib/libyaml-cpp.a . cp /usr/local/lib/libpcre.a . cp /usr/local/lib/libpcrecpp.a . -export CMAKE_CXX_FLAGS=-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include +export CMAKE_CXX_FLAGS="-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" cmake . make -j8 c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter obj/logger.o obj/main.o obj/misc.o obj/multithread.o obj/nodemanip.o obj/rapidjson_extra.o obj/speedtestutil.o obj/subexport.o obj/webget.o obj/webserver_libevent.o libpcrecpp.a libpcre.a libevent.a curl/lib/.libs/libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a bzip2-1.0.6/libbz2.a -ldl -lpthread -O3 From df0d070c1d0830b8f4b0e0bc0bced45afd4fdd35 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 20:53:42 +0800 Subject: [PATCH 2/8] Update build script --- scripts/build.macos.release.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index dbce492..9bc5dd2 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -2,7 +2,7 @@ mkdir obj set -xe -brew reinstall yaml-cpp rapidjson libevent zlib pcre +brew reinstall yaml-cpp rapidjson libevent zlib pcre bzip2 git clone https://github.com/curl/curl cd curl @@ -11,12 +11,7 @@ cd curl make -j8 > /dev/null cd .. -curl -L -o bzip2-1.0.6.tar.gz https://sourceforge.net/projects/bzip2/files/bzip2-1.0.6.tar.gz/download -tar xvf bzip2-1.0.6.tar.gz -cd bzip2-1.0.6 -make -j8 > /dev/null -cd .. - +cp curl/lib/.libs/libcurl.a . cp /usr/local/lib/libevent.a . cp /usr/local/opt/zlib/lib/libz.a . cp /usr/local/opt/openssl@1.1/lib/libssl.a . @@ -24,11 +19,12 @@ cp /usr/local/opt/openssl@1.1/lib/libcrypto.a . cp /usr/local/lib/libyaml-cpp.a . cp /usr/local/lib/libpcre.a . cp /usr/local/lib/libpcrecpp.a . +cp /usr/local/opt/bzip2/lib/libbz2.a export CMAKE_CXX_FLAGS="-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" cmake . make -j8 -c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter obj/logger.o obj/main.o obj/misc.o obj/multithread.o obj/nodemanip.o obj/rapidjson_extra.o obj/speedtestutil.o obj/subexport.o obj/webget.o obj/webserver_libevent.o libpcrecpp.a libpcre.a libevent.a curl/lib/.libs/libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a bzip2-1.0.6/libbz2.a -ldl -lpthread -O3 +c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter CMakeFiles/subconverter.dir/src/*.o libpcrecpp.a libpcre.a libevent.a libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a libbz2.a -ldl -lpthread -O3 cd base chmod +rx subconverter From cc6ff625622d38f0203122afa7d3f18035be453c Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 21:00:12 +0800 Subject: [PATCH 3/8] Update build script --- scripts/build.macos.release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index 9bc5dd2..100bf49 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -19,7 +19,7 @@ cp /usr/local/opt/openssl@1.1/lib/libcrypto.a . cp /usr/local/lib/libyaml-cpp.a . cp /usr/local/lib/libpcre.a . cp /usr/local/lib/libpcrecpp.a . -cp /usr/local/opt/bzip2/lib/libbz2.a +cp /usr/local/opt/bzip2/lib/libbz2.a . export CMAKE_CXX_FLAGS="-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" cmake . From 8fa917c3086e48c951b3ccaf4d5c2a2d29c1791c Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 21:40:51 +0800 Subject: [PATCH 4/8] Update build script --- scripts/build.macos.release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index 100bf49..8eda4f1 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -22,7 +22,7 @@ cp /usr/local/lib/libpcrecpp.a . cp /usr/local/opt/bzip2/lib/libbz2.a . export CMAKE_CXX_FLAGS="-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" -cmake . +cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 . make -j8 c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter CMakeFiles/subconverter.dir/src/*.o libpcrecpp.a libpcre.a libevent.a libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a libbz2.a -ldl -lpthread -O3 From dc3ceac21d1e1fe2dc5e59465032e80bb7d5148c Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 21:50:20 +0800 Subject: [PATCH 5/8] Update build script --- CMakeLists.txt | 4 ++++ scripts/build.macos.release.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddd9903..00ed11d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,10 @@ ENDIF() SET(CMAKE_CXX_STANDARD 17) ADD_DEFINITIONS(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result) +IF(MACOS) + ADD_DEFINITIONS(_MACOS) +ENDIF() + ADD_EXECUTABLE(subconverter src/logger.cpp src/main.cpp diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index 8eda4f1..c4bfe38 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -21,8 +21,8 @@ cp /usr/local/lib/libpcre.a . cp /usr/local/lib/libpcrecpp.a . cp /usr/local/opt/bzip2/lib/libbz2.a . -export CMAKE_CXX_FLAGS="-D_MACOS -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" -cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 . +export CMAKE_CXX_FLAGS="-I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/curl/include" +cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 -DMACOS=on . make -j8 c++ -Xlinker -unexported_symbol -Xlinker "*" -o base/subconverter CMakeFiles/subconverter.dir/src/*.o libpcrecpp.a libpcre.a libevent.a libcurl.a libz.a libssl.a libcrypto.a libyaml-cpp.a libbz2.a -ldl -lpthread -O3 From c305b55e4c6ab5971a2212415b81a493e8885f4c Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 21:59:17 +0800 Subject: [PATCH 6/8] Update build script --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00ed11d..18dab27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ SET(CMAKE_CXX_STANDARD 17) ADD_DEFINITIONS(-Wall -Wextra -Wno-unused-parameter -Wno-unused-result) IF(MACOS) - ADD_DEFINITIONS(_MACOS) + ADD_DEFINITIONS(-D_MACOS) ENDIF() ADD_EXECUTABLE(subconverter From 6f05d965ccebea0a3cd02a642f931ef18702456b Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 22:13:45 +0800 Subject: [PATCH 7/8] Update build script --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18dab27..a1c116d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ ADD_EXECUTABLE(subconverter src/webget.cpp src/webserver_libevent.cpp) INCLUDE_DIRECTORIES(src) +LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}) SET(THREADS_PREFER_PTHREAD_FLAG ON) FIND_PACKAGE(Threads REQUIRED) From cc4a20ddf73e8fc049b55c61546e5f056f8cbb08 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Thu, 26 Dec 2019 23:14:30 +0800 Subject: [PATCH 8/8] Update build script --- CMakeLists.txt | 31 ++++++----- cmake/FindLibEvent.cmake | 38 ------------- cmake/FindPCRE.cmake | 37 ------------- cmake/FindRapidjson.cmake | 97 ---------------------------------- scripts/build.macos.release.sh | 2 +- 5 files changed, 20 insertions(+), 185 deletions(-) delete mode 100644 cmake/FindLibEvent.cmake delete mode 100644 cmake/FindPCRE.cmake delete mode 100644 cmake/FindRapidjson.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a1c116d..a57f68e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,14 +25,17 @@ ADD_EXECUTABLE(subconverter INCLUDE_DIRECTORIES(src) LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}) +FIND_PACKAGE(PkgConfig REQUIRED) + SET(THREADS_PREFER_PTHREAD_FLAG ON) FIND_PACKAGE(Threads REQUIRED) TARGET_LINK_LIBRARIES(subconverter ${CMAKE_THREAD_LIBS_INIT}) -FIND_PACKAGE(LibEvent REQUIRED) -FIND_LIBRARY(LIBEVENT_STATIC_LIBS libevent.a) -INCLUDE_DIRECTORIES(${LIBEVENT_INCLUDE_DIR}) -TARGET_LINK_LIBRARIES(subconverter ${LIBEVENT_STATIC_LIBS}) +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}) +TARGET_LINK_LIBRARIES(subconverter ${LIBEVENT_LIBRARY}) FIND_PACKAGE(CURL 7.54.0 REQUIRED) INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) @@ -43,16 +46,20 @@ FIND_PACKAGE(OpenSSL 1.1.0 REQUIRED) INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(subconverter ${OPENSSL_LIBRARIES}) -FIND_PACKAGE(Rapidjson REQUIRED) -INCLUDE_DIRECTORIES(${RAPIDJSON_INCLUDE_DIRS}) +PKG_CHECK_MODULES(RAPIDJSON RapidJSON REQUIRED) +FIND_PATH(RAPIDJSON_INCLUDE_DIR NAMES rapidjson.h PATHS ${RAPIDJSON_INCLUDE_DIRS}) -FIND_PACKAGE(yaml-cpp REQUIRED) -INCLUDE_DIRECTORIES(${YAML_CPP_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(subconverter yaml-cpp.a) +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}) +TARGET_LINK_LIBRARIES(subconverter ${YAML_CPP_LIBRARY}) -FIND_PACKAGE(PCRE REQUIRED) -INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIRS}) -TARGET_LINK_LIBRARIES(subconverter pcrecpp.a ${PCRE_LIBRARIES}) +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}) +TARGET_LINK_LIBRARIES(subconverter ${PCRE_LIBRARY}) ADD_DEFINITIONS(-DPCRE_STATIC) IF(WIN32) diff --git a/cmake/FindLibEvent.cmake b/cmake/FindLibEvent.cmake deleted file mode 100644 index ad2b4de..0000000 --- a/cmake/FindLibEvent.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# - Find LibEvent (a cross event library) -# This module defines -# LIBEVENT_INCLUDE_DIR, where to find LibEvent headers -# LIBEVENT_LIB, LibEvent libraries -# LibEvent_FOUND, If false, do not try to use libevent - -set(LibEvent_EXTRA_PREFIXES /usr/local /opt/local "$ENV{HOME}") -foreach(prefix ${LibEvent_EXTRA_PREFIXES}) - list(APPEND LibEvent_INCLUDE_PATHS "${prefix}/include") - list(APPEND LibEvent_LIB_PATHS "${prefix}/lib") -endforeach() - -find_path(LIBEVENT_INCLUDE_DIR event.h PATHS ${LibEvent_INCLUDE_PATHS}) -find_library(LIBEVENT_LIB NAMES libevent.a PATHS ${LibEvent_LIB_PATHS}) -find_library(LIBEVENT_PTHREAD_LIB NAMES event_pthreads PATHS ${LibEvent_LIB_PATHS}) - -if (LIBEVENT_LIB AND LIBEVENT_INCLUDE_DIR AND LIBEVENT_PTHREAD_LIB) - set(LibEvent_FOUND TRUE) - set(LIBEVENT_LIB ${LIBEVENT_LIB} ${LIBEVENT_PTHREAD_LIB}) -else () - set(LibEvent_FOUND FALSE) -endif () - -if (LibEvent_FOUND) - if (NOT LibEvent_FIND_QUIETLY) - message(STATUS "Found libevent: ${LIBEVENT_LIB}") - endif () -else () - if (LibEvent_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find libevent and libevent_pthread.") - endif () - message(STATUS "libevent and libevent_pthread NOT found.") -endif () - -mark_as_advanced( - LIBEVENT_LIB - LIBEVENT_INCLUDE_DIR - ) diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake deleted file mode 100644 index dbbd60a..0000000 --- a/cmake/FindPCRE.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (C) 2007-2009 LuaDist. -# Created by Peter Kapec -# Redistribution and use of this file is allowed according to the terms of the MIT license. -# For details see the COPYRIGHT file distributed with LuaDist. -# Note: -# Searching headers and libraries is very simple and is NOT as powerful as scripts -# distributed with CMake, because LuaDist defines directories to search for. -# Everyone is encouraged to contact the author with improvements. Maybe this file -# becomes part of CMake distribution sometimes. - -# - Find pcre -# Find the native PCRE headers and libraries. -# -# PCRE_INCLUDE_DIRS - where to find pcre.h, etc. -# PCRE_LIBRARIES - List of libraries when using pcre. -# PCRE_FOUND - True if pcre found. - -# Look for the header file. -FIND_PATH(PCRE_INCLUDE_DIR NAMES pcre.h) - -# Look for the library. -FIND_LIBRARY(PCRE_LIBRARY NAMES pcre) - -# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE. -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR) - -# Copy the results to the output variables. -IF(PCRE_FOUND) - SET(PCRE_LIBRARIES ${PCRE_LIBRARY}) - SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR}) -ELSE(PCRE_FOUND) - SET(PCRE_LIBRARIES) - SET(PCRE_INCLUDE_DIRS) -ENDIF(PCRE_FOUND) - -MARK_AS_ADVANCED(PCRE_INCLUDE_DIRS PCRE_LIBRARIES) diff --git a/cmake/FindRapidjson.cmake b/cmake/FindRapidjson.cmake deleted file mode 100644 index 7a0bf47..0000000 --- a/cmake/FindRapidjson.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (c) 2011 Milo Yip (miloyip@gmail.com) -# Copyright (c) 2013 Rafal Jeczalik (rjeczalik@gmail.com) -# Distributed under the MIT License (see license.txt file) - -# ----------------------------------------------------------------------------------- -# -# Finds the rapidjson library -# -# ----------------------------------------------------------------------------------- -# -# Variables used by this module, they can change the default behaviour. -# Those variables need to be either set before calling find_package -# or exported as environment variables before running CMake: -# -# RAPIDJSON_INCLUDEDIR - Set custom include path, useful when rapidjson headers are -# outside system paths -# RAPIDJSON_USE_SSE2 - Configure rapidjson to take advantage of SSE2 capabilities -# RAPIDJSON_USE_SSE42 - Configure rapidjson to take advantage of SSE4.2 capabilities -# -# ----------------------------------------------------------------------------------- -# -# Variables defined by this module: -# -# RAPIDJSON_FOUND - True if rapidjson was found -# RAPIDJSON_INCLUDE_DIRS - Path to rapidjson include directory -# RAPIDJSON_CXX_FLAGS - Extra C++ flags required for compilation with rapidjson -# -# ----------------------------------------------------------------------------------- -# -# Example usage: -# -# set(RAPIDJSON_USE_SSE2 ON) -# set(RAPIDJSON_INCLUDEDIR "/opt/github.com/rjeczalik/rapidjson/include") -# -# find_package(rapidjson REQUIRED) -# -# include_directories("${RAPIDJSON_INCLUDE_DIRS}") -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}") -# add_executable(foo foo.cc) -# -# ----------------------------------------------------------------------------------- - -foreach(opt RAPIDJSON_INCLUDEDIR RAPIDJSON_USE_SSE2 RAPIDJSON_USE_SSE42) - if(${opt} AND DEFINED ENV{${opt}} AND NOT ${opt} STREQUAL "$ENV{${opt}}") - message(WARNING "Conflicting ${opt} values: ignoring environment variable and using CMake cache entry.") - elseif(DEFINED ENV{${opt}} AND NOT ${opt}) - set(${opt} "$ENV{${opt}}") - endif() -endforeach() - -find_path( - RAPIDJSON_INCLUDE_DIRS - NAMES rapidjson/rapidjson.h - PATHS ${RAPIDJSON_INCLUDEDIR} - DOC "Include directory for the rapidjson library." -) - -mark_as_advanced(RAPIDJSON_INCLUDE_DIRS) - -if(RAPIDJSON_INCLUDE_DIRS) - set(RAPIDJSON_FOUND TRUE) -endif() - -mark_as_advanced(RAPIDJSON_FOUND) - -if(RAPIDJSON_USE_SSE42) - set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE42") - if(MSVC) - set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE4.2") - else() - set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse4.2") - endif() -else() - if(RAPIDJSON_USE_SSE2) - set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE2") - if(MSVC) - set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE2") - else() - set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse2") - endif() - endif() -endif() - -mark_as_advanced(RAPIDJSON_CXX_FLAGS) - -if(RAPIDJSON_FOUND) - if(NOT rapidjson_FIND_QUIETLY) - message(STATUS "Found rapidjson header files in ${RAPIDJSON_INCLUDE_DIRS}") - if(DEFINED RAPIDJSON_CXX_FLAGS) - message(STATUS "Found rapidjson C++ extra compilation flags: ${RAPIDJSON_CXX_FLAGS}") - endif() - endif() -elseif(rapidjson_FIND_REQUIRED) - message(FATAL_ERROR "Could not find rapidjson") -else() - message(STATUS "Optional package rapidjson was not found") -endif() diff --git a/scripts/build.macos.release.sh b/scripts/build.macos.release.sh index c4bfe38..47b89b3 100644 --- a/scripts/build.macos.release.sh +++ b/scripts/build.macos.release.sh @@ -2,7 +2,7 @@ mkdir obj set -xe -brew reinstall yaml-cpp rapidjson libevent zlib pcre bzip2 +brew reinstall yaml-cpp rapidjson libevent zlib pcre bzip2 pkgconfig git clone https://github.com/curl/curl cd curl