forked from goToMain/libosdp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (46 loc) · 1.56 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
#
# Copyright (c) 2019-2021 Siddharth Chandrasekaran <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
#
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
cmake_policy(SET CMP0063 NEW)
project(libosdp VERSION 1.5.0)
set(PROJECT_AUTHOR "Siddharth Chandrasekaran")
set(PROJECT_AUTHOR_EMAIL "[email protected]")
set(PROJECT_YEAR "2019")
set(PROJECT_ORG "goToMain")
set(PROJECT_URL "https://github.com/goToMain/libosdp/")
set(PROJECT_HOMEPAGE "https://libosdp.gotomain.io/")
set(PROJECT_DESCRIPTION "Open Supervised Device Protocol (OSDP) Library")
set(PROJECT_LICENSE "Apache-2.0")
## Includes
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(AddCCompilerFlag)
include(GitInfo)
include(BuildType)
include(GNUInstallDirs)
## Global settings
add_c_compiler_flag(-Wall)
add_c_compiler_flag(-Wextra)
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}/bin)
option(CONFIG_OSDP_STATIC_PD "Setup PD single statically" OFF)
# Each subdirecttory has it's own CMakeLists.txt
add_subdirectory(utils)
add_subdirectory(src)
if (NOT CONFIG_OSDP_STATIC_PD)
add_subdirectory(osdpctl)
add_subdirectory(test)
add_subdirectory(samples/c)
add_subdirectory(samples/cpp)
add_subdirectory(doc)
add_subdirectory(python)
endif()
## uninstall target
add_custom_target(uninstall
COMMAND xargs rm < ${CMAKE_BINARY_DIR}/install_manifest.txt
)
## include pacakge rules at last
include(CreatePackages)