I am building static and dynamic libraries on multiple UNIX and Windows platforms. On UNIX, the libraries are getting built with the 'lib' prefix, but on windows the 'lib' prefix is not getting added to the libraries.
I could add the 'lib' prefix for building libraries on Windows as below:
set_target_properties( <TARGET>
PROPERTIES
PREFIX "${PREFIX}lib"
IMPORT_PREFIX "${IMPORT_PREFIX}lib")
The problem is I have to do this for each and every target.
Is there a better way of doing this, maybe there is a way to enable the 'lib' prefix?