From 717e6c62020f2408c3a72ab87e0cba410acc17e4 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 28 Feb 2016 18:21:01 -0500 Subject: Added yaml-cpp as a vendor submodule --- .gitmodules | 3 +++ CMakeLists.txt | 13 ++++++++----- vendor/yaml-cpp | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) create mode 160000 vendor/yaml-cpp diff --git a/.gitmodules b/.gitmodules index 037e2c6..581c545 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "vendor/twitcurl"] path = vendor/twitcurl url = https://github.com/swatkat/twitcurl +[submodule "vendor/yaml-cpp"] + path = vendor/yaml-cpp + url = https://github.com/jbeder/yaml-cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index c0a0d69..f43e46c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,19 +2,22 @@ cmake_minimum_required (VERSION 2.6) project (rawr-ebooks) find_package(PkgConfig) -pkg_check_modules(YamlCpp yaml-cpp) pkg_check_modules(Curl libcurl) -if (YamlCpp_FOUND AND Curl_FOUND) +if (Curl_FOUND) add_subdirectory(vendor/twitcurl/libtwitcurl) include_directories(vendor/twitcurl/libtwitcurl) + + add_subdirectory(vendor/yaml-cpp EXCLUDE_FROM_ALL) + include_directories(vendor/yaml-cpp/include) + add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp histogram.cpp prefix_search.cpp) set_property(TARGET rawr-ebooks PROPERTY CXX_STANDARD 11) set_property(TARGET rawr-ebooks PROPERTY CXX_STANDARD_REQUIRED ON) - target_link_libraries(rawr-ebooks ${YamlCpp_LIBRARIES} twitcurl ${Curl_LIBRARIES} aspell) -else (YamlCpp_FOUND AND Curl_FOUND) + target_link_libraries(rawr-ebooks yaml-cpp twitcurl ${Curl_LIBRARIES} aspell) +else (Curl_FOUND) message(STATUS "rawr-ebooks requires yaml-cpp and twitcurl; without these, we will only make rawr-gen") -endif (YamlCpp_FOUND AND Curl_FOUND) +endif (Curl_FOUND) add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp histogram.cpp prefix_search.cpp) set_property(TARGET rawr-gen PROPERTY CXX_STANDARD 11) diff --git a/vendor/yaml-cpp b/vendor/yaml-cpp new file mode 160000 index 0000000..57805df --- /dev/null +++ b/vendor/yaml-cpp @@ -0,0 +1 @@ +Subproject commit 57805dfd6a741e55477ea8d4d5b3b6f0272d1f0e -- cgit 1.4.1