2024-11-30 00:36:33 +01:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
2023-02-04 21:00:01 +01:00
|
|
|
|
2023-06-17 01:44:38 +02:00
|
|
|
include_directories("./common")
|
|
|
|
include_directories("./gcdkey")
|
2023-02-04 21:00:01 +01:00
|
|
|
|
|
|
|
file(GLOB SRCS_common
|
2023-06-17 01:44:38 +02:00
|
|
|
"./common/*.c"
|
|
|
|
"./darray.c"
|
2023-07-27 22:43:51 +02:00
|
|
|
"./gserver.c"
|
|
|
|
"./gserverlist.c"
|
2023-06-17 01:44:38 +02:00
|
|
|
"./hashtable.c"
|
|
|
|
"./md5c.c"
|
|
|
|
"./gutil.c"
|
2025-02-22 20:36:32 +01:00
|
|
|
"./gcrypt.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_gcdkey
|
2023-06-17 01:44:38 +02:00
|
|
|
"./gcdkey/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE SRCS_ghttp
|
2023-06-17 01:44:38 +02:00
|
|
|
"./ghttp/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_GP
|
2023-06-17 01:44:38 +02:00
|
|
|
"./GP/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE SRCS_gstats
|
2023-06-17 01:44:38 +02:00
|
|
|
"./gstats/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_natneg
|
2023-06-17 01:44:38 +02:00
|
|
|
"./natneg/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_pinger
|
2023-06-17 01:44:38 +02:00
|
|
|
"./pinger/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_pt
|
2023-06-17 01:44:38 +02:00
|
|
|
"./pt/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_qr2
|
2023-06-17 01:44:38 +02:00
|
|
|
"./qr2/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_sake
|
2023-06-17 01:44:38 +02:00
|
|
|
"./sake/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_sc
|
2023-06-17 01:44:38 +02:00
|
|
|
"./sc/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRCS_serverbrowsing
|
2023-06-17 01:44:38 +02:00
|
|
|
"./serverbrowsing/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB_RECURSE SRCS_webservices
|
2023-06-17 01:44:38 +02:00
|
|
|
"./webservices/*.c"
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library(gcd_common STATIC ${SRCS_common})
|
|
|
|
add_library(gcd_key STATIC ${SRCS_gcdkey})
|
2023-06-18 19:11:05 +02:00
|
|
|
#add_library(gcd_gp STATIC ${SRCS_GP})
|
|
|
|
#add_library(gcd_gstats STATIC ${SRCS_gstats})
|
2023-02-04 21:00:01 +01:00
|
|
|
add_library(gcd_natneg STATIC ${SRCS_natneg})
|
2023-06-18 19:11:05 +02:00
|
|
|
#add_library(gcd_pinger STATIC ${SRCS_pinger})
|
|
|
|
#add_library(gcd_pt STATIC ${SRCS_pt})
|
2023-02-04 21:00:01 +01:00
|
|
|
add_library(gcd_qr2 STATIC ${SRCS_qr2})
|
2023-06-18 19:11:05 +02:00
|
|
|
#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})
|
2023-02-04 21:00:01 +01:00
|
|
|
add_library(gcd INTERFACE)
|
|
|
|
|
|
|
|
set_property(TARGET gcd_common gcd_key PROPERTY POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
|
|
if(UNIX)
|
2023-02-07 21:18:17 +01:00
|
|
|
add_definitions(-D_LINUX=1)
|
2023-02-04 21:00:01 +01:00
|
|
|
endif(UNIX)
|
|
|
|
|
|
|
|
set(DEPENDENT_LIBS
|
|
|
|
gcd_key
|
2023-06-18 19:11:05 +02:00
|
|
|
# gcd_gp
|
|
|
|
# gcd_gstats
|
2023-02-04 21:00:01 +01:00
|
|
|
gcd_natneg
|
2023-06-18 19:11:05 +02:00
|
|
|
# gcd_pinger
|
|
|
|
# gcd_pt
|
2023-02-04 21:00:01 +01:00
|
|
|
gcd_qr2
|
2023-06-18 19:11:05 +02:00
|
|
|
# gcd_sake
|
|
|
|
# gcd_sc
|
|
|
|
# gcd_serverbrowsing
|
|
|
|
# gcd_webservices
|
2023-02-04 21:00:01 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(gcd INTERFACE ${DEPENDENT_LIBS})
|
|
|
|
|
|
|
|
foreach(LIB ${DEPENDENT_LIBS})
|
2023-02-05 01:38:42 +01:00
|
|
|
target_link_libraries(${LIB} PUBLIC gcd_common)
|
2023-02-04 21:00:01 +01:00
|
|
|
endforeach()
|
|
|
|
|
2025-04-22 00:47:09 +02:00
|
|
|
target_link_libraries(gcd_key PRIVATE gcd_qr2)
|
2023-02-05 01:38:42 +01:00
|
|
|
target_link_libraries(gcd_qr2 PRIVATE gcd_natneg)
|