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

How to build as library? #64

Open
Journeyman1337 opened this issue Apr 24, 2020 · 3 comments
Open

How to build as library? #64

Journeyman1337 opened this issue Apr 24, 2020 · 3 comments

Comments

@Journeyman1337
Copy link

Journeyman1337 commented Apr 24, 2020

I am currently learning more about CMake, and I am wondering how I would modify Glitter so it outputs all the included libraries as static and/or dynamic libraries to include in projects along side their h files, instead of me having to work within the Glitter project within the generated solution.

@Journeyman1337 Journeyman1337 changed the title How to build as static library? How to build as library? Apr 24, 2020
@hgeist2
Copy link

hgeist2 commented Apr 24, 2020

Hi @Journeyman-dev, a total CMake noob myself, but I have been using Glitter in a small hobby project from time to time in the last years.

It seems to me you could just swap out add_executable() in the CMakeLists.txt with add_library() using the desired options, like STATIC for example.

What happens if you try that?

@Journeyman1337
Copy link
Author

Journeyman1337 commented Apr 24, 2020

I tried something like that: https://gist.github.com/Journeyman-dev/dc303ebe151db6b902c9521042d0ec77

assimp keeps putting its own library files in a different place. Also, the header files are all over the place. Seems like this is not very convenient after all.

@hgeist2
Copy link

hgeist2 commented Apr 24, 2020

Found this: https://stackoverflow.com/questions/27771347/assimp-with-cmake

Maybe it can help to include assimp in your lib?

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