Skip to content

Commit

Permalink
pkg-config: restore functionality (via CMake), change Cflags (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtoews committed Jun 15, 2020
1 parent 992d01f commit 3f5b926
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -16,4 +16,3 @@ docs/build
install_manifest.txt
docs/doxygen/html/
docs/doxygen/xml
src/libspatialindex.pc
14 changes: 14 additions & 0 deletions CMakeLists.txt
Expand Up @@ -244,6 +244,20 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libspatialindexConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/cmake/libspatialindex)

#------------------------------------------------------------------------------
# pkg-config support
#------------------------------------------------------------------------------
if(NOT WIN32)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/libspatialindex.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libspatialindex.pc
@ONLY)

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libspatialindex.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
endif()

#------------------------------------------------------------------------------
# CPack controls
#------------------------------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions src/libspatialindex.pc.in
@@ -1,12 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/@LIB_INSTALL_DIR@
includedir=${prefix}/@INCLUDE_INSTALL_DIR@

Name: libspatialindex
Description: Generic C/C++ library for spatial indexing
Requires:
Version: @PACKAGE_VERSION@
Libs: -L@libdir@ -lspatialindex
Cflags: -I${includedir}/spatialindex
Version: @SIDX_VERSION_STRING@
Libs: -L${libdir} -lspatialindex
Cflags: -I${includedir}

0 comments on commit 3f5b926

Please sign in to comment.