Link and include Mastodont
FossilOrigin-Name: 2f4c7035c43f8722e279ee9d605e3b8dfb22afe70c4e66c13e98b5892e8a0b0d
This commit is contained in:
parent
a1c962a853
commit
37ec828fa2
1 changed files with 13 additions and 3 deletions
|
@ -10,11 +10,17 @@ project(treebird
|
|||
DESCRIPTION "A very lightweight and beautiful Pleroma frontend"
|
||||
LANGUAGES C)
|
||||
|
||||
# Import local build
|
||||
if(EXISTS "mastodont-c/")
|
||||
include(mastodont-c/mastodont-config.cmake)
|
||||
# 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)
|
||||
else()
|
||||
#
|
||||
find_package(MASTODONT REQUIRED)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
add_executable(treebird ${SRC_FILES})
|
||||
|
||||
# Useful
|
||||
|
@ -98,12 +104,16 @@ append_and_def(SRC_FILES
|
|||
|
||||
target_sources(treebird PUBLIC ${SRC_FILES})
|
||||
|
||||
message(${MASTODONT_INCLUDE_DIRS})
|
||||
|
||||
target_include_directories(treebird PUBLIC
|
||||
${PERL_INCLUDE_PATH}
|
||||
${MASTODONT_INCLUDE_DIRS}
|
||||
${CURL_INCLUDE_DIRS})
|
||||
|
||||
# Build! Note the mastodont hack, this _should_ change soon.
|
||||
target_link_libraries(treebird PUBLIC
|
||||
${PERL_LIBRARY}
|
||||
${CURL_LIBRARIES}
|
||||
${MASTODONT_LIBRARIES}
|
||||
mastodont-c/libmastodont.a)
|
||||
|
|
Loading…
Reference in a new issue