Skip to content
Snippets Groups Projects
Commit ac2ffb6e authored by Dilawar Singh's avatar Dilawar Singh
Browse files

On debian pass -DDISTUTILS_EXTRA_ARGS=--install-layout-deb to downstream

cmake.
parent 6b8b906d
No related branches found
No related tags found
No related merge requests found
...@@ -36,9 +36,27 @@ if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3) ...@@ -36,9 +36,27 @@ if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3)
set(WITH_GUI OFF) set(WITH_GUI OFF)
endif( ) endif( )
# On debian or ubuntu, --install-layout=deb needs to be passed.
if(UNIX AND NOT APPLE)
find_program(LSB_RELEASE lsb_release)
if(LSB_RELEASE)
execute_process(COMMAND ${LSB_RELEASE} -is
OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(${LSB_RELEASE_ID_SHORT} STREQUAL "Ubuntu"
OR ${LSB_RELEASE_ID_SHORT} STREQUAL "Debian" )
message(STATUS "Debian based LINUX: ${LSB_RELEASE_ID_SHORT}" )
set(CMAKE_PYMOOSE_ARGS "-DDISTUTILS_EXTRA_ARGS=\"--install-layout=deb\"" )
endif( )
endif( )
endif( )
add_custom_target(moose ALL) add_custom_target(moose ALL)
## intialize paths
set(PYMOOSE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/moose-core") set(PYMOOSE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/moose-core")
set(PYMOOSE_BUILD_DIR ${CMAKE_BINARY_DIR}/__moose-core_build) set(PYMOOSE_BUILD_DIR ${CMAKE_BINARY_DIR}/__moose-core_build)
set(PYMOOSE_INSTALL_DIR ${CMAKE_BINARY_DIR}/__moose-core_install) set(PYMOOSE_INSTALL_DIR ${CMAKE_BINARY_DIR}/__moose-core_install)
...@@ -131,7 +149,7 @@ if(WITH_GUI) ...@@ -131,7 +149,7 @@ if(WITH_GUI)
${CMAKE_INSTALL_PREFIX}/lib/moose/gui ${CMAKE_INSTALL_PREFIX}/lib/moose/gui
COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moose COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_INSTALL_PREFIX}/bin/moose
) )
add_dependencies( uninstall __uninstall_moose-gui__ ) #add_dependencies( uninstall __uninstall_moose-gui__ )
endif() endif()
################################################################################ ################################################################################
......
...@@ -3,13 +3,23 @@ set -x ...@@ -3,13 +3,23 @@ set -x
set -e set -e
# NOTICE: This file is parsed by cmake to create a shell script. Not all syntax # NOTICE: This file is parsed by cmake to create a shell script. Not all syntax
# will play well with cmake. CMAKE replaces @FOO@ and ${FOO} with cmake variable # will play well with cmake.
#
# CMAKE replaces @FOO@ and ${FOO} with cmake variable
# values. # values.
if [ -z "$MAKE" ]; then if [ -z "$MAKE" ]; then
MAKE=make MAKE=make
fi fi
CMAKE_PYMOOSE_ARGS=''
SITE_PACKAGE=`@PYTHON_EXECUTABLE@ -c \
"from distutils.sysconfig import get_python_lib; print(get_python_lib())"`
echo $SITE_PACKAGE
# If we are on DEBIAN/UBUNTU, pass --install-layout=deb to moose-core.
echo "Building MOOSE" echo "Building MOOSE"
( (
export GSL_ROOT_DIR=@GSL_ROOT_DIR@ export GSL_ROOT_DIR=@GSL_ROOT_DIR@
......
#!/bin/bash #!/bin/sh
set -x set -x
set -e set -e
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment