blob: 05cbcb2630c94f0fb8c2a6687af9cd140ec1e160 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
find_package(Libcurl REQUIRED)
find_package(JsonC REQUIRED)
add_subdirectory(hash)
set(CFLAGS
-Wall -Wextra -pedantic
-Wconversion -Wshadow -Wstrict-aliasing
-Winit-self -Wcast-align -Wpointer-arith
-Wmissing-declarations -Wmissing-include-dirs
-Wno-unused-parameter -Wuninitialized
${LIBCURL_CFLAGS}
${JSONC_CFLAGS}
)
list(APPEND
CORE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/fs.c
${CMAKE_CURRENT_SOURCE_DIR}/fs.h
${CMAKE_CURRENT_SOURCE_DIR}/net.c
${CMAKE_CURRENT_SOURCE_DIR}/net.h
${CMAKE_CURRENT_SOURCE_DIR}/steam.c
${CMAKE_CURRENT_SOURCE_DIR}/steam.h
${CMAKE_CURRENT_SOURCE_DIR}/toast.c
${CMAKE_CURRENT_SOURCE_DIR}/toast.h
)
add_library(tvn OBJECT ${CORE_SOURCES})
target_compile_options(tvn PUBLIC ${CFLAGS})
target_include_directories(tvn PUBLIC ${LIBCURL_INCLUDE_DIRS})
target_include_directories(tvn PUBLIC ${JSONC_INCLUDE_DIRS})
target_include_directories(tvn PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(tvn LINK_PUBLIC ${LIBCURL_LIBRARIES})
target_link_libraries(tvn LINK_PUBLIC ${JSONC_LIBRARIES})
target_link_libraries(tvn LINK_PUBLIC md5)
if(BUILD_CLI)
add_subdirectory(cli)
endif()
if(BUILD_QT)
add_subdirectory(qt)
endif()
|