cmake_minimum_required(VERSION 3.14)
cmake_policy(SET CMP0046 NEW)
cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0071 NEW)

project(maraiah-tycho-hermes CXX)

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

find_package(
   Qt5 5.6.0
   CONFIG
      REQUIRED
      COMPONENTS Core Widgets
)

add_library(
   maraiah-tycho-hermes
   SHARED
   $ENV{OUT_DIR}/bindings.cc
   $ENV{OUT_DIR}/bindings.h
   headers/mapprops.h
   headers/menu.h
   headers/tycho.h
   resources/resources.qrc
   source/main.cc
   source/mapprops.cc
   source/menu.cc
   ui/about.ui
   ui/mapprops.ui
   ui/mapview.ui
   ui/menu.ui
   ui/points.ui
)

set_target_properties(
   maraiah-tycho-hermes
   PROPERTIES
      CXX_STANDARD          17
      CXX_STANDARD_REQUIRED ON
)

target_include_directories(
   maraiah-tycho-hermes
   PUBLIC
      headers
      $ENV{OUT_DIR}
)

target_link_libraries(
   maraiah-tycho-hermes
   Qt5::Core
   Qt5::Widgets
)

install(TARGETS maraiah-tycho-hermes)

## EOF
