-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (34 loc) · 1.15 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
#
# Copyright (c) 2020 Siddharth Chandrasekaran <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.0 FATAL_ERROR)
project(fluid VERSION 0.0.0)
set(PROJECT_YEAR 2020)
set(PROJECT_URL https://github.com/cbsiddharth/fluid)
set(PROJECT_DESCRIPTION "Liquid HTML template renderer written in C for embedded devices")
## Includes
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(GNUInstallDirs)
include(AddCCompilerFlag)
include(GitInfo)
include(BuildType)
## Global settings
add_c_compiler_flag(-Wall)
add_c_compiler_flag(-Wextra)
## Exnternal dependencies
find_package(LibYAML REQUIRED)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# FIXME: C-Utils must set these in parent scope if included as a
# sub direcrotry/
set(LIBUTILS_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/utils/include)
set(LIBUTILS_LIBRARIES utils)
add_subdirectory(utils)
add_subdirectory(src)
## uninstall target
add_custom_target(uninstall
COMMAND xargs rm < ${CMAKE_BINARY_DIR}/install_manifest.txt
)