-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
27 lines (21 loc) · 1007 Bytes
/
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
cmake_minimum_required(VERSION 3.11)
project(KLSXX)
kls_add_library_module(kls.io klsxx::io)
kls_public_source_directory(kls.io Common/Published)
kls_module_source_directory(kls.io Common/Module)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
message("Configuring Linux 5 Specific Source. Note that kernel version < 5.6 will not work")
kls_public_source_directory(kls.io Linux5/Published)
kls_module_source_directory(kls.io Linux5/Module)
include(FindPkgConfig)
pkg_check_modules(liburing REQUIRED IMPORTED_TARGET GLOBAL liburing>=2.0)
target_link_libraries(kls.io PRIVATE PkgConfig::liburing)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
message("Configuring NTOS Specific Source")
kls_public_source_directory(kls.io NTOS/Published)
kls_module_source_directory(kls.io NTOS/Module)
target_link_libraries(kls.io PRIVATE ws2_32 mswsock)
endif()
target_link_libraries(kls.io PUBLIC kls.essential kls.coroutine kls.thread)
kls_define_tests(tests.kls.io kls.io Tests)