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