From 7fd10cf67b2d3db120b5a35cd115a7627e3805bb Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Tue, 22 Oct 2013 11:32:19 -0700 Subject: [PATCH] Add install targets to all builds --- CMakeLists.txt | 1 + pgsql/CMakeLists.txt | 29 +++++++++++++++++++++++------ pgsql_postgis/CMakeLists.txt | 13 +++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 pgsql_postgis/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index d36fed1..560ea62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,7 @@ include_directories ("${PROJECT_BINARY_DIR}/lib") add_subdirectory (lib) add_subdirectory (pgsql) +add_subdirectory (pgsql_postgis) diff --git a/pgsql/CMakeLists.txt b/pgsql/CMakeLists.txt index 5995507..394185b 100644 --- a/pgsql/CMakeLists.txt +++ b/pgsql/CMakeLists.txt @@ -1,14 +1,20 @@ set ( PC_SOURCES - pc_access.c - pc_inout.c - pc_pgsql.c - ) + pc_access.c + pc_inout.c + pc_pgsql.c + ) set ( PC_HEADERS - pc_pgsql.h - ) + pc_pgsql.h + ) + +set ( PC_INSTALL_EXENSIONS + pointcloud--1.0.sql + pointcloud.control + ) + include_directories ("${PGSQL_INCLUDEDIR_SERVER}") include_directories ("${PROJECT_SOURCE_DIR}/lib") @@ -35,3 +41,14 @@ if (LIBGHT_FOUND) target_link_libraries (pointcloud ght) endif (LIBGHT_FOUND) + +install ( + TARGETS pointcloud + DESTINATION ${PGSQL_PKGLIBDIR} + ) + +install ( + FILES ${PC_INSTALL_EXENSIONS} + DESTINATION "${PGSQL_SHAREDIR}/extension" + ) + diff --git a/pgsql_postgis/CMakeLists.txt b/pgsql_postgis/CMakeLists.txt new file mode 100644 index 0000000..46f6327 --- /dev/null +++ b/pgsql_postgis/CMakeLists.txt @@ -0,0 +1,13 @@ + + + +set ( PCPG_INSTALL_EXENSIONS + pointcloud_postgis--1.0.sql + pointcloud_postgis.control + ) + +install ( + FILES PCPG_INSTALL_EXENSIONS + DESTINATION "${PGSQL_SHAREDIR}/extension" + ) +