project(GUIdataBaseLMS LANGUAGES CXX)

common_info_for_project(GUIdataBaseLMS)

add_executable(GUIdataBaseLMS
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
testDBpgSQL.qrc
)

target_link_libraries(GUIdataBaseLMS PRIVATE Qt5::Widgets)
target_link_libraries(GUIdataBaseLMS PRIVATE Qt5::Sql)
target_link_libraries(GUIdataBaseLMS PRIVATE Qt5::Xml)
target_link_libraries(GUIdataBaseLMS PRIVATE Qt5::Network)

target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/instructors)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/trainees)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/tasks)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/docTasks)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/connectorToServer/Core)
target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/messanger)
if(PROJECT_TYPE_DEBUG)
    target_link_directories(GUIdataBaseLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/InstructorsAndTrainees)
elseif()
    target_link_directories(GUIdataBaseLMS PUBLIC ${REPO_PATH}/BUILDS/Release64/InstructorsAndTrainees)
endif()
target_link_libraries(GUIdataBaseLMS PRIVATE libInstructorsAndTrainees.dll)


target_include_directories(GUIdataBaseLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../DataBaseLMS)
if(PROJECT_TYPE_DEBUG)
    target_link_directories(GUIdataBaseLMS PUBLIC  ${REPO_PATH}/BUILDS/Debug64/DataBaseLMS)
elseif()
    target_link_directories(GUIdataBaseLMS PUBLIC ${REPO_PATH}/BUILDS/Release64/DataBaseLMS)
endif()
target_link_libraries(GUIdataBaseLMS PRIVATE libDataBaseLMS.dll)
