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

CGAL always builds dynamic #1402

Closed
vector76 opened this issue Jun 23, 2016 · 0 comments · Fixed by #1438
Closed

CGAL always builds dynamic #1402

vector76 opened this issue Jun 23, 2016 · 0 comments · Fixed by #1438

Comments

@vector76
Copy link

I found that when attempting to build cgal with static linkage, it instead built dynamic, i.e. libCGAL.dll.a, libCGAL_Core.dll.a, libCGAL_ImageIO.dll.a, and libCGAL_Qt4.dll.a.

I believe that part of the most recent change to cgal.mk, adding
-DCGAL_BUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL)
in place of
-DBUILD_SHARED_LIBS=OFF
is incorrect.

According to CGAL manual http://doc.cgal.org/latest/Manual/installation.html#title13

Shared libraries, also called dynamic-link libraries, are built by default (.dll on Windows, .so on Linux, .dylib on MacOS). You can choose to produce static libraries instead by setting the CMake variable BUILD_SHARED_LIBS to FALSE.

So I suspect that -DCGAL_BUILD_SHARED_LIBS=ON/OFF has no effect and the shared-by-default is taking effect.

For my purpose I hard-coded static by modifying cgal.mk, but of course this is not a solution that will support both static and dynamic.

If I can figure out a solution that properly respects CMAKE_SHARED_BOOL and if I can figure out github forking and pull requests, I'll try to submit a pull request, but both are new to me.

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

Successfully merging a pull request may close this issue.

1 participant