# sources which should be compiled into the library
SET( SRCS dump_gsf.c 
          gsf.c 
          gsf_dec.c 
          gsf_enc.c
          gsf_indx.c )

# Build the library on 'make'
ADD_LIBRARY( gsf SHARED ${SRCS} )

# When the next line is added, it seems that when a program uses libgsf,
# it only needs to link to libgsf, and boost-thread will be linked 
# automatically. Without this line, such a program would have list both
# libgsf and boost-threads when linking
TARGET_LINK_LIBRARIES( gsf )
TARGET_INCLUDE_DIRECTORIES(gsf INTERFACE $<INSTALL_INTERFACE:include/libgsf>)


# this should be kept in sync with the binary package name
# and be updated when the ABI (not just API) changes
SET_PROPERTY(TARGET gsf PROPERTY VERSION ${LIBGSF_VERSION})
SET_PROPERTY(TARGET gsf PROPERTY SOVERSION 1)
# Install the library on 'make install'
INSTALL(TARGETS gsf EXPORT LibGSFTargets LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
