summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wong <mark@2ndQuadrant.com>2019-06-26 22:45:00 +0000
committerMark Wong <mark@2ndQuadrant.com>2019-06-27 01:26:11 +0000
commit901f7ad18b1f07ef3ae7ebd4cf8afe41eea5fffe (patch)
treef2835350a31098118d6c91224bdce14ecff26154
parent7f7ed7c33f6c9f437ef4409a155e9f9932847acb (diff)
Fix handling of install prefix
Fall back to default cmake handling of the installation prefix. It was being overriden with custom cmake rules, which didn't work smoothly with other normal uses of CMAKE_INSTALL_PREFIX and DESTDIR when using cmake.
-rw-r--r--CMakeLists.txt8
-rw-r--r--INSTALL4
2 files changed, 4 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c86bdb..8608569 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,10 +18,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Handle cmake -D command line options
-if (DESTDIR)
- set(INSTALLDEST ${DESTDIR})
-endif (DESTDIR)
-
if (NOT DEFINED ENABLE_COLOR)
set(ENABLE_COLOR 1)
elseif(ENABLE_COLOR EQUAL 0)
@@ -281,12 +277,12 @@ endif(${MACHINE} STREQUAL freebsd)
install(
PROGRAMS
${CMAKE_BINARY_DIR}/${PROJECT_NAME}
- DESTINATION "${INSTALLDEST}/bin"
+ DESTINATION "bin"
)
install(
FILES
${CMAKE_BINARY_DIR}/pg_top.1
- DESTINATION "${INSTALLDEST}/share/man/man1"
+ DESTINATION "share/man/man1"
)
# CPack rules for creating distribution files.
diff --git a/INSTALL b/INSTALL
index 7c268cb..08016d1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -13,9 +13,9 @@ cmake [options] CMakeLists.txt
options:
- -DDESTDIR=PREFIX
+ -DCMAKE_INSTALL_PREFIX=PREFIX
- Install files in PREFIX.
+ Install files in PREFIX. Default is '/usr/local'.
-DENABLE_COLOR=0