cmake_minimum_required (VERSION 3.0)

project(json-cpp)

set (CMAKE_CXX_STANDARD 11)

include_directories(include)

file(
	GLOB
	source_files
	src/lib_json/json_reader.cpp
	src/lib_json/json_value.cpp
	src/lib_json/json_writer.cpp
)

set(CMAKE_CXX_FLAGS "-Wall -Wextra -pedantic -Werror=strict-aliasing")

add_library(
        json-cpp
        SHARED
        ${source_files}
)

install (TARGETS json-cpp LIBRARY DESTINATION local/lib)

file (GLOB headers include/jsoncpp/*)
install (FILES ${headers} DESTINATION include/jsoncpp)
