Hi,<br>
<br>
I have a working build under win32 with MSYS/MINGW, now I would like to
cross-compile code for win32 with mingw from linux with by using the
same CMakelists.txt files. It almost works, the problem is that the
shared libraries are not named &quot;myex.dll&quot; but &quot;libmyex.so&quot;. By using
the following command for all the libraries it can be solved:<br>
<br>
SET_TARGET_PROPERTIES(ex1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PROPERTIES PREFIX &quot;&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SUFFIX &quot;.dll&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br>
<br>
However, now I have to change the CMakelist.txt in all the
subdirectories and lose the ability to compile natively for linux
(without adding an IF(UNIX) around the SET_TARGET_PROPERTIES).<br>
<br>
Is there a global option to set the PREFIX and SUFFIX, set the
BUILD_TARGET to win32 or something alike?<br>
<br>
I tried setting:<br>
<br>
SET(UNIX FALSE)<br>
SET(MINGW TRUE)<br>
SET(WIN32 TRUE)<br>
<br>
But that doesn't help.<br>
<br>
Any help is appreciated,<br>
<br>
Peter.