Skip to content
Browse files

[CMake] Updated include directories scheme to deal with mixed ways of…

… including config and internal headers across the PostGIS sources (e.g. liblwgeom_internal.h vs ../postgis_config.h)
  • Loading branch information...
1 parent 4d5153e commit e2949c347a8a157b7216b565c46e6233d49e5008 @mloskot committed Jul 8, 2012
Showing with 13 additions and 3 deletions.
  1. +5 −1 CMakeLists.txt
  2. +3 −2 liblwgeom/CMakeLists.txt
  3. +5 −0 libpgcommon/CMakeLists.txt
View
6 CMakeLists.txt
@@ -185,11 +185,15 @@ set(SRID_USR_MAX 998999)
################################################################################
# Configure all subdirectories with any build targets
add_subdirectory(liblwgeom)
-add_subdirectory(libpgcommon)
get_property(LIBLWGEOM_INCLUDE_DIRS GLOBAL PROPERTY LIBLWGEOM_INCLUDE_DIRS)
include_directories(${LIBLWGEOM_INCLUDE_DIRS})
+add_subdirectory(libpgcommon)
+
+get_property(LIBPGCOMMON_INCLUDE_DIRS GLOBAL PROPERTY LIBPGCOMMON_INCLUDE_DIRS)
+include_directories(${LIBPGCOMMON_INCLUDE_DIRS})
+
################################################################################
# Install
# TODO
View
5 liblwgeom/CMakeLists.txt
@@ -1,6 +1,7 @@
configure_file(liblwgeom.h.in ${CMAKE_CURRENT_BINARY_DIR}/liblwgeom.h)
-set_property(GLOBAL PROPERTY
- LIBLWGEOM_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+set_property(GLOBAL PROPERTY LIBLWGEOM_INCLUDE_DIRS
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# TODO
View
5 libpgcommon/CMakeLists.txt
@@ -1,3 +1,8 @@
+set_property(GLOBAL PROPERTY LIBPGCOMMON_INCLUDE_DIRS
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
set(HEADERS
lwgeom_pg.h
lwgeom_transform.h

0 comments on commit e2949c3

Please sign in to comment.
Something went wrong with that request. Please try again.