##
#  CMakeLists.txt
#
#  Copyright (C) 2014 SDML (www.sdml.info)
#
#  This file is part of the srcSAX.
#
#  The srcSAX is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  The srcSAX is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with the srcSAX; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

cmake_minimum_required(VERSION 3.28)
project(print_callbacks LANGUAGES CXX)

file(GLOB PRINT_CALLBACKS_SOURCE *.cpp)
file(GLOB PRINT_CALLBACKS_HEADER *.hpp)

# Use the installed srcSAX package; shared is the default.
# For static linking: find_package(srcSAX REQUIRED COMPONENTS static)
if(NOT TARGET srcSAX::LibsrcSAX)
    find_package(srcSAX REQUIRED)
endif()

add_executable(print_callbacks ${PRINT_CALLBACKS_SOURCE} ${PRINT_CALLBACKS_HEADER})
target_link_libraries(print_callbacks PRIVATE srcSAX::LibsrcSAX)
