[Cmake] Two (related) questions

Bill Hoffman bill . hoffman at kitware . com
Mon, 26 Aug 2002 08:27:26 -0400


In new cmake syntax:
SET(mysources Entrypoint.cxx)
IF(WIN32)
  SET(mysources ${mysources} Something.def)
ENDIF(WIN32)

For the renaming problem, you can use a custom command to copy the
shared library after it is built to a new name.

-Bill


At 06:23 PM 8/25/2002 +0100, Geoffrey Cross wrote:

>1) 
>
>In order to build a shared library under Windows, I have a set of
>CMakeLists along the following lines:
>
>ADD_LIBRARY(alibrary SHARED my_sources)
>
>SOURCE_FILES(mysources
>   Entrypoint.cxx
>   Something.def
>)
>
>The .def fine is necessary in order to define the entry point for the
>shared library under Windows.  However, under unix this doesn't work
>because whilst the build stage ignores the .def file, the link stage
>seems to assume that something.def has been compiled to something.o.
>The make output looks like this:
>
>c++ -o Entrypoint.o
>c++ -o alibrary.so Entrypoint.o Something.o
>c++: Something.o: No such file or directory
>
>2)
>
>I'd like to build a shared library under unix with something other than
>a .so extension (I actually want a .mexgl extension because that's what
>matlab expects).  How do I change the target build name for a shared
>library?
>
>
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at public . kitware . com
>http://public . kitware . com/mailman/listinfo/cmake