[CMake] CMake CVS gratuitous /bin directory
Brandon J. Van Every
bvanevery at gmail.com
Thu Feb 16 19:10:25 EST 2006
Brad King wrote:
> Brandon J. Van Every wrote:
>> I'm using CMake CVS. My .dlls are being installed to
>> ${CMAKE_INSTALL_PREFIX}/bin. Everything else is being installed to
>> ${CMAKE_INSTALL_PREFIX} like I thought I told it to. Is this a bug
>> or a feature? It feels like a bug because of course things crash
>> since the .dlls aren't in the right directory. Here's my snippet:
>
> Read the documentation of the INSTALL_TARGETS command. You have to
> use the RUNTIME_DIRECTORY option to specify the location of the .dll
> part of a SHARED library. The default is /bin for SHARED libraries
> because most projects use /bin. For a MODULE or STATIC library the
> install location you specify should be used.
I note that on Cygwin and MinGW, there is no .lib component by default.
They just link to .dlls directly (and interop with MSVC generated dlls
isn't straightforward). So for those compiler targets, if I have a
target "whatever", and I say I want INSTALL_TARGETS(/ whatever), it
should put whatever.dll where I said. There is no other file to consider.
For MSVC, where one has both whatever.dll and whatever.lib, I think the
pair should not be broken up unless I explicitly specify
RUNTIME_DIRECTORY. i.e. INSTALL_TARGETS(/ whatever ...) should put them
both in /.
Also I am noticing an error that looks like a MSVC bias. I changed my
code to:
INSTALL_TARGETS(/ RUNTIME_DIRECTORY /
libchicken libuchicken libchicken-static libuchicken-static)
IF(WIN32 AND NOT CYGWIN)
INSTALL_TARGETS(/ RUNTIME_DIRECTORY /
libchicken_gui libchicken_gui-static)
ENDIF(WIN32 AND NOT CYGWIN)
My actual files are:
Brandon J. Van Every at KAHLO ~/msys/chicken-2.216
$ ls
CMakeCache.txt chicken.exe libchicken-static.a
CMakeFiles cmake_install.cmake libchicken.dll
Makefile csc.c libchicken_gui-static.a
chicken-profile.c csc.exe libchicken_gui.dll
chicken-profile.exe csc.scm libuchicken-static.a
chicken-setup.c csi-static.exe libuchicken.dll
chicken-setup.exe csi.c
chicken-static.exe csi.exe
which is the normal way that MinGW works. No stub .lib files. But the
install appears to be looking for .lib files:
Brandon J. Van Every at KAHLO ~/msys/chicken-2.216
$ make install
Running cmake script file cmake_install.cmake
-- Install configuration: "Release"
-- Installing E:/Program Files/Chicken/chicken-ffi-macros.scm
-- Installing E:/Program Files/Chicken/chicken-match-macros.scm
-- Installing E:/Program Files/Chicken/chicken-more-macros.scm
-- Installing E:/Program Files/Chicken/csibatch.bat
-- Installing E:/Program Files/Chicken/chicken.h
-- Installing E:/Program Files/Chicken/chicken.1
-- Installing E:/Program Files/Chicken/csi.1
-- Installing E:/Program Files/Chicken/csc.1
-- Installing E:/Program Files/Chicken/chicken-setup.1
-- Installing E:/Program Files/Chicken/chicken-profile.1
-- Installing E:/Program Files/Chicken/chicken.pdf
-- Installing E:/Program Files/Chicken/chicken.exe
-- Installing E:/Program Files/Chicken/chicken-profile.exe
-- Installing E:/Program Files/Chicken/chicken-setup.exe
-- Installing E:/Program Files/Chicken/chicken-static.exe
-- Installing E:/Program Files/Chicken/csc.exe
-- Installing E:/Program Files/Chicken/csi.exe
-- Installing E:/Program Files/Chicken/csi-static.exe
-- Installing E:/Program Files/Chicken/libchicken.lib
-- Installing E:/Program Files/Chicken//libchicken.dll
CMake Error: Error in cmake code at
e:/devel/msys/chicken-2.216/cmake_install.cmake:58:
FILE found file: E:/Program Files/Chicken/ where expecting directory
with the same name.
Cheers,
Brandon Van Every
More information about the CMake
mailing list