Dear All,
I’m playing with something a bit convoluted… I am setting up a custom language for my project through a set of CMakeDetermine<LANG>Compiler.cmake
, CMake<LANG>Information.cmake
, etc. modules. A bit unwillingly, but I learned a lot about CMake’s internals along the way…
I’m running into an issue now that I can just not figure out, but others may know the answer right away. On Windows the <TARGET>
keyword/placeholder in the CMAKE_<LANG>_CREATE_SHARED_LIBRARY
that I defined keeps being expanded to <target name>.dll.<version>
. Instead of just <target name>.dll
, as it is done for C++ for instance.
This is not a fatal problem at the moment, since my build just ends up creating 3 instances of my DLL right now, with names:
<target name>.dll.<version>
<target name>.dll.<soversion>
<target name>.dll
So… using a *nix naming scheme for the shared libraries.
I really don’t want to remove the VERSION
and SOVERSION
properties from my shared libraries, because
- on Linux they work fine;
- even on Windows the value of
VERSION
is still used correctly when setting up the/version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR>
argument for the linker.
What did I forget about? What else would I need to set up in “my” language’s configuration to let CMake know that shared libraries with this language should be called <target name>.dll
on windows?
Cheers,
Attila
P.S. Of course all of this is happening with the “NMake Makefiles” generator. As teaching the VS generator would require C++ changes to CMake as well, which I really want to avoid for this project.