-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
61 lines (50 loc) · 1.11 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
57
58
59
60
61
cmake_minimum_required(VERSION 3.13)
project(dswifi
LANGUAGES C
)
include(GNUInstallDirs)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${NDS_ROOT}" CACHE PATH "" FORCE)
endif()
# Define static library target
add_library(dswifi9 STATIC)
# Add compiler flags
target_compile_options(dswifi9 PRIVATE
-Wall -Werror
)
# Add include directories
target_include_directories(dswifi9 PRIVATE include)
target_sources(dswifi9 PRIVATE
source/wfc.c
source/wpa.twl.c
source/dswifi9.c
# sgIP sources
source/sgIP/sgIP.c
source/sgIP/sgIP_memblock.c
source/sgIP/sgIP_Hub.c
source/sgIP/sgIP_IP.c
source/sgIP/sgIP_ARP.c
source/sgIP/sgIP_ICMP.c
source/sgIP/sgIP_TCP.c
source/sgIP/sgIP_UDP.c
source/sgIP/sgIP_DHCP.c
source/sgIP/sgIP_DNS.c
source/sgIP/sgIP_sockets.c
)
# Install the library
install(
TARGETS dswifi9
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
# Install headers
install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING
PATTERN "*.h"
)
# Install the license
install(
FILES dswifi_license.txt
DESTINATION ${CMAKE_INSTALL_PREFIX}
)