From 861433eab8b8a17e367fe07f6f63bb02acc6313b Mon Sep 17 00:00:00 2001 From: nekobit Date: Tue, 6 Dec 2022 03:10:57 +0000 Subject: [PATCH] Fix CMake file, seems to work? FossilOrigin-Name: 9cdf6228a7269da563da7133c8864f18d48fdab3845108d5054c8b2e6140dbf1 --- CMakeLists.txt | 66 +++++++++++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f06376..33b95ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,41 +4,47 @@ project(mastodont-c DESCRIPTION "Terrible library for Mastodon and Pleroma 'n Friends" LANGUAGES C) +# Useful +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +find_package(PkgConfig REQUIRED) find_package(CURL REQUIRED) add_library(mastodont-c STATIC) target_sources(mastodont-c PUBLIC - account.c - application.c - attachment.c - chats.c - emoji.c - error.c - fetch.c - history.c - hooks.c - instance.c - json_helper.c - list.c - mastodont.c - nodeinfo.c - notification.c - pleroma.c - query.c - relationship.c - request.c - scrobbles.c - search.c - status.c - tag.c - timeline.c - uri.c + src/account.c + src/application.c + src/attachment.c + src/chats.c + src/emoji.c + src/error.c + src/fetch.c + src/history.c + src/hooks.c + src/instance.c + src/json_helper.c + src/list.c + src/mastodont.c + src/nodeinfo.c + src/notification.c + src/pleroma.c + src/query.c + src/relationship.c + src/request.c + src/scrobbles.c + src/search.c + src/status.c + src/tag.c + src/timeline.c + src/uri.c + + PRIVATE + libs/cjson/cJSON.c ) target_compile_options(mastodont-c PUBLIC -Wall -Wextra -std=c99 -Wshadow -Wcast-align -Wstrict-prototypes - -Werror=implicit-function-decleration ) target_link_options(mastodont-c PUBLIC @@ -46,5 +52,11 @@ target_link_options(mastodont-c PUBLIC ${CURL_LDFLAGS_OTHER} ) -target_include_directories(mastodont-c PUBLIC include/) +target_include_directories(mastodont-c PUBLIC + include/ + ${CURL_INCLUDE_DIRS} + + PRIVATE + libs/ +)