generated from otreblan/hello
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
82 lines (71 loc) · 1.84 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# A C++ template
# Copyright © 2019-2020 otreblan
#
# hello is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# hello is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with hello. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.13.0)
project(hello
VERSION 1.7
DESCRIPTION "A C++ template"
HOMEPAGE_URL "https://github.com/otreblan/hello"
LANGUAGES "CXX"
)
# Without this, paths are not relative in the sources list
cmake_policy(SET CMP0076 NEW)
include(GNUInstallDirs)
include(FindPkgConfig)
# The program itself
add_executable(${PROJECT_NAME})
# Version for the library symlinks
set_target_properties(${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 17
)
# Headers
target_include_directories(${PROJECT_NAME}
PRIVATE ${PROJECT_SOURCE_DIR}/include
)
# Sources list
add_subdirectory(src)
## Libraries
#pkg_check_modules(RAPIDJSON REQUIRED RapidJSON)
#include(FindBoost)
#
## Header path
#target_include_directories(${PROJECT_NAME}
#PUBLIC
#${RAPIDJSON_INCLUDE_DIRS}
#${Boost_INCLUDE_DIRS}
#)
#
## Linking
#target_link_libraries(${PROJECT_NAME}
#PUBLIC
#${RAPIDJSON_LIBRARIES}
#${Boost_LIBRARIES}
#)
#
## Other flags
#target_compile_definitions(${PROJECT_NAME}
#PUBLIC
#${RAPIDJSON_CFLAGS_OTHER}
#RAPIDJSON_HAS_STDSTRING=1
#)
# Default flags
if(NOT DEFINED ENV{CXXFLAGS})
set(CMAKE_CXX_FLAGS "-Wall -Wextra -g")
endif()
# Install target
install(TARGETS ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_BINDIR}
)