#932 closed patch (fixed)
improve static-library build
Reported by: | basiliscos | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.10.0 |
Component: | Default | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
When I launch CMake with the following parameters:
cmake -DGEOS_BUILD_STATIC=on -DGEOS_BUILD_SHARED=off ..
it fails with the error:
CMake Error at capi/CMakeLists.txt:45 (add_dependencies): Cannot add target-level dependencies to non-existent target "geos_c". The add_dependencies works for top-level logical targets created by the add_executable, add_library, or add_custom_target commands. If you want to add file-level dependencies see the DEPENDS option of the add_custom_target and add_custom_command commands.
The provided patch makes it optional to build C API (on by default, as in master), and static library builds fine.
The geos version is 3.7.0
Attachments (1)
Change History (6)
by , 6 years ago
Attachment: | CMakeLists.txt.patch added |
---|
comment:1 by , 6 years ago
With the patch it is possible to configure CMake as
cmake -DGEOS_BUILD_STATIC=on -DGEOS_BUILD_SHARED=off -DGEOS_BUILD_CAPI=off ..
comment:2 by , 3 years ago
Milestone: | → 3.10.0 |
---|
comment:3 by , 3 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
cmake has changed a lot since this ticket, and I find that cmake -DBUILD_SHARED_LIBS=OFF
builds a libgeos.a
just fine.
Note:
See TracTickets
for help on using tickets.
CMakeLists patch to optionally build C API