mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Began new-api branch, and removed all traces of the old api from this branch
This commit is contained in:
@@ -22,8 +22,8 @@ include(CheckCXXCompilerFlag)
|
||||
project(YAML_CPP)
|
||||
|
||||
set(YAML_CPP_VERSION_MAJOR "0")
|
||||
set(YAML_CPP_VERSION_MINOR "2")
|
||||
set(YAML_CPP_VERSION_PATCH "7")
|
||||
set(YAML_CPP_VERSION_MINOR "5")
|
||||
set(YAML_CPP_VERSION_PATCH "0")
|
||||
set(YAML_CPP_VERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}.${YAML_CPP_VERSION_PATCH}")
|
||||
|
||||
enable_testing()
|
||||
@@ -35,7 +35,6 @@ enable_testing()
|
||||
## Project stuff
|
||||
option(YAML_CPP_BUILD_TOOLS "Enable testing and parse tools" ON)
|
||||
option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON)
|
||||
option(YAML_CPP_BUILD_OLD_API "Enable building the old API" ON)
|
||||
|
||||
## Build options
|
||||
# --> General
|
||||
@@ -52,15 +51,6 @@ option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF)
|
||||
option(MSVC_SHARED_RT "MSVC: Build with shared runtime libs (/MD)" ON)
|
||||
option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (/ML until VS .NET 2003)" OFF)
|
||||
|
||||
###
|
||||
### Configure the main header
|
||||
###
|
||||
if(YAML_CPP_BUILD_OLD_API)
|
||||
set(API_DEFINE "#define YAML_CPP_OLD_API")
|
||||
endif()
|
||||
|
||||
configure_file(${YAML_CPP_SOURCE_DIR}/include/yaml-cpp/yaml.h.cmake ${YAML_CPP_SOURCE_DIR}/include/yaml-cpp/yaml.h @ONLY)
|
||||
|
||||
###
|
||||
### Sources, headers, directories and libs
|
||||
###
|
||||
@@ -71,31 +61,21 @@ file(GLOB new_api_sources
|
||||
"src/node/[a-zA-Z]*.cpp"
|
||||
"src/node/detail/[a-zA-Z]*.cpp"
|
||||
)
|
||||
file(GLOB old_api_sources "src/old-api/[a-zA-Z]*.cpp")
|
||||
|
||||
file(GLOB common_public_headers "include/yaml-cpp/[a-zA-Z]*.h")
|
||||
file(GLOB new_api_public_headers
|
||||
"include/yaml-cpp/node/[a-zA-Z]*.h"
|
||||
"include/yaml-cpp/node/detail/[a-zA-Z]*.h"
|
||||
)
|
||||
file(GLOB old_api_public_headers "include/yaml-cpp/old-api/[a-zA-Z]*.h")
|
||||
|
||||
file(GLOB common_private_headers "src/[a-zA-Z]*.h")
|
||||
file(GLOB new_api_private_headers "src/node/[a-zA-Z]*.h")
|
||||
file(GLOB old_api_private_headers "src/old-api/[a-zA-Z]*.h")
|
||||
|
||||
if(YAML_CPP_BUILD_OLD_API)
|
||||
list(APPEND sources ${common_sources} ${old_api_sources})
|
||||
list(APPEND public_headers ${common_public_headers} ${old_api_public_headers})
|
||||
list(APPEND private_headers ${common_private_headers} ${old_api_private_headers})
|
||||
add_definitions(-DYAML_CPP_OLD_API)
|
||||
else()
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
list(APPEND sources ${common_sources} ${new_api_sources})
|
||||
list(APPEND public_headers ${common_public_headers} ${new_api_public_headers})
|
||||
list(APPEND private_headers ${common_private_headers} ${new_api_private_headers})
|
||||
endif()
|
||||
find_package(Boost REQUIRED)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
list(APPEND sources ${common_sources} ${new_api_sources})
|
||||
list(APPEND public_headers ${common_public_headers} ${new_api_public_headers})
|
||||
list(APPEND private_headers ${common_private_headers} ${new_api_private_headers})
|
||||
|
||||
if(YAML_CPP_BUILD_CONTRIB)
|
||||
file(GLOB contrib_sources "src/contrib/[a-zA-Z]*.cpp")
|
||||
|
Reference in New Issue
Block a user