Skip to content

Commit

Permalink
Updated CMake configuration to use libgeos.lib for static library and…
Browse files Browse the repository at this point in the history
… geos.lib for import library. Define GEOS_DLL_EXPORT for GEOS DLL target.

git-svn-id: http://svn.osgeo.org/geos/trunk@3223 5242fede-7e19-0410-aef8-94bd7d2200fb
  • Loading branch information
mloskot committed Feb 18, 2011
1 parent 07a28b4 commit 4946345
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
5 changes: 4 additions & 1 deletion capi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ add_library(geos_c SHARED ${geos_c_SOURCES})
target_link_libraries(geos_c geos)

# TODO: Enable SOVERSION property
set_target_properties(geos_c PROPERTIES VERSION ${CAPI_VERSION})
set_target_properties(geos_c
PROPERTIES
VERSION ${CAPI_VERSION}
CLEAN_DIRECT_OUTPUT 1)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos_c.h
DESTINATION include)
Expand Down
16 changes: 11 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,18 @@ file(GLOB_RECURSE geos_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
add_library(geos SHARED ${geos_SOURCES})
add_library(geos-static STATIC ${geos_SOURCES})

set_target_properties(geos-static PROPERTIES OUTPUT_NAME "geos")
set_target_properties(geos PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(geos-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)

# TODO: Enable SOVERSION property
set_target_properties(geos PROPERTIES VERSION ${VERSION})
set_target_properties(geos
PROPERTIES
DEFINE_SYMBOL GEOS_DLL_EXPORT
VERSION ${VERSION}
CLEAN_DIRECT_OUTPUT 1)

set_target_properties(geos-static
PROPERTIES
OUTPUT_NAME "geos"
PREFIX "lib"
CLEAN_DIRECT_OUTPUT 1)

install(TARGETS geos geos-static
RUNTIME DESTINATION bin
Expand Down

0 comments on commit 4946345

Please sign in to comment.