cmake_minimum_required(VERSION 3.20)

project(Tests LANGUAGES CXX)

set(CMAKE_AUTOUIC OFF)
set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTORCC OFF)

find_package(GTest)
if (GTest_FOUND)
    file(GLOB SRCS *.cpp)
    add_executable(${PROJECT_NAME} ${SRCS})
    target_link_libraries(${PROJECT_NAME}
        PRIVATE
            GTest::gtest
            LCP
        )
    target_include_directories(${PROJECT_NAME}
        PUBLIC
            ${CMAKE_CURRENT_SOURCE_DIR}
            ${GTEST_INCLUDE_DIRS} # doesn't do anything on Linux
        )
    gtest_discover_tests(${PROJECT_NAME})
endif()
