######### First the LogServiceMonitor library:
INCLUDE_DIRECTORIES(
  ${OMNIORB4_INCLUDE_DIR}
  ${PROJECT_BINARY_DIR}/src/idl
  ${PROJECT_SOURCE_DIR}/src/utils
)


add_library(LogServiceMonitor STATIC
  ${PROJECT_SOURCE_DIR}/src/monitor/CoreThread.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/LogCentralComponent_impl.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/LogCentralTool_impl.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/LogOptions.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/ReadConfig.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/SendThread.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/SimpleFilterManager.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/StateManager.cc
  ${PROJECT_SOURCE_DIR}/src/monitor/TimeBuffer.cc
)
set_target_properties(LogServiceMonitor PROPERTIES COMPILE_FLAGS "-fPIC")
set (binary
  ${binary}
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/CoreThread.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/LogCentralComponent_impl.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/LogCentralTool_impl.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/LogOptions.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/ReadConfig.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/SendThread.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/SimpleFilterManager.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/StateManager.cc.o
  ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LogServiceMonitor.dir/TimeBuffer.cc.o
  PARENT_SCOPE
  )

add_dependencies(LogServiceMonitor
  LOGSERVICE_TARGET_IDL_GENERATED_HEADER_FILES
)

target_link_libraries(LogServiceMonitor
  LogServiceUtils
  LogCorba
  ${OMNIORB4_LIBRARIES}
)


######### Then the LogCentral executable:
add_executable(LogCentral LogCentral.cc)
target_link_libraries(LogCentral
  LogForwarderUtils
)
install(TARGETS LogCentral DESTINATION ${BIN_INSTALL_DIR})
