Static library with CMake.

41 views
Skip to first unread message

Nikita Mikhaylov

unread,
Aug 10, 2020, 9:18:41 AM8/10/20
to ode-users
I am new to Google Groups and maybe my previous message wasn't sent. Sorry.

Hello! I want to use your repository as a git submodule, for example.
Then build from sources everything and link statically to have no dependencies. How can I do it properly with CMake? Could you provide a simple tutorial.
I’ve noticed, that you use custom build system…

Thanks.

Oleh Derevenko

unread,
Aug 12, 2020, 10:47:56 AM8/12/20
to ode-...@googlegroups.com

A hint:
You could look up in the Git history who is the author of CMakeList.txt and try contacting them for help.

 

Oleh Derevenko

-- Skype with underscore
GPG Key Fingerprint: 2F56 32DC DCD9 B2BB 06E9 39E8 A37E 5E60 376E C691

openpgp-digital-signature.asc

Vaillancourt

unread,
Aug 12, 2020, 2:37:28 PM8/12/20
to ode-users
Did you follow a how-to-use-CMake tutorial with ODE's code that got you stuck somewhere? Getting help from a volunteer community often requires you to show what you have done so far so we could help you go further.

Markus Rickert

unread,
Aug 13, 2020, 4:49:03 AM8/13/20
to ode-...@googlegroups.com
> Hello! I want to use your repository as a git submodule, for example.
> Then build from sources everything and link statically to have no
> dependencies. How can I do it properly with CMake? Could you provide a
> simple tutorial.
> I’ve noticed, that you use custom build system…

You can configure CMake to produce a static ODE library via CMake's
BUILD_SHARED_LIBS option (on by default):

cmake -DBUILD_SHARED_LIBS=OFF <path-to-source>

I have not used ODE as a git submodule yet, but all ODE-specific options
are prefixed ODE_. You can also disable demos and tests via the options
ODE_WITH_DEMOS and ODE_WITH_TESTS.

Best regards,

Markus Rickert
Reply all
Reply to author
Forward
0 new messages