1 #################################################################################
4 # GEOS C library build configuration for CMake build system
6 # Copyright (C) 2009 Mateusz Loskot <mateusz@loskot.net>
8 # This is free software; you can redistribute and/or modify it under
9 # the terms of the GNU Lesser General Public Licence as published
10 # by the Free Software Foundation.
11 # See the COPYING file for more information.
13 #################################################################################
16 add_definitions("-DGEOS_DLL_EXPORT=1")
23 file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue
25 add_library(geos_c SHARED ${geos_c_SOURCES} ${geos_capi_HEADERS})
27 target_link_libraries(geos_c geos)
29 # TODO: Enable SOVERSION property
30 set_target_properties(geos_c
32 VERSION ${CAPI_VERSION}
33 CLEAN_DIRECT_OUTPUT 1)
35 #################################################################################
37 #################################################################################
39 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos_c.h
42 install(TARGETS geos_c
43 RUNTIME DESTINATION bin
44 LIBRARY DESTINATION lib
45 ARCHIVE DESTINATION lib)
47 #################################################################################
48 # Group source files for IDE source explorers (e.g. Visual Studio)
49 #################################################################################
51 source_group("Header Files" FILES ${geos_capi_HEADERS})