about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-01-27 12:14:10 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-01-27 12:14:10 -0500
commitf000c71ebc2520ac845fc67d9920548489f925cd (patch)
tree9dbed7057757d0e32faa8757596b8944e09049c4
parent1d15f748200f093d869c6fcc38d6053903ff5062 (diff)
downloadrawr-ebooks-f000c71ebc2520ac845fc67d9920548489f925cd.tar.gz
rawr-ebooks-f000c71ebc2520ac845fc67d9920548489f925cd.tar.bz2
rawr-ebooks-f000c71ebc2520ac845fc67d9920548489f925cd.zip
You can now make rawr-gen even if you don't have curl or yaml-cpp
-rw-r--r--CMakeLists.txt16
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 @@
1cmake_minimum_required (VERSION 2.6) 1cmake_minimum_required (VERSION 2.6)
2project (rawr-ebooks) 2project (rawr-ebooks)
3 3
4add_subdirectory(vendor/twitcurl/libtwitcurl)
5
6find_package(PkgConfig) 4find_package(PkgConfig)
7pkg_check_modules(YamlCpp yaml-cpp REQUIRED) 5pkg_check_modules(YamlCpp yaml-cpp)
6find_package(curl)
8 7
9include_directories(vendor/twitcurl/libtwitcurl) 8if (YamlCpp_FOUND AND CURL_FOUND)
10add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp malaprop.cpp) 9 add_subdirectory(vendor/twitcurl/libtwitcurl)
11target_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})
13else (YamlCpp_FOUND AND CURL_FOUND)
14 message(STATUS "rawr-ebooks requires yaml-cpp and twitcurl; without these, we will only make rawr-gen")
15endif (YamlCpp_FOUND AND CURL_FOUND)
12 16
13add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp malaprop.cpp) 17add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp malaprop.cpp)