-
Notifications
You must be signed in to change notification settings - Fork 32
/
CMakeLists.txt
executable file
·53 lines (37 loc) · 1.25 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
# ____ __ ____ __
# ( _ \ / \( _ \( )
# ) __/( O )) __// (_/\
# (__) \__/(__) \____/
# This file is part of popl (program options parser lib)
# Copyright (C) 2015-2021 Johannes Pohl
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
cmake_minimum_required(VERSION 2.4)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF)
set(PROJECT_VERSION "1.3.0")
endif ()
project(popl_example)
set(PROJECT_DESCRIPTION "Header-only C++ program options parser library")
set(PROJECT_URL "https://github.com/badaix/popl")
option(BUILD_EXAMPLE "Build example (build popl_example demo)" ON)
option(BUILD_TESTS "Build tests" ON)
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
SET(CMAKE_INSTALL_INCLUDEDIR include CACHE
PATH "Output directory for header files")
endif()
include_directories(
"include"
)
install(FILES include/popl.hpp DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
if (BUILD_EXAMPLE)
add_subdirectory(example)
endif (BUILD_EXAMPLE)
if (BUILD_TESTS)
add_subdirectory(test)
endif (BUILD_TESTS)