-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (44 loc) · 1.16 KB
/
CMakeLists.txt
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
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.15)
set(CMAKE_CXX_STANDARD 17)
# `cpptube` - a port of pytube
set(PROJECT_NAME cpptube)
set(CPPTUBE_EXECUTABLE_NAME ${PROJECT_NAME}-bin)
set(CPPTUBE_SHARED_LIB_NAME ${PROJECT_NAME}-lib-shared)
set(CPPTUBE_STATIC_LIB_NAME ${PROJECT_NAME}-lib-static)
project(${PROJECT_NAME})
include_directories(${CMAKE_SOURCE_DIR}/include)
link_directories(${CMAKE_SOURCE_DIR}/lib)
add_library(${CPPTUBE_SHARED_LIB_NAME} SHARED
src/cpptube/cpptube.cpp
src/cpptube/streams.cpp
src/cpptube/monostate.cpp
src/cpptube/request.cpp
src/cpptube/query.cpp
src/cpptube/cipher.cpp
src/cpptube/extract.cpp
src/cpptube/parser.cpp
src/cpptube/helpers.cpp
src/cpptube/itags.cpp
src/cpptube/innertube.cpp
src/cpptube/exceptions.cpp
src/cpptube/logger.cpp
)
target_link_libraries(${CPPTUBE_SHARED_LIB_NAME}
stdc++fs
z
ssl
crypto
curl
)
set_target_properties(${CPPTUBE_SHARED_LIB_NAME}
PROPERTIES OUTPUT_NAME ${PROJECT_NAME}
)
add_executable(${CPPTUBE_EXECUTABLE_NAME}
src/cpptube/cli.cpp
)
target_link_libraries(${CPPTUBE_EXECUTABLE_NAME}
${CPPTUBE_SHARED_LIB_NAME}
)
set_target_properties(${CPPTUBE_EXECUTABLE_NAME}
PROPERTIES OUTPUT_NAME ${PROJECT_NAME}
)