On 2013-10-31 14:46, Hendrik Sattler wrote:
Matthew Woehlke schrieb:
On 2013-10-31 05:26, Cyrille Faucheux wrote:
On the library I'm currently working on, with Visual Studio, I have
to declare some compile definition in order to get the proper
"__declspec(dllimport)" or "__declspec(dllexport)" defined (or not
defined when compiling/using a static version of this library).
This sounds like you're doing it wrong.
Not really as you can only cover the export import with this case but not
static vs. dynamic linking to that library with the same header file.
That it's usually solved with a define when linking statically
Ah, yes, I forgot. You are right, you either need to pass a define that
you are built static or else have it defined or not in a generated header.
Is it just the MYPROJECT_STATIC that you need to pass as a define? That
would indeed be a good candidate for t_c_d(PUBLIC). (I got the -
erroneous? - impression you were actually passing e.g.
-DMY_ABI=__dllspec(dllimport)...)
--
Matthew
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake