-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
38 lines (25 loc) · 1.23 KB
/
CMakeLists.txt
File metadata and controls
38 lines (25 loc) · 1.23 KB
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
# Copyright 2024 Lawrence Livermore National Security, LLC and other CLIPPy
# Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
# May work with older but not yet tested
cmake_minimum_required(VERSION 3.26)
project( jsonlogic
VERSION 0.2
DESCRIPTION "A JsonLogic Interpreter for C++"
LANGUAGES CXX)
include(GNUInstallDirs)
find_package(Boost 1.80 COMPONENTS json REQUIRED)
include_directories( ${Boost_INCLUDE_DIR} )
# jsonlogic target
add_library(jsonlogic SHARED src/logic.cc)
target_compile_options(jsonlogic PUBLIC -Wall -Wextra -pedantic)
target_include_directories(jsonlogic PRIVATE include)
target_link_libraries(jsonlogic LINK_PUBLIC ${Boost_JSON_LIBRARY} )
set_target_properties(jsonlogic PROPERTIES PUBLIC_HEADER include/jsonlogic/logic.hpp)
set_property(TARGET jsonlogic PROPERTY CXX_STANDARD 17)
install(TARGETS jsonlogic LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION "include/jsonlogic")
install(FILES include/jsonlogic/details/ast-core.hpp DESTINATION "include/jsonlogic/details")
install(FILES include/jsonlogic/details/ast-full.hpp DESTINATION "include/jsonlogic/details")
#~ add_executable(examples)