install(TARGETS pcem RUNTIME DESTINATION ${PCEM_BIN_DIR})

install(DIRECTORY ${CMAKE_SOURCE_DIR}/nvr/ DESTINATION ${PCEM_SHARE_DIR}/nvr/default)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/430vx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/acer386)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ami286)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ami386)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ami386dx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ami486)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/amixt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ataripc3)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/bull_micral_45)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/cbm_pc10)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/cbm_sl386sx25)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/cmdpc30)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/compaq_pii)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/compaq_pip)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/dells200)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/deskpro)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/deskpro386)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/dtk)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/dtk386)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ecs386_32)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/endeavor)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/epson_pcax)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/epson_pcax2e)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/epson_pcax3)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/europc)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/fic_va503p)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ga686bx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/gd5430)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/gdc212m)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/genxt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/gw286ct)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/hot-433)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/huyndaixt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/huyndaixte)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/i8550021)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/i8555081)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/i8580111)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmat)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmpc)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmpcjr)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps1)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps1_2121)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps1_2133)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps1es)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps2_m30_286)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmps2_m70_type3)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmxt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ibmxt286)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/infowaym)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/jukopc)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/kmxc02)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/leadingedge_modelm)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ltxt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/lxt3)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/mach64gx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/megapc)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/mr386dx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ncr_pc4i)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/olivetti_m24)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/oti067)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/p55t2p4)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/p55tvp4)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/p55va)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pb410a)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pb520r)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pb570)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pb_l300sx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc1512)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc1640)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc200)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc2086)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc3086)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pc5086)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/ppc512)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/px386)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/pxxt)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/revenge)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/sis496)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/spc4200p)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/spc4216p)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/spc4620p)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/spc6000a)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/spc6033p)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/super286tr)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/t1000)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/t1200)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/t3100e)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/tandy)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/tandy1000hx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/tandy1000sl2)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/to16_pc)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/tulip_tc7)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/tvga9000b)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/voodoo3_2000)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/voodoo3_3000)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/vs440fx)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/win486)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/xi8088)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/zappa)
install(FILES ${CMAKE_SOURCE_DIR}/docs/roms.txt DESTINATION ${PCEM_SHARE_DIR}/roms/zdsupers)
install(FILES ${CMAKE_SOURCE_DIR}/docs/configs.txt DESTINATION ${PCEM_SHARE_DIR}/configs)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
	install(FILES ${CMAKE_SOURCE_DIR}/docs/pcem.man.1 DESTINATION share/man/man1 RENAME pcem.1)
endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/includes/public/ DESTINATION ${PCEM_INCLUDE_DIR} FILES_MATCHING PATTERN *.h)
