-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (49 loc) · 1.74 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
56
cmake_minimum_required(VERSION 3.28)
project(here_is_johnny_v)
set(CMAKE_CXX_STANDARD 26)
add_executable(here_is_johnny_v main.c
src/upkd/upkd.c
src/inotify_observer/inotify_observer.c
src/inotify_observer/inotify_subject.c
src/utils/file_operations.c
include/upkd/upkd.h
src/upkd/ufw_log_entry.c
include/upkd/ufw_log_entry.h
src/upkd/db.c
include/upkd/db.h
include/upkd/commands/fs_monitor_commands.h
src/upkd/commands/fs_monitor_commands.c
src/upkd/commands/file_transfer_commands.c
include/upkd/commands/file_transfer_commands.h
include/packet_builder/packet_builder.h
src/packet_builder/packet_builder.c
include/data_noise/data_noise.h
src/data_noise/data_noise.c
src/upkd/auth.c
include/upkd/auth.h
include/crypto/crypto.h
src/crypto/crypto.c
src/upkd/data_processor.c
include/upkd/data_processor.h
src/upkd/commands/system_commands.c
include/upkd/commands/system_commands.h
)
# Find the libnet library
find_library(LIBNET_LIBRARY NAMES net)
# If libnet library is found, link it to the executable
if(LIBNET_LIBRARY)
target_link_libraries(here_is_johnny_v ${LIBNET_LIBRARY})
else()
# Display an error message and stop if libnet is not found
message(FATAL_ERROR "libnet not found")
endif()
# Find the OpenSSL library
find_package(OpenSSL REQUIRED)
# If OpenSSL library is found, link it to the executable
if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(here_is_johnny_v ${OPENSSL_LIBRARIES})
else()
# Display an error message and stop if OpenSSL is not found
message(FATAL_ERROR "OpenSSL not found")
endif()