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(WIN32 AND NOT UNIX) file(GLOB DLLs *.dll) file(GLOB ICOs *.ico) install(FILES ${DLLs} ${ICOs} DESTINATION ${target_library_install_dir})endif(WIN32 AND NOT UNIX)