From 8c8a2ce74ccf0918b7a27cb51f17c2063788b711 Mon Sep 17 00:00:00 2001 From: Dilawar Singh <dilawars@ncbs.res.in> Date: Thu, 1 Mar 2018 15:14:07 +0000 Subject: [PATCH] Install in debian layout in packages. Added option in setup.cfg file Its delicate solution. Added a note. --- moose-core/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/moose-core/CMakeLists.txt b/moose-core/CMakeLists.txt index 6b40a8ed..a513d76e 100644 --- a/moose-core/CMakeLists.txt +++ b/moose-core/CMakeLists.txt @@ -426,9 +426,14 @@ message( STATUS "Platform ${_platform_desc}" ) # is most likely to be --install-layout=deb . set(EXTRA_ARGS "--prefix ${CMAKE_INSTALL_PREFIX} ${DISTUTILS_EXTRA_ARGS}") -# On Debian/Ubuntu install using debian layout +# On Debian/Ubuntu install using debian layout. +# NOTE: Also create setup.cfg file which setup prefix and install-layout +# suitable for DEBIAN systems. if( ${_platform_desc} MATCHES ".*(Ubuntu|Debian).*" ) list( APPEND EXTRA_ARGS "--install-layout=deb" ) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/python/setup.cfg + "[install]\nprefix=/usr\ninstall-layout=deb" + ) endif( ) # If make is called with sudo, install in system directories. Otherwise use @@ -463,7 +468,6 @@ endif( ) # NOTE: creating bdist or bdist_dump uses /usr and /usr/local on rpm and deb # based unix respectively. Not a great situation to be in. Need to write a # setup.cfg file to fix the prefix in all cases. -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/python/setup.cfg "[install]\nprefix=/usr" ) find_package( PythonInterp REQUIRED) add_custom_target( bdist COMMAND ${PYTHON_EXECUTABLE} setup.cmake.py bdist_dumb -d ${PYMOOSE_BDIST_DIR} -- GitLab