-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
27 lines (18 loc) · 766 Bytes
/
CMakeLists.txt
File metadata and controls
27 lines (18 loc) · 766 Bytes
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
# Copyright (c) 2022 Haofan Zheng
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
cmake_minimum_required(VERSION 3.14)
project(SimpleJson VERSION 0.0.1 LANGUAGES CXX)
OPTION(SIMPLEJSON_TEST "Option to build SimpleJson test executable." OFF)
add_subdirectory(include)
set(ENV{SIMPLEJSON_HOME} ${CMAKE_CURRENT_LIST_DIR})
set(SIMPLEJSON_HOME ${CMAKE_CURRENT_LIST_DIR})
set(ENV{SIMPLEJSON_INCLUDE} $ENV{SIMPLEJSON_HOME}/include)
set(SIMPLEJSON_INCLUDE ${SIMPLEJSON_HOME}/include)
add_library(SimpleJson INTERFACE)
target_include_directories(SimpleJson INTERFACE include)
if(${SIMPLEJSON_TEST})
enable_testing()
add_subdirectory(test)
endif(${SIMPLEJSON_TEST})