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

cmake; make install; liblib #624

Open
rburkholder opened this issue Jun 7, 2023 · 3 comments
Open

cmake; make install; liblib #624

rburkholder opened this issue Jun 7, 2023 · 3 comments

Comments

@rburkholder
Copy link
Contributor

rburkholder commented Jun 7, 2023

A few comments:

  • for cmake, in your getting started guide, it is typical to "mkdir build && cd build" then perform the cmake ..... within the build directory -- never mind on this, I see that the '-B build' does the same thing
  • once built, do you have a 'sudo make install' of some sort so that include directory is placed into /usr/local/include/ and the libs are placed in /usr/local/lib?
  • the built static files in build/ have a liblib prefix -- shouldn't they be just simply prefixed with a single 'lib'?
  • and it is these .a files I'd like to see in /usr/local/lib so I can link them across some projects
@borisbat
Copy link
Collaborator

borisbat commented Jun 8, 2023

There is cmake install. I've tested them on win64 and mac, I'm assuming its going to work fine on linux.
I got no preferences on how the project libraries are named - typical integration so far was building daScript with the project which required it. I would certainly appreciate any help with organizing this for the better workflow.

@rburkholder
Copy link
Contributor Author

Thank you for the update. As more background:

  • in your installation notes, you have a step for make daScript which seems to skip all the test stuff and just build the libraries. Which is desirable. However, if I followed that with sudo make install, it proceeds to reprocess a bunch of test stuff and do other things I don't think it needs to. So I killed that and simply referenced your final libs where they were. But it would be nice to see them in /usr/local/lib at some point.
    • it would be nice if there was an explicit make install to handle the simple installation of the libs and headers, without all the test stuff being run. perhaps a separate make test or something.
  • I think you have some CMakeLists.txt projects which have a 'lib' prefix on them. In your note in my other issue, you mention a primary target of windows & mac. So I kinda understand what happened. On linux, a quirk of the build process is to automatically prefix build libraries with a lib. And during the link process to automatically apply that to any included library lists. This would be the reason for the 'liblib' prefix probably.
    • my solution to this sort of thing for my own projects is/was to put libraries into a lib/ source sub-directory, and remove the lib prefix from the project name. It isn't as pretty from a windows platform perspective, but it conforms to the linux platform -- my suggestion for what it is worth.

@borisbat
Copy link
Collaborator

borisbat commented Jun 8, 2023

CMake has options of conditional compilation per platform. Mainly IF(WIN32), IF(APPLE) etc. So I suspect project files can be modified to do different things on linux. I'm not sure when I'll be able to get to it (I will eventually), but I will gladly accept linux PR's :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants