ncdc/libdc/CMakeLists.txt

58 lines
1.2 KiB
CMake
Raw Normal View History

2019-06-25 14:52:38 +02:00
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
SET(TARGET "dc")
SET(DC_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE STRING
"Discord API include directories"
)
SET(DC_LIBRARIES "${TARGET}" CACHE STRING "Discord API libraries")
SET(SOURCES
"include/dc/account.h"
"include/dc/api.h"
"include/dc/apisync.h"
2019-07-04 20:58:08 +02:00
"include/dc/channel.h"
2019-07-08 23:29:08 +02:00
"include/dc/gateway.h"
2019-06-25 18:20:27 +02:00
"include/dc/guild.h"
"include/dc/loop.h"
"include/dc/message.h"
2019-06-25 14:52:38 +02:00
"include/dc/refable.h"
"include/dc/util.h"
"src/account.c"
"src/api.c"
2019-07-08 13:04:53 +02:00
"src/api-auth.c"
2019-07-05 13:37:50 +02:00
"src/api-channel.c"
"src/api-friends.c"
2019-07-08 23:29:08 +02:00
"src/api-user.c"
2019-06-25 14:52:38 +02:00
"src/apisync.c"
2019-07-04 20:58:08 +02:00
"src/channel.c"
2019-07-08 23:29:08 +02:00
"src/gateway.c"
2019-06-25 18:20:27 +02:00
"src/guild.c"
"src/loop.c"
2019-07-08 23:29:08 +02:00
"src/masking.c"
"src/message.c"
2019-06-25 14:52:38 +02:00
"src/refable.c"
"src/util.c"
)
INCLUDE_DIRECTORIES("include"
${JANSSON_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
${EVENT_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS}
)
LINK_DIRECTORIES(${JANSSON_LIBRARY_DIRS}
${CURL_LIBRARY_DIRS}
${EVENT_LIBRARY_DIRS}
${GLIB2_LIBRARY_DIRS}
)
ADD_LIBRARY(${TARGET} SHARED ${SOURCES})
TARGET_LINK_LIBRARIES(${TARGET}
${JANSSON_LIBRARIES}
${CURL_LIBRARIES}
${EVENT_LIBRARIES}
${GLIB2_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)