cmake_minimum_required(VERSION 3.28)

include(whale)

set(MODULE_NAME pyxel)

whl_project(${MODULE_NAME} VERSION 0.4.0)


###############################################################################
# Dependencies

# NOTE: Update config.cmake.in when changing dependencies.

find_package(nlohmann_json REQUIRED CONFIG)
find_package(whale-core CONFIG)


###############################################################################
# Library

whl_add_library(${MODULE_NAME})

whl_add_sources(${MODULE_NAME}
  PRIVATE
    "include/whale/pyxel/fwd.h"
    "include/whale/pyxel/pyxel.h"
    
    "src/pyxel.cpp"
)

whl_link_libraries(${MODULE_NAME}
  PRIVATE
    nlohmann_json::nlohmann_json
)

whl_link_whale_libraries(${MODULE_NAME}
  core
)

whl_install(${MODULE_NAME})


###############################################################################
# Tests

add_subdirectory("test")


###############################################################################
# Examples

add_subdirectory("example")
