if(ENABLE_LOADER)

set(SOURCES_libloader ldt_keeper.c pe_image.c module.c ext.c win32.c
    driver.c pe_resource.c resource.c registry.c afl.c vfl.c
    wrapper.S stubs.s kludge.c)

add_library(loader STATIC ${SOURCES_libloader})

set_target_properties(loader PROPERTIES COMPILE_FLAGS
	"-D__WINE__ -DHAVE_SYS_MMAN_H=1 -DHAVE_VSSCANF=1 -DWIN32_PATH=\\\"\\\" -DTRACE\\\(...\\\)=\\\(void\\\)0 -fno-PIC -U_FILE_OFFSET_BITS -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer")

target_link_libraries(loader pthread)

endif(ENABLE_LOADER)
