2018-10-13 05:08:20 +08:00
|
|
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
|
|
|
|
2019-01-21 11:03:23 +08:00
|
|
|
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/src/oatpp/core/base/Environment.hpp" OATPP_VERSION_MACRO REGEX "#define OATPP_VERSION \"[0-9]+.[0-9]+.[0-9]+\"$")
|
2018-10-13 05:08:20 +08:00
|
|
|
string(REGEX REPLACE "#define OATPP_VERSION \"([0-9]+.[0-9]+.[0-9]+)\"$" "\\1" oatpp_VERSION "${OATPP_VERSION_MACRO}")
|
|
|
|
|
|
|
|
project(oatpp VERSION ${oatpp_VERSION} LANGUAGES CXX)
|
|
|
|
|
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
|
|
|
option(OATPP_INSTALL "Create installation target for oat++" ON)
|
|
|
|
option(OATPP_BUILD_TESTS "Create test target for oat++" ON)
|
|
|
|
|
2019-01-23 13:27:14 +08:00
|
|
|
message("oatpp version: '${oatpp_VERSION}'")
|
|
|
|
|
2019-01-21 11:03:23 +08:00
|
|
|
add_subdirectory(src)
|
2018-10-13 05:08:20 +08:00
|
|
|
|
|
|
|
if(OATPP_BUILD_TESTS)
|
|
|
|
enable_testing()
|
2019-01-21 11:03:23 +08:00
|
|
|
add_subdirectory(test)
|
2019-01-23 13:27:14 +08:00
|
|
|
endif()
|