#this is just a basic CMakeLists.txt, for more information see the cmake manpage

#add definitions, compiler switches, etc.
#ADD_DEFINITIONS(-Wall -O2)

INCLUDE_DIRECTORIES(src/IrfPac . .. ../..)
LINK_DIRECTORIES(..)

#build a shared library
# ADD_LIBRARY(sarapac STATIC SaraPacket.cpp CenaPacket.cpp CenaSubcHkPac.cpp CenaAccumSclMatx.cpp CenaScienceDataPacket.cpp CenaSciMassAcc.cpp CenaSciTofAcc.cpp CenaSciCntrAcc.cpp SwimPacket.cpp SaraBufferedDemultiplexor.cpp SaraDemultiplexor.cpp CenaMatrix.cpp SwimSubcHkPacket.cpp)


IF (CMAKE_BUILD_TYPE STREQUAL "Debug")

#for testing the shared library you probably need some test app too
#you need cppunit library
# ADD_EXECUTABLE(CenaMatrix_test CenaMatrix_test.cpp)
# TARGET_LINK_LIBRARIES(CenaMatrix_test cppunit sarapac irfpac stdc++)

ENDIF (CMAKE_BUILD_TYPE STREQUAL "Debug")

#for sample code, without cunit
ADD_EXECUTABLE(BitBuffer_sample BitBuffer_sample.cpp)
TARGET_LINK_LIBRARIES(BitBuffer_sample)

#add an install target here
#INSTALL_FILES(...)
#INSTALL_PROGRAMS(...)
#INSTALL_TARGET(...)

# ADD_SUBDIRECTORY(SaraPac)

# INSTALL(TARGETS sarapac ARCHIVE DESTINATION ${HOME}/SARA/lib)
INSTALL(FILES encode.h BitBuffer.h 
	DESTINATION ${HOME}/SARA/include/IrfPac/Encode)
