Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better deps management #6

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions LICENSE.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Copyright (c) 2016-2017 Taylor C. Richberger <[email protected]> and Pavel Belikov


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 changes: 23 additions & 0 deletions LICENSE.catch2
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
61 changes: 38 additions & 23 deletions dev/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ option(RESTINIO_SAMPLE "Build samples." ${RESTINIO_MASTER_PROJECT})
option(RESTINIO_INSTALL_SAMPLES "Build install samples." ${RESTINIO_MASTER_PROJECT})
option(RESTINIO_BENCH "Build the test target." ${RESTINIO_MASTER_PROJECT})
option(RESTINIO_INSTALL_BENCHES "Build install samples." ${RESTINIO_MASTER_PROJECT})
option(RESTINIO_USE_BOOST_REGEX "Include Boost.Regex support." ON)
option(RESTINIO_USE_PCRE "Include PCRE support." ON)
option(RESTINIO_USE_PCRE2 "Include PCRE2 support." ON)
option(RESTINIO_FIND_DEPS "Use `find_package()` for including RESTinio dependencies." OFF)

SET(RESTINIO_USE_BOOST_ASIO "none" CACHE STRING "Use boost version of ASIO")
Expand All @@ -37,12 +40,14 @@ IF (RESTINIO_MASTER_PROJECT)
SET( RESTINIO_STAND_ALONE_ASIO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/asio/include )
SET( RESTINIO_STAND_ALONE_ASIO_DEFINES -DASIO_STANDALONE -DASIO_HAS_STD_CHRONO -DASIO_DISABLE_STD_STRING_VIEW)

# Try to find boost for boost regex.
SET(Boost_USE_MULTITHREADED ON)
find_package(Boost COMPONENTS regex)
if ( Boost_FOUND )
message(STATUS "Found Boost for regex.")
endif ()
IF(RESTINIO_USE_BOOST_REGEX)
# Try to find boost for boost regex.
SET(Boost_USE_MULTITHREADED ON)
find_package(Boost REQUIRED COMPONENTS regex)
if ( Boost_FOUND )
message(STATUS "Found Boost for regex.")
endif ()
ENDIF()
ELSE ()
SET(Boost_USE_MULTITHREADED ON)
IF ( RESTINIO_USE_BOOST_ASIO MATCHES "shared" )
Expand All @@ -51,14 +56,23 @@ IF (RESTINIO_MASTER_PROJECT)
SET(Boost_USE_STATIC_LIBS ON)
ENDIF ()

find_package(Boost 1.66.0 REQUIRED COMPONENTS system regex)
IF(RESTINIO_USE_BOOST_REGEX)
find_package(Boost 1.66.0 REQUIRED COMPONENTS system regex)
if ( Boost_FOUND )
message(STATUS "Found Boost for regex.")
endif ()
ELSE()
find_package(Boost 1.66.0 REQUIRED COMPONENTS system regex)
ENDIF()
ENDIF ()

IF (RESTINIO_FIND_DEPS)
# Require necessary packages.

# HTTP parser
# http_parser is linked as raw static lib file.
# Try finding a shared http_parser.
set(RESTINIO_HTTP_PARSER_SHARED ON)
add_subdirectory(nodejs/http_parser)

# fmtlib
find_package(fmt REQUIRED)
Expand All @@ -79,36 +93,37 @@ IF (RESTINIO_MASTER_PROJECT)
# OpenSSL
find_package(OpenSSL)
IF ( OPENSSL_FOUND )
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
message(STATUS "OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
message(STATUS "OpenSSL libraries: ${OPENSSL_LIBRARIES}")
ENDIF ( OPENSSL_FOUND )


IF (RESTINIO_USE_PCRE)
# PCRE
find_package(PCRE)
find_package(PCRE REQUIRED)
IF (PCRE_FOUND)
message( STATUS "PCRE_LIBRARIES='" ${PCRE_LIBRARIES} "'" )
message( STATUS "PCRE_INCLUDE_DIRS='" ${PCRE_INCLUDE_DIRS} "'" )
ENDIF ()
ENDIF()

IF (RESTINIO_USE_PCRE2)
# PCRE2
find_package(PCRE2)
IF (PCRE2_FOUND)
message( STATUS "PCRE2_LIBRARIES='" ${PCRE2_LIBRARIES} "'" )
message( STATUS "PCRE2_INCLUDE_DIRS='" ${PCRE2_INCLUDE_DIRS} "'" )
ENDIF ()

# PCRE2
find_package(PCRE2)
find_package(PCRE2 REQUIRED)
IF (PCRE2_FOUND)
message( STATUS "PCRE2_LIBRARIES='" ${PCRE2_LIBRARIES} "'" )
message( STATUS "PCRE2_INCLUDE_DIRS='" ${PCRE2_INCLUDE_DIRS} "'" )
ENDIF ()
ENDIF()

# ------------------------------------------------------------------------------
# SObjectizer
SET(SOBJECTIZER_BUILD_STATIC ON)
SET(SOBJECTIZER_LIBS sobjectizer::StaticLib)
add_subdirectory(so_5)
IF (EXISTS "${CMAKE_SOURCE_DIR}/so_5")
SET(SOBJECTIZER_BUILD_STATIC ON)
SET(SOBJECTIZER_LIBS sobjectizer::StaticLib)
add_subdirectory(so_5)
ELSE()
MESSAGE (STATUS "Could NOT find SObjectizer; this will disable some tests.")
ENDIF()

# ------------------------------------------------------------------------------
# Zlib
Expand Down
Loading