list(APPEND LISTTEST_INCLUDES
   ${CMAKE_CURRENT_SOURCE_DIR}/token.h
   ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.h
)

list(APPEND LISTTEST_SOURCES
   ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.cpp
   ${CMAKE_CURRENT_SOURCE_DIR}/token.cpp

   ${CMAKE_CURRENT_SOURCE_DIR}/../forms/mainwindow.ui
)


# run uic to generate source
# .ui files go here
COPPERSPICE_RESOURCES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../forms/mainwindow.ui

)

add_executable(ListTest ${LISTTEST_SOURCES})

target_include_directories(ListTest
   PRIVATE
   ${CMAKE_SOURCE_DIR}/src
)

target_link_libraries(ListTest
   PRIVATE
   CopperSpice::CsCore
   CopperSpice::CsGui
)

if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   set_target_properties(ListTest PROPERTIES OUTPUT_NAME listtest)

elseif(CMAKE_SYSTEM_NAME MATCHES "(Linux|OpenBSD|FreeBSD|NetBSD|DragonFly)")
   set_target_properties(ListTest PROPERTIES OUTPUT_NAME listtest)

elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")

endif()

if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   install(TARGETS ListTest DESTINATION ../MacOS)
else()
   install(TARGETS ListTest DESTINATION .)
endif()

cs_copy_library(CsCore)
cs_copy_library(CsGui)

if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   # copy required plugins to the bundle
   cs_copy_plugins(CsGui ../plugins)
   #cs_copy_plugins(CsPrinterDriver ../plugins)
else()
   # installs required plugins
   cs_copy_plugins(CsGui)
   #cs_copy_plugins(CsPrinterDriver)
endif()

