From f000c71ebc2520ac845fc67d9920548489f925cd Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 27 Jan 2016 12:14:10 -0500 Subject: You can now make rawr-gen even if you don't have curl or yaml-cpp --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f502af..aa63a34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,17 @@ cmake_minimum_required (VERSION 2.6) project (rawr-ebooks) -add_subdirectory(vendor/twitcurl/libtwitcurl) - find_package(PkgConfig) -pkg_check_modules(YamlCpp yaml-cpp REQUIRED) +pkg_check_modules(YamlCpp yaml-cpp) +find_package(curl) -include_directories(vendor/twitcurl/libtwitcurl) -add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp malaprop.cpp) -target_link_libraries(rawr-ebooks ${YamlCpp_LIBRARIES} twitcurl curl) +if (YamlCpp_FOUND AND CURL_FOUND) + add_subdirectory(vendor/twitcurl/libtwitcurl) + include_directories(vendor/twitcurl/libtwitcurl) + add_executable(rawr-ebooks ebooks.cpp kgramstats.cpp freevars.cpp malaprop.cpp) + target_link_libraries(rawr-ebooks ${YamlCpp_LIBRARIES} twitcurl ${CURL_LIBRARIES}) +else (YamlCpp_FOUND AND 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) add_executable(rawr-gen gen.cpp kgramstats.cpp freevars.cpp malaprop.cpp) -- cgit 1.4.1