# setup
find_package(lv2-gui REQUIRED)
include_directories(include ../newt_widgets/include ../newt_core/include ../newt_lv2_instr/include)
include_directories( ${LV2-GUI_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GDK_INCLUDE_DIRS} )
link_directories( ${GTKMM_LIBRARY_DIRS} )

# build library
add_library(newt_lv2_gui SHARED
  newt_lv2_gui.cpp
  include/config.h
  include/newt_lv2_gui.h
)
set_target_properties(newt_lv2_gui PROPERTIES PREFIX "")
if (DEBUG)
  set_target_properties(newt_lv2_gui PROPERTIES COMPILE_FLAGS "-g")
endif()
target_link_libraries(newt_lv2_gui ${LV2-GUI_LIBRARIES} ${GTKMM_LIBRARIES} newt_widgets)
add_dependencies(newt_lv2_gui newt_lv2_instr)

# install lv2 bundle
install(TARGETS newt_lv2_gui
  LIBRARY
  DESTINATION ${LV2_INSTALL_DIR}/newtonator_gtk.lv2
  NAMELINK_SKIP
  )
install(FILES bundle/manifest.ttl
  DESTINATION ${LV2_INSTALL_DIR}/newtonator_gtk.lv2
  )