cmake_minimum_required(VERSION 3.15)
project(PackageTest CXX)

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

find_package(hunspell CONFIG REQUIRED)

add_executable(example src/example.cpp)
target_include_directories(example PRIVATE hunspell)
target_link_libraries(example hunspell::hunspell)

set(DICTIONARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dictionaries")
target_compile_definitions(example PRIVATE DICTIONARY_DIR="${DICTIONARY_DIR}")
