Permalink
Browse files

Correct non-package installation path

Packages should install to /usr and non-packages to /usr/local

By default, cmake will set the install prefix to /usr/local (yay!) but
we can override this at configuration time using the -D switch.

cmake -DCMAKE_PREFIX_PATH:PATH=<path>

When packaging we need to ensure install points to /usr, which is the
correct place for packaged files to be installed. When installing via
cmake files get installed to /usr/local, as expected

Change-Id: I08d3d6bb21d3040a79caf552e85e14c869079d79
  • Loading branch information...
Ricky Cormier
Ricky Cormier committed Jun 13, 2012
1 parent a48f305 commit 7b401e01ad39d70237ed036f9bd0c8bbaea565b8
Showing with 2 additions and 3 deletions.
  1. +0 −3 CMakeLists.txt
  2. +2 −0 debian/rules
View
@@ -19,9 +19,6 @@ IF(config_file STREQUAL NOTFOUND)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
- # Set install path prefix
- SET(CMAKE_INSTALL_PREFIX /usr)
-
# Release build
SET(CMAKE_BUILD_TYPE release)
ADD_DEFINITIONS(-O2 -DNDEBUG)
View
@@ -5,3 +5,5 @@ export DH_VERBOSE=1
%:
dh $@
+override_dh_auto_configure:
+ cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr/ .

0 comments on commit 7b401e0

Please sign in to comment.