-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
47 lines (38 loc) · 1001 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-License-Identifier: GPL-2.0-or-later */
#
# Copyright(c) 2024 Sanpe <[email protected]>
#
cmake_minimum_required(VERSION 3.12)
project(w80xprog VERSION 1.2 LANGUAGES C)
include(GNUInstallDirs)
include(CheckIncludeFiles)
set(W80XPROG_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(W80XPROG_GENERATED_PATH ${PROJECT_BINARY_DIR}/generated)
configure_file(
${W80XPROG_MODULE_PATH}/config.h.in
${W80XPROG_GENERATED_PATH}/config.h
)
add_compile_options(
-std=gnu11
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-Wno-sign-compare
-D_GNU_SOURCE
)
include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/generated
)
file(GLOB W80XPROG_SOURCE
${CMAKE_SOURCE_DIR}/src/*.h
${CMAKE_SOURCE_DIR}/src/*.c
)
include(${W80XPROG_MODULE_PATH}/bfdev.cmake)
add_executable(${CMAKE_PROJECT_NAME} ${W80XPROG_SOURCE})
target_link_libraries(${CMAKE_PROJECT_NAME} bfdev)
install(TARGETS
${CMAKE_PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)