diff --git a/.hgignore b/.hgignore index 8cf1324..c660882 100644 --- a/.hgignore +++ b/.hgignore @@ -1,2 +1,2 @@ syntax: glob -include/yaml-cpp/yaml.h + diff --git a/CMakeLists.txt b/CMakeLists.txt index 21e4fd2..c3be603 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,26 +56,12 @@ option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs ( ### set(header_directory "include/yaml-cpp/") -file(GLOB common_sources "src/[a-zA-Z]*.cpp") -file(GLOB new_api_sources - "src/node/[a-zA-Z]*.cpp" - "src/node/detail/[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 common_private_headers "src/[a-zA-Z]*.h") -file(GLOB new_api_private_headers "src/node/[a-zA-Z]*.h") +file(GLOB sources "src/[a-zA-Z]*.cpp") +file(GLOB_RECURSE public_headers "include/yaml-cpp/[a-zA-Z]*.h") +file(GLOB private_headers "src/[a-zA-Z]*.h") 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") diff --git a/include/yaml-cpp/yaml.h b/include/yaml-cpp/yaml.h new file mode 100644 index 0000000..4e63408 --- /dev/null +++ b/include/yaml-cpp/yaml.h @@ -0,0 +1,21 @@ +#ifndef YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 +#define YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 + +#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 +#pragma once +#endif + +#include "yaml-cpp/parser.h" +#include "yaml-cpp/emitter.h" +#include "yaml-cpp/stlemitter.h" +#include "yaml-cpp/exceptions.h" + +#include "yaml-cpp/node/node.h" +#include "yaml-cpp/node/impl.h" +#include "yaml-cpp/node/convert.h" +#include "yaml-cpp/node/iterator.h" +#include "yaml-cpp/node/detail/impl.h" +#include "yaml-cpp/node/parse.h" +#include "yaml-cpp/node/emit.h" + +#endif // YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66 diff --git a/src/node/convert.cpp b/src/convert.cpp similarity index 100% rename from src/node/convert.cpp rename to src/convert.cpp diff --git a/src/node/emit.cpp b/src/emit.cpp similarity index 100% rename from src/node/emit.cpp rename to src/emit.cpp diff --git a/src/node/detail/memory.cpp b/src/memory.cpp similarity index 100% rename from src/node/detail/memory.cpp rename to src/memory.cpp diff --git a/src/node/detail/node_data.cpp b/src/node_data.cpp similarity index 100% rename from src/node/detail/node_data.cpp rename to src/node_data.cpp diff --git a/src/node/nodebuilder.cpp b/src/nodebuilder.cpp similarity index 100% rename from src/node/nodebuilder.cpp rename to src/nodebuilder.cpp diff --git a/src/node/nodebuilder.h b/src/nodebuilder.h similarity index 100% rename from src/node/nodebuilder.h rename to src/nodebuilder.h diff --git a/src/node/nodeevents.cpp b/src/nodeevents.cpp similarity index 100% rename from src/node/nodeevents.cpp rename to src/nodeevents.cpp diff --git a/src/node/nodeevents.h b/src/nodeevents.h similarity index 100% rename from src/node/nodeevents.h rename to src/nodeevents.h diff --git a/src/node/parse.cpp b/src/parse.cpp similarity index 100% rename from src/node/parse.cpp rename to src/parse.cpp