Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install runtime files in CMAKE_INSTALL_BINDIR when GNUstep is not installed #275

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

qmfrederik
Copy link
Collaborator

By default, the RUNTIME files are installed in LIB_INSTALL_PATH, which defaults to CMAKE_INSTALL_LIBDIR.
Change that to BIN_INSTALL_PATH and have it default to CMAKE_INSTALL_BINDIR, so that objc.dll is installed into bin/objc.dll on msys2/mingw.

See msys2/MINGW-packages#19948 (comment)

@davidchisnall
Copy link
Member

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).

@qmfrederik
Copy link
Collaborator Author

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 .

@qmfrederik
Copy link
Collaborator Author

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$

@qmfrederik qmfrederik merged commit 639c676 into gnustep:master Feb 6, 2024
51 checks passed
@qmfrederik qmfrederik deleted the bin-install-path branch February 6, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants