-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmake
73 lines (60 loc) · 1.25 KB
/
build.cmake
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
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright(c) 2023 John Sanpe <[email protected]>
#
add_compile_options(
-std=gnu11
-Wall
-Wextra
-Wno-override-init
-Wno-unused-parameter
-Wno-sign-compare
-Wno-pointer-sign
-Wno-null-pointer-arithmetic
-Wmissing-prototypes
-Wmissing-declarations
-fvisibility=hidden
)
if(BFENV_STRICT)
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} \
-Werror"
)
endif()
include(scripts/sanitize.cmake)
configure_file(
${BFENV_MODULE_PATH}/config.h.in
${BFENV_GENERATED_PATH}/bfenv/config.h
)
configure_file(
${BFENV_MODULE_PATH}/bfenv-config.cmake.in
${BFENV_CONFIGURE}
)
file(GLOB_RECURSE BFENV_HEADER
${BFENV_HEADER_PATH}/*.h
)
file(GLOB_RECURSE BFENV_GENERATED_HEADER
${BFENV_GENERATED_PATH}/*.h
)
set(BFENV_INCLUDE_DIRS
${BFENV_HEADER_PATH}
${BFENV_GENERATED_PATH}
)
set_property(
GLOBAL PROPERTY
"BFENV_INCLUDE_DIRS"
${BFENV_INCLUDE_DIRS}
)
include_directories(${BFENV_INCLUDE_DIRS})
include(${BFENV_SOURCE_PATH}/build.cmake)
set(BFENV_LIBRARY_HEADER
${BFENV_HEADER}
${BFENV_GENERATED_HEADER}
)
set(BFENV_LIBRARY_SOURCE
${BFENV_SOURCE}
)
set(BFENV_LIBRARY
${BFENV_LIBRARY_HEADER}
${BFENV_LIBRARY_SOURCE}
)