-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (35 loc) · 1.26 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
# Copyright (c) 2019 Eleftherios Avramidis <[email protected]>
#
# Distributed under The MIT License (MIT)
# See accompanying file LICENSE
#---------------------------------------------------------------------------//
cmake_minimum_required(VERSION 3.15.3)
project(cxxplot
VERSION 0.0.1
DESCRIPTION "C++ plot library."
HOMEPAGE_URL "https://github.com/avramidis/cxxplot")
# Set default visibility to hidden for all targets
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
# Project dependencies
include(cmake/ProjectDependencies.cmake)
# Project settings
include(cmake/StandardProjectSettings.cmake)
add_library(cxxplot_project_options INTERFACE)
target_compile_features(cxxplot_project_options INTERFACE cxx_std_17)
# Standard compiler warnings
add_library(cxxplot_project_warnings INTERFACE)
include(cmake/CompilerWarnings.cmake)
set_project_warnings(cxxplot_project_warnings)
add_subdirectory(source)
include(GenerateExportHeader)
generate_export_header(cxxplot)
option(CXXPLOT_ENABLE_EXAMPLES "Enable examples" OFF)
option(CXXPLOT_ENABLE_TESTS "Enable tests" OFF)
if (CXXPLOT_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif ()
if (CXXPLOT_ENABLE_TESTS)
enable_testing()
add_subdirectory(tests)
endif ()