diff options
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f502af..aa63a34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,13 +1,17 @@ | |||
1 | cmake_minimum_required (VERSION 2.6) | 1 | cmake_minimum_required (VERSION 2.6) |
2 | project (rawr-ebooks) | 2 | project (rawr-ebooks) |
3 | 3 | ||
4 | add_subdirectory(vendor/twitcurl/libtwitcurl) | ||
5 | |||
6 | find_package(PkgConfig) | 4 | find_package(PkgConfig) |
7 | pkg_check_modules(YamlCpp yaml-cpp REQUIRED) | 5 | pkg_check_modules(YamlCpp yaml-cpp) |
6 | find_package(curl) | ||
8 | 7 | ||
9 | include_directories(vendor/twitcurl/libtwitcurl) | 8 | if (YamlCpp_FOUND AND CURL_FOUND) |
10 | add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp malaprop.cpp) | 9 | add_subdirectory(vendor/twitcurl/libtwitcurl) |
11 | target_link_libraries(rawr-ebooks ${YamlCpp_LIBRARIES} twitcurl curl) | 10 | include_directories(vendor/twitcurl/libtwitcurl) |
11 | add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp malaprop.cpp) | ||
12 | target_link_libraries(rawr-ebooks ${YamlCpp_LIBRARIES} twitcurl ${CURL_LIBRARIES}) | ||
13 | else (YamlCpp_FOUND AND CURL_FOUND) | ||
14 | message(STATUS "rawr-ebooks requires yaml-cpp and twitcurl; without these, we will only make rawr-gen") | ||
15 | endif (YamlCpp_FOUND AND CURL_FOUND) | ||
12 | 16 | ||
13 | add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp malaprop.cpp) | 17 | add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp malaprop.cpp) |