-
Notifications
You must be signed in to change notification settings - Fork 353
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] Build the C API into static libs #102
Conversation
To support building (e.g., GDAL) against static libs only, add the C API to the static target. Otherwise, if building with CMake, the C API is only available in a dynamic library. In the future, this could be a lot cleaner -- e.g. with more idiomatic CMake configuration of shared vs. static builds -- but for the time being I hope this will be acceptable.
609f6fc
to
a8faed4
Compare
See #103 for a 3.6 backport of this change. |
Fixes trac #878. |
@dbaston The whole CMake configuration should be rewritten completely. It's an old-school CMake written as quick prototype for convenience of developers who'd like to develop GEOS in IDEs. It used to be marked as unofficial build setup, not sure what's its status now. Regarding @dakotahawkins 's hack, if it works it probably is fine. |
It does seem like the CMake needs a rewrite, but this capability is a much more immediate need for me personally. |
@dakotahawkins It's been years since I looked at that page. Looks like @robe2 updated it. |
Dakota you're welcome if you want to take ownership of that project
(maintainance of CMake infrastructure)
|
@strk I'm still coming up to speed on it, personally. I didn't mean what I said to sound insulting, apologies! Personally, I'm glad this project has CMake support at all! Based on looking through trac issues (two relevant issues here and here, not sure why exactly the second one is closed) it seems like there is at least some consensus on room for improvement. |
I didn't want to be insulting either, I mean it: if you want to
maintain it you are very welcome :)
|
@strk I will look at it this weekend. The thing that worries me the most is weird MacOS stuff I won't be able to try very easily. |
Sorry I missed this and I already tagged 3.6.3 and 3.7.0beta2, I've slated it for 3.6.4 |
For what it's worth we're using this in production and it's working well. |
To support building (e.g., GDAL) against static libs only, add the C API
to the static target.
Otherwise, if building with CMake, the C API is only available in a
dynamic library.
In the future, this could be a lot cleaner -- e.g. with more idiomatic
CMake configuration of shared vs. static builds -- but for the time
being I hope this will be acceptable.