#
# LDASTools filtes - A library implementing filtering algorithms
#
# Copyright (C) 2018 California Institute of Technology
#
# LDASTools filtes is free software; you may 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 (GPLv2) of the
# License or at your discretion, any later version.
#
# LDASTools filtes is distributed in the hope that it will be useful, but
# without any warranty or even the implied warranty of merchantability
# or fitness for a particular purpose. See the GNU General Public
# License (GPLv2) for more details.
#
# Neither the names of the California Institute of Technology (Caltech),
# The Massachusetts Institute of Technology (M.I.T), The Laser
# Interferometer Gravitational-Wave Observatory (LIGO), nor the names
# of its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# You should have received a copy of the licensing terms for this
# software included in the file LICENSE located in the top-level
# directory of this package. If you did not, you can view a copy at
# http://dcc.ligo.org/M1500244/LICENSE
#

#------------------------------------------------------------------------
# => 2:0:0 -- 2010.01.25
#   In preperation for 1.18.0 release of ldas
# 2:1:0 - 2017.11.06 (ldas-tools-filters-2.5.2)
#    Corrections for GCC 7.2.0 and XCode 9.0
# 3:0:0 - (ldas-tools-filters-2.6.0)
#    Removed hand rolled smart pointers in favor of boost smart pointers
# 3:1:0 - (ldas-tools-filters-2.6.7 - 2024.12.16)
#------------------------------------------------------------------------
# form: <(c)urrent>:<(r)evision>:<(a)ge
#
# 1. Update the version information only immediately before a public
#    release of your software. More frequent updates are unnecessary,
#    and only guarantee that the current interface number gets larger
#    faster.
# 2. If the library source code has changed at all since the last
#    update, then increment revision (c:r:a becomes c:r+1:a).
# 3. If any interfaces [exported functions or data] have been added,
#    removed, or changed since the last update, increment current,
#    and set revision to 0.
# 4. If any interfaces have been added since the last public
#    release, then increment age.
# 5. If any interfaces have been removed since the last public
#    release, then set age to 0.
#------------------------------------------------------------------------

set( libfilters_la_CURRENT 3 )
set( libfilters_la_REVISION 1 )
set( libfilters_la_AGE 0 )

set( libfilters_la_SOURCES
	FilterConstants.cc
	FIRLP.cc
	gcd.cc
	HannWindow.cc
	Interpolate.cc
	KaiserWindow.cc
	KFIRLP.cc
	LDASConstants.cc
	LinFilt.cc
	RectangularWindow.cc
	Resample.cc
	valarray_utils.cc
	Window.cc
  )

set( libfilters_la_LIBADD ${LDASTOOLS_LIBRARIES_FULL_PATH} )

set(HH_DIR "filters")
set( filtershhdir "${CMAKE_INSTALL_INCLUDEDIR}/${HH_DIR}" )

set( filtershh_HEADERS
	basic_array.hh
	FilterConstants.hh
	FIRLP.hh
	gcd.hh
	HannWindow.hh
	Interpolate.hh
	KaiserWindow.hh
	KFIRLP.hh
	LDASConstants.hh
	LinFilt.hh
	RectangularWindow.hh
	Resample.hh
	Sinc.hh
	valarray_utils.hh
	Window.hh
  )

cx_link_headers( ${HH_DIR} ${filtershh_HEADERS} )
cx_target_library(
  TARGET filters
  CURRENT ${libfilters_la_CURRENT}
  REVISION ${libfilters_la_REVISION}
  AGE ${libfilters_la_AGE}
  STATIC
  SOURCES ${libfilters_la_SOURCES}
  LIBRARIES ${libfilters_la_LIBADD}
  INCLUDE_DIRECTORIES BEFORE PRIVATE
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_BINARY_DIR}/include
  ${CMAKE_BINARY_DIR}
  ${LDASTOOLS_INCLUDE_DIRS}
  ABI_MESSAGE "LDAS Filters Library"
  ABI_HEADER_DIR ${HH_DIR}
  ABI_LOCAL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/${HH_DIR}
  ABI_HEADERS ${filtershh_HEADERS}
  )
install(
  FILES ${filtershh_HEADERS}
  DESTINATION "${filtershhdir}"
  )
cx_target_pkgconfig(
  ldas-tools-filters
  )
