##*************************************************************************##
##  CUBE        http://www.scalasca.org/                                   ##
##*************************************************************************##
##  Copyright (c) 2023-2024                                                ##
##  Forschungszentrum Juelich GmbH, Juelich Supercomputing Centre          ##
##                                                                         ##
##  This software may be modified and distributed under the terms of       ##
##  a BSD-style license.  See the COPYING file in the package base         ##
##  directory for details.                                                 ##
##*************************************************************************##


#################################################################################
# json library
##################################################################################

# OBJECT libraries can be combined into a shared library
add_library(libjson_cpp_library OBJECT
    json.hpp
)
set_target_properties(libjson_cpp_library PROPERTIES
    POSITION_INDEPENDENT_CODE ON
    LINKER_LANGUAGE CXX
)

# these pathes will be propagated to internal libraries which depend on libjson_cpp_library
target_include_directories(libjson_cpp_library PUBLIC
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)

install( FILES json.hpp
  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cubelib
)
