From d20f86829822dd069e6b257729b229ec129b185a Mon Sep 17 00:00:00 2001 From: nekobit Date: Fri, 6 Jan 2023 04:24:03 +0000 Subject: [PATCH] Commit some old code FossilOrigin-Name: 97ae2bdaee07382649c07e800fe89d61c640c741627302a0e421822bffa8a8bb --- CMakeLists.txt | 7 ++++--- src/main.c | 2 +- src/path.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86ff5ed..3fb1bf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,13 +10,15 @@ project(treebird DESCRIPTION "A very lightweight and beautiful Pleroma frontend" LANGUAGES C) + # Import local build if it exists. # This is a current solution unless distributions provide their own packages if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/mastodont-c") - include(mastodont-c/cmake/mastodont-config.cmake) +# include(mastodont-c/cmake/mastodont-config.cmake) else() - find_package(MASTODONT REQUIRED) + find_package(Mastodont REQUIRED CONFIG) endif() +message("${CMAKE_PREFIX_PATH} ${MASTODONT_INCLUDE_DIR}") add_executable(treebird ${SRC_FILES}) @@ -123,5 +125,4 @@ target_include_directories(treebird PUBLIC target_link_libraries(treebird PUBLIC ${PERL_LIBRARIES} ${CURL_LIBRARIES} - ${MASTODONT_LIBRARIES}) diff --git a/src/main.c b/src/main.c index 854dd49..716d580 100644 --- a/src/main.c +++ b/src/main.c @@ -8,7 +8,7 @@ #include #include #include "memory.h" -#include +#include #include #include "../config.h" #include "index.h" diff --git a/src/path.c b/src/path.c index d3cc1cc..8f49501 100644 --- a/src/path.c +++ b/src/path.c @@ -134,7 +134,7 @@ int handle_paths(REQUEST_T req, for (size_t i = 0; i < paths_len; ++i) { if ((res = parse_path(req, ssn, api, paths + i)) != -1) - return; + return res; } // Fell out, return 404