set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(common)
add_subdirectory(gui)
add_subdirectory(Lx200)
add_subdirectory(NexStar)
add_subdirectory(Rts2)
add_subdirectory(INDI)

ADD_LIBRARY(TelescopeControl-static STATIC
    TelescopeControlGlobals.hpp
    TelescopeControl.hpp
    TelescopeControl.cpp
    TelescopeClient.hpp
    TelescopeClient.cpp
    ../resources/TelescopeControl.qrc
    )

SET_TARGET_PROPERTIES(TelescopeControl-static PROPERTIES OUTPUT_NAME "TelescopeControl")

TARGET_LINK_LIBRARIES(TelescopeControl-static
    Qt5::Core
    Qt5::Widgets
    Qt5::SerialPort
    TelescopeControl_gui
    TelescopeControl_Lx200
    TelescopeControl_INDI
    TelescopeControl_NexStar
    TelescopeControl_Rts2
    TelescopeControl_common
    )

SET_TARGET_PROPERTIES(TelescopeControl-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins TelescopeControl-static)

