Closed qmfrederik closed 5 months ago
Does this change the install location on *NIX? If the .so files are not installed in $PREFIX/lib, the loader won’t find them (unless you link with an rpath).
No, that shouldn't be the case -- on Windows, libraries are categorized as RUNTIME
, so they go into /bin
, whereas on *nix, they qualify as LIBRARY
, and the go into /lib
. See https://cmake.org/cmake/help/latest/command/install.html#targets .
I double-checked, on Linux, the .so
files go into lib/
, which is the intended behavior:
vagrant@vagrant:~/git/libobjc2/build$ git status
On branch bin-install-path
Your branch is up to date with 'origin/bin-install-path'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
./
nothing added to commit but untracked files present (use "git add" to track)
vagrant@vagrant:~/git/libobjc2/build$ DESTDIR=./out cmake --install .
-- Install configuration: ""
-- Up-to-date: ./out/usr/local/lib/libobjc.so.4.6
-- Up-to-date: ./out/usr/local/lib/libobjc.so
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/Availability.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/Object.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/Protocol.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/blocks_private.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/blocks_runtime.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/capabilities.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/developer.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/encoding.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/hooks.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/message.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-api.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-arc.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-auto.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-class.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-exception.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-runtime.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc-visibility.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/objc.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/runtime-deprecated.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/runtime.h
-- Up-to-date: ./out/usr/local/include/GNUstep/objc/slot.h
-- Up-to-date: ./out/usr/local/include/GNUstep/Block.h
-- Up-to-date: ./out/usr/local/include/GNUstep/Block_private.h
-- Up-to-date: ./out/usr/local/lib/pkgconfig/libobjc.pc
vagrant@vagrant:~/git/libobjc2/build$
By default, the
RUNTIME
files are installed inLIB_INSTALL_PATH
, which defaults toCMAKE_INSTALL_LIBDIR
. Change that toBIN_INSTALL_PATH
and have it default toCMAKE_INSTALL_BINDIR
, so thatobjc.dll
is installed intobin/objc.dll
on msys2/mingw.See https://github.com/msys2/MINGW-packages/pull/19948#issuecomment-1928034043