diff --git a/moose-core/CMakeLists.txt b/moose-core/CMakeLists.txt index fbfb5bec3057e51907cf1cdee021c6146ca935d8..c03b43d24ffc5c591f3ca649567e6a6c274d0eb1 100644 --- a/moose-core/CMakeLists.txt +++ b/moose-core/CMakeLists.txt @@ -415,9 +415,14 @@ message( STATUS "Platform ${_platform_desc}" ) set(EXTRA_ARGS "--prefix ${CMAKE_INSTALL_PREFIX}") -# 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 @@ -452,7 +457,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}