add_library(cpf_state STATIC)
target_include_directories(cpf_state PUBLIC .)
target_sources(cpf_state PRIVATE
	StateBase.cpp
	StateBase.hpp
	StateVariables.cpp
	StateVariables.hpp
	FirstState/FirstState.cpp
	FirstState/FirstState.hpp
	SecondState/SecondState.cpp
	SecondState/SecondState.hpp
)

# The reason this is needed is that some libraries are linked whole,
# and cmake is not respecting linker ordering for these...
# but always puts link-whole at the end.
target_sources(cpf_state INTERFACE
	CPFEventProcessing.cpp
)
target_link_libraries(cpf_state PUBLIC cpf_devices_include_dep logger_include_dep bsp_include_dep error_handler_include_dep cpf_interfaces_include_dep)
target_link_libraries(cpf_state PRIVATE SDLogger_include_dep) # TODO: eliminate when the config file isn't read by SDLogger
target_link_libraries(cpf_state PRIVATE error_handler_include_dep)

add_library(cpf_state_include_dep INTERFACE)
target_include_directories(cpf_state_include_dep INTERFACE .)

add_library(cpf_state_tests INTERFACE)
target_include_directories(cpf_state_tests INTERFACE .)
target_sources(cpf_state_tests INTERFACE

)
