File: CMakeLists.txt

package info (click to toggle)
openmohaa 0.81.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 29,124 kB
  • sloc: ansic: 270,865; cpp: 250,173; sh: 234; asm: 141; xml: 64; makefile: 7
file content (104 lines) | stat: -rw-r--r-- 1,799 bytes parent folder | download
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
cmake_minimum_required(VERSION 3.12)

include_directories("./common")
include_directories("./gcdkey")

file(GLOB SRCS_common
	"./common/*.c"
    "./darray.c"
    "./gserver.c"
    "./gserverlist.c"
	"./hashtable.c"
	"./md5c.c"
	"./gutil.c"
)

file(GLOB SRCS_gcdkey
"./gcdkey/*.c"
)

file(GLOB_RECURSE SRCS_ghttp
"./ghttp/*.c"
)

file(GLOB SRCS_GP
"./GP/*.c"
)

file(GLOB_RECURSE SRCS_gstats
"./gstats/*.c"
)

file(GLOB SRCS_natneg
"./natneg/*.c"
)

file(GLOB SRCS_pinger
"./pinger/*.c"
)

file(GLOB SRCS_pt
"./pt/*.c"
)

file(GLOB SRCS_qr2
"./qr2/*.c"
)

file(GLOB SRCS_sake
"./sake/*.c"
)

file(GLOB SRCS_sc
"./sc/*.c"
)

file(GLOB SRCS_serverbrowsing
"./serverbrowsing/*.c"
)

file(GLOB_RECURSE SRCS_webservices
"./webservices/*.c"
)

add_library(gcd_common STATIC ${SRCS_common})
add_library(gcd_key STATIC ${SRCS_gcdkey})
#add_library(gcd_gp STATIC ${SRCS_GP})
#add_library(gcd_gstats STATIC ${SRCS_gstats})
add_library(gcd_natneg STATIC ${SRCS_natneg})
#add_library(gcd_pinger STATIC ${SRCS_pinger})
#add_library(gcd_pt STATIC ${SRCS_pt})
add_library(gcd_qr2 STATIC ${SRCS_qr2})
#add_library(gcd_sake STATIC ${SRCS_sake})
#add_library(gcd_sc STATIC ${SRCS_sc})
#add_library(gcd_serverbrowsing STATIC ${SRCS_serverbrowsing})
#add_library(gcd_webservices STATIC ${SRCS_webservices})
add_library(gcd INTERFACE)

set_property(TARGET gcd_common gcd_key PROPERTY POSITION_INDEPENDENT_CODE ON)

if(UNIX)
	add_definitions(-D_LINUX=1)
endif(UNIX)

set(DEPENDENT_LIBS
	gcd_key
#	gcd_gp
#	gcd_gstats
	gcd_natneg
#	gcd_pinger
#	gcd_pt
	gcd_qr2
#	gcd_sake
#	gcd_sc
#	gcd_serverbrowsing
#	gcd_webservices
)

target_link_libraries(gcd INTERFACE ${DEPENDENT_LIBS})

foreach(LIB ${DEPENDENT_LIBS})
	target_link_libraries(${LIB} PUBLIC gcd_common)
endforeach()

target_link_libraries(gcd_qr2 PRIVATE gcd_natneg)