# Until we hit a stable release, we'll make all compilations do debug output
set(DEBUG "TRUE" CACHE BOOL "Compile with debug optimizations?")
if (DEBUG)
  set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "DEBUG")
endif()

IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")

set(INCLUDE_EXT_INPUTS "FALSE" CACHE BOOL "Indicates whether to compile the external audio inputs into the plugin")
if (INCLUDE_EXT_INPUTS)
  set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "INCLUDE_EXT_INPUTS")
endif()

set(PEG_COMMAND lv2peg CACHE STRING "Specifies how to execute the lv2peg command")
message(STATUS "PEG_COMMAND = ${PEG_COMMAND}")

set(LV2_INSTALL_DIR lib/lv2 CACHE PATH "Specifies where the LV2 libraries should be installed")
message(STATUS "LV2_INSTALL_DIR = ${LV2_INSTALL_DIR}")

# setup gtkmm
find_package(PkgConfig)
pkg_check_modules(GTKMM REQUIRED gtkmm-2.4)
pkg_check_modules(GDK REQUIRED gdk-2.0)
find_package(STK REQUIRED)

# process sub-libs
add_subdirectory(newt_core)
add_subdirectory(newt_widgets)
add_subdirectory(newt_lv2_gui)
add_subdirectory(newt_lv2_instr)
