This is the way I like it:
- Only call fpc on hwengine.pas, let compiler rule the dependencies
- Make hwengine.pas depend on all other source files, so 'make' always calls fpc
if(UNIX AND NOT APPLE)
configure_file(hwengine.desktop.in hwengine.desktop)
file(GLOB miscfiles *.xml *.desktop)
install(FILES ${miscfiles} DESTINATION ${SHAREPATH}/Data/misc)
endif()