# This is automatically generated file using CogUnixConfig on 14 December 2013 3:39:56.18 pm
cmake_minimum_required(VERSION 2.6.2)
project("CogVM")
include(directories.cmake)
message("${CMAKE_MODULE_PATH}")
set(CMAKE_CONFIGURATION_TYPES Release)
include_directories(${targetPlatform}/plugins/B3DAcceleratorPlugin)
include_directories(${crossDir}/vm ${srcVMDir} ${targetPlatform}/vm ${buildDir})
add_definitions( -DLSB_FIRST=1 -DUSE_GLOBAL_STRUCT=0 -DCOGMTVM=0 -m32 -DENABLE_FAST_BLT  -g0 -O2 -fno-tree-pre -fno-caller-saves -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DDEBUGVM=0)
add_custom_command(OUTPUT version.c
		COMMAND ${platformsDir}/unix/config/verstamp version.c gcc
		COMMENT "Generating version.c"
	)
set(coreSources  ${srcVMDir}/cogit.c ${srcVMDir}/gcc3x-cointerp.c)
set(platformVMSources  ${targetPlatform}/vm/aio.c ${targetPlatform}/vm/debug.c ${targetPlatform}/vm/osExports.c ${targetPlatform}/vm/sqUnixCharConv.c ${targetPlatform}/vm/sqUnixExternalPrims.c ${targetPlatform}/vm/sqUnixHeartbeat.c ${targetPlatform}/vm/sqUnixMain.c ${targetPlatform}/vm/sqUnixMemory.c ${targetPlatform}/vm/sqUnixThreads.c ${targetPlatform}/vm/sqUnixVMProfile.c)
set(crossVMSources  ${crossDir}/vm/sqHeapMap.c ${crossDir}/vm/sqTicker.c ${crossDir}/vm/sqExternalSemaphores.c ${crossDir}/vm/sqNamedPrims.c ${crossDir}/vm/sqVirtualMachine.c)
set(extraSources version.c)
add_executable(CogVM  ${coreSources} ${crossVMSources} ${platformVMSources} ${extraSources})
add_subdirectory("ADPCMCodecPlugin")
add_subdirectory("AsynchFilePlugin")
add_subdirectory("B2DPlugin")
add_subdirectory("BitBltPlugin")
add_subdirectory("BMPReadWriterPlugin")
add_subdirectory("CroquetPlugin")
add_subdirectory("ZipPlugin")
add_subdirectory("DropPlugin")
add_subdirectory("DSAPrims")
add_subdirectory("FFTPlugin")
add_subdirectory("FileCopyPlugin")
add_subdirectory("FilePlugin")
add_subdirectory("FloatArrayPlugin")
add_subdirectory("FloatMathPlugin")
add_subdirectory("IA32ABI")
add_subdirectory("JoystickTabletPlugin")
add_subdirectory("Klatt")
add_subdirectory("LargeIntegers")
add_subdirectory("Matrix2x3Plugin")
add_subdirectory("MIDIPlugin")
add_subdirectory("MiscPrimitivePlugin")
add_subdirectory("Mpeg3Plugin")
add_subdirectory("SecurityPlugin")
add_subdirectory("SerialPlugin")
add_subdirectory("SocketPlugin")
add_subdirectory("SoundCodecPrims")
add_subdirectory("SoundPlugin")
add_subdirectory("StarSqueakPlugin")
add_subdirectory("SurfacePlugin")
add_subdirectory("LocalePlugin")
add_subdirectory("ImmX11Plugin")
add_subdirectory("UnixOSProcessPlugin")
add_dependencies(CogVM B3DAcceleratorPlugin)
add_subdirectory("B3DAcceleratorPlugin")
add_dependencies(CogVM SqueakFFIPrims)
add_subdirectory("SqueakFFIPrims")
add_dependencies(CogVM JPEGReaderPlugin)
add_subdirectory("JPEGReaderPlugin")
add_dependencies(CogVM JPEGReadWriter2Plugin)
add_subdirectory("JPEGReadWriter2Plugin")
add_dependencies(CogVM RePlugin)
add_subdirectory("RePlugin")
add_dependencies(CogVM InternetConfigPlugin)
add_subdirectory("InternetConfigPlugin")
add_dependencies(CogVM FT2Plugin)
add_subdirectory("FT2Plugin")
target_link_libraries(CogVM  ADPCMCodecPlugin AsynchFilePlugin B2DPlugin BitBltPlugin BMPReadWriterPlugin CroquetPlugin ZipPlugin DropPlugin DSAPrims FFTPlugin FileCopyPlugin FilePlugin FloatArrayPlugin FloatMathPlugin IA32ABI JoystickTabletPlugin Klatt LargeIntegers Matrix2x3Plugin MIDIPlugin MiscPrimitivePlugin Mpeg3Plugin SecurityPlugin SerialPlugin SocketPlugin SoundCodecPrims SoundPlugin StarSqueakPlugin SurfacePlugin LocalePlugin UnixOSProcessPlugin)
set_target_properties(CogVM PROPERTIES LINK_FLAGS "-m32")
set_source_files_properties( ${srcVMDir}/cogit.c PROPERTIES 
		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer -momit-leaf-frame-pointer -mno-rtd -mno-accumulate-outgoing-args")
set_source_files_properties( ${targetPlatform}/vm/sqUnixHeartbeat.c PROPERTIES 
		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer -mno-rtd -mno-accumulate-outgoing-args")
list(APPEND LINKLIBS m)
list(APPEND LINKLIBS dl)
list(APPEND LINKLIBS pthread)
set(EXECUTABLE_OUTPUT_PATH "/root/cogvm_scripts/pharo-build/cog/results")
add_subdirectory("vm-display-null")
add_subdirectory("vm-display-X11")
add_subdirectory("vm-sound-ALSA")
add_subdirectory("vm-sound-null")
target_link_libraries(CogVM ${LINKLIBS})
