diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-01-18 16:49:54 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-01-18 16:49:54 -0500 |
commit | da3bc860f66d34f233028e819beee32dd1c43dd8 (patch) | |
tree | 8cc7f5ad0a8dad69ea5c3ae0405f803d3ba80051 /CMakeLists.txt | |
parent | 46db0368fbee4cfba97178837e62f4469c4fa884 (diff) | |
download | sap-da3bc860f66d34f233028e819beee32dd1c43dd8.tar.gz sap-da3bc860f66d34f233028e819beee32dd1c43dd8.tar.bz2 sap-da3bc860f66d34f233028e819beee32dd1c43dd8.zip |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 70a9572..efafdaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -1,22 +1,34 @@ | |||
1 | cmake_minimum_required (VERSION 3.1) | 1 | cmake_minimum_required (VERSION 3.1) |
2 | project (sap) | 2 | project (sap) |
3 | 3 | ||
4 | set(CMAKE_BUILD_TYPE Debug) | ||
5 | |||
6 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") | 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") |
7 | 5 | ||
8 | find_package(FFMPEG REQUIRED) | 6 | find_package(FFMPEG REQUIRED) |
9 | include_directories(${FFMPEG_INCLUDE_DIRS}) | ||
10 | 7 | ||
11 | find_package(PkgConfig) | 8 | find_package(PkgConfig) |
9 | pkg_check_modules(yaml-cpp yaml-cpp REQUIRED) | ||
12 | pkg_check_modules(GraphicsMagick GraphicsMagick++ REQUIRED) | 10 | pkg_check_modules(GraphicsMagick GraphicsMagick++ REQUIRED) |
13 | include_directories(${GraphicsMagick_INCLUDE_DIRS}) | ||
14 | link_directories(${GraphicsMagick_LIBRARY_DIRS}) | ||
15 | 11 | ||
16 | add_subdirectory(vendor/rawr-ebooks EXCLUDE_FROM_ALL) | 12 | add_subdirectory(vendor/rawr-ebooks EXCLUDE_FROM_ALL) |
17 | include_directories(vendor/rawr-ebooks vendor/rawr-ebooks/vendor/libtwittercpp/src vendor/rawr-ebooks/vendor/yaml-cpp/include) | ||
18 | 13 | ||
19 | add_executable(sap sap.cpp) | 14 | include_directories( |
15 | ${FFMPEG_INCLUDE_DIRS} | ||
16 | vendor/rawr-ebooks | ||
17 | vendor/rawr-ebooks/vendor/libtwittercpp/src | ||
18 | ${yaml-cpp_INCLUDE_DIRS} | ||
19 | ${GraphicsMagick_INCLUDE_DIRS}) | ||
20 | |||
21 | link_directories( | ||
22 | ${yaml-cpp_LIBRARY_DIRS} | ||
23 | ${GraphicsMagick_LIBRARY_DIRS}) | ||
24 | |||
25 | add_executable(sap sap.cpp director.cpp designer.cpp main.cpp) | ||
20 | set_property(TARGET sap PROPERTY CXX_STANDARD 11) | 26 | set_property(TARGET sap PROPERTY CXX_STANDARD 11) |
21 | set_property(TARGET sap PROPERTY CXX_STANDARD_REQUIRED ON) | 27 | set_property(TARGET sap PROPERTY CXX_STANDARD_REQUIRED ON) |
22 | target_link_libraries(sap rawr twitter++ ${FFMPEG_LIBRARIES} ${GraphicsMagick_LIBRARIES} yaml-cpp) | 28 | |
29 | target_link_libraries(sap | ||
30 | rawr | ||
31 | twitter++ | ||
32 | ${FFMPEG_LIBRARIES} | ||
33 | ${GraphicsMagick_LIBRARIES} | ||
34 | ${yaml-cpp_LIBRARIES}) | ||