CMake
FossilOrigin-Name: 54a80af32b1632c011476138cb702c2ac25316620b13fa4fade5187c4c502044
This commit is contained in:
parent
44b1e64c67
commit
0b87c70d33
3 changed files with 69 additions and 0 deletions
|
@ -3,3 +3,4 @@ src/*.o
|
|||
*.a
|
||||
docs/html/
|
||||
docs/latex/
|
||||
build/
|
||||
|
|
50
CMakeLists.txt
Normal file
50
CMakeLists.txt
Normal file
|
@ -0,0 +1,50 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(mastodont-c
|
||||
VERSION 0.0
|
||||
DESCRIPTION "Terrible library for Mastodon and Pleroma 'n Friends"
|
||||
LANGUAGES C)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
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
|
||||
-lmastodont
|
||||
${CURL_LDFLAGS_OTHER}
|
||||
)
|
||||
|
||||
target_include_directories(mastodont-c PUBLIC include/)
|
||||
|
18
cmake/FindMastodont.cmake
Normal file
18
cmake/FindMastodont.cmake
Normal file
|
@ -0,0 +1,18 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindMastodont
|
||||
--------
|
||||
|
||||
Find the Mastodont library.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following variables:
|
||||
|
||||
``CURL_FOUND``
|
||||
``CURL_INCLUDE_DIRS``
|
||||
``CURL_LIBRARIES``
|
||||
``CURL_VERSION_STRING``
|
||||
|
||||
#]=======================================================================]
|
||||
|
Loading…
Reference in a new issue