set(ASMJIT_STATIC TRUE)

option(DSP56300_DEBUGGER "Build wxWidgets based debugger" OFF)
option(DSP56K_FORCE_INTERPRETER "Disable the JIT and use the interpreter" OFF)

add_subdirectory(asmjit)
add_subdirectory(dsp56kBase)
add_subdirectory(dsp56kEmu)
add_subdirectory(dsp56kTestRunner)
add_subdirectory(disassemble)

set_property(TARGET asmjit PROPERTY FOLDER "dsp56300")
set_property(TARGET dsp56kBase PROPERTY FOLDER "dsp56300")
set_property(TARGET dsp56kEmu PROPERTY FOLDER "dsp56300")
set_property(TARGET dsp56kTestRunner PROPERTY FOLDER "dsp56300")
set_property(TARGET dsp56kDisassemble PROPERTY FOLDER "dsp56300")

if(WIN32 OR (UNIX AND NOT APPLE))
	add_subdirectory(vtuneSdk)
	set_property(TARGET vtuneSdk PROPERTY FOLDER "dsp56300")
endif()

if(WIN32)
	add_subdirectory(HxDplugin)
	set_property(TARGET dsp56kHxD PROPERTY FOLDER "dsp56300")
endif()

if(DSP56300_DEBUGGER)
	set(wxUSE_LIBJPEG OFF)
	set(wxUSE_LIBTIFF OFF)
	set(wxUSE_REGEX OFF)
	set(wxUSE_EXPAT OFF)
	set(wxUSE_DEBUGREPORT OFF)
	set(wxUSE_LIBLZMA OFF)
	set(wxUSE_LOG OFF)
	set(wxUSE_LOGGUI OFF)
	set(wxUSE_LOGWINDOW OFF)
	set(wxUSE_CRASHREPORT OFF)
	set(wxUSE_WEBREQUEST OFF)
	set(wxUSE_WEBREQUEST_WINHTTP OFF)
	set(wxUSE_PRINTING_ARCHITECTURE OFF)
	set(wxUSE_HELP OFF)
	set(wxUSE_MS_HTML_HELP OFF)
	set(wxUSE_HTML OFF)
	set(wxUSE_WXHTML_HELP OFF)
	set(wxUSE_WXHTML_HELP OFF)
	set(wxUSE_MEDIACTRL OFF)
	set(wxUSE_SOUND OFF)
	set(wxUSE_RICHTEXT OFF)
	set(wxUSE_POSTSCRIPT OFF)

	set(wxBUILD_SHARED OFF)
	set(wxBUILD_STRIPPED_RELEASE ON)

	add_subdirectory(wxWidgets)
	add_subdirectory(dsp56kDebugger)

	set_property(TARGET dsp56kDebugger PROPERTY FOLDER "dsp56300")
endif()
