find_package(Boost COMPONENTS system REQUIRED)


include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake-modules/CopyHeaders.cmake)


set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")


CopyHeaders()
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/include/libsettings)
file(GLOB_RECURSE SOURCES "src/*.cpp")

add_library(settings STATIC ${SOURCES})


if(NOT SKIP_LIBRARY_INSTALL)
    install(DIRECTORY ${PROJECT_BINARY_DIR}/include/libsettings DESTINATION include OPTIONAL)
    install (TARGETS settings ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin OPTIONAL)
endif()

