From da3bc860f66d34f233028e819beee32dd1c43dd8 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Jan 2018 16:49:54 -0500 Subject: Modernized project This rewrite brings the codebase of this project more in line with the format of the other bots, including things like C++ randomization, better abstraction, use of exceptions, etc. Notably, any FFMPEG objects that get allocated are wrapped in simple objects so that they get properly destroyed if an exception is thrown. Some more error detection and cleanliness stuff can probably be done but my wrists really hurt. Also updated librawr, and thus also removed the yaml-cpp submodule. --- CMakeLists.txt | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 70a9572..efafdaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,22 +1,34 @@ cmake_minimum_required (VERSION 3.1) project (sap) -set(CMAKE_BUILD_TYPE Debug) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") find_package(FFMPEG REQUIRED) -include_directories(${FFMPEG_INCLUDE_DIRS}) find_package(PkgConfig) +pkg_check_modules(yaml-cpp yaml-cpp REQUIRED) pkg_check_modules(GraphicsMagick GraphicsMagick++ REQUIRED) -include_directories(${GraphicsMagick_INCLUDE_DIRS}) -link_directories(${GraphicsMagick_LIBRARY_DIRS}) add_subdirectory(vendor/rawr-ebooks EXCLUDE_FROM_ALL) -include_directories(vendor/rawr-ebooks vendor/rawr-ebooks/vendor/libtwittercpp/src vendor/rawr-ebooks/vendor/yaml-cpp/include) -add_executable(sap sap.cpp) +include_directories( + ${FFMPEG_INCLUDE_DIRS} + vendor/rawr-ebooks + vendor/rawr-ebooks/vendor/libtwittercpp/src + ${yaml-cpp_INCLUDE_DIRS} + ${GraphicsMagick_INCLUDE_DIRS}) + +link_directories( + ${yaml-cpp_LIBRARY_DIRS} + ${GraphicsMagick_LIBRARY_DIRS}) + +add_executable(sap sap.cpp director.cpp designer.cpp main.cpp) set_property(TARGET sap PROPERTY CXX_STANDARD 11) set_property(TARGET sap PROPERTY CXX_STANDARD_REQUIRED ON) -target_link_libraries(sap rawr twitter++ ${FFMPEG_LIBRARIES} ${GraphicsMagick_LIBRARIES} yaml-cpp) + +target_link_libraries(sap + rawr + twitter++ + ${FFMPEG_LIBRARIES} + ${GraphicsMagick_LIBRARIES} + ${yaml-cpp_LIBRARIES}) -- cgit 1.4.1