# sources which should be compiled into the library
SET( SRCS auv_config_file.cpp 
          auv_geometry.cpp 
          auv_random.cpp 
          auv_chi_square.cpp
          auv_time.cpp
          auv_matrix.cpp
	      auv_concurrency.cpp
          auv_system.cpp
	      auv_args.cpp
          auv_map_projection.cpp )

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

# When the next line is added, it seems that when a program uses libplankton,
# it only needs to link to libplankton, and boost-thread will be linked 
# automatically. Without this line, such a program would have list both
# libplankton and boost-threads when linking
# 20170117 - not sure what is going on... but getting failures for system
# have removed the PUBLIC line and made it private and testing now
TARGET_LINK_LIBRARIES( plankton 
    PRIVATE ${Boost_SYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${UF_GEOCONV_LIBRARY} )
TARGET_INCLUDE_DIRECTORIES(plankton INTERFACE $<INSTALL_INTERFACE:include/libplankton>)


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

