Skip to content

Commit

Permalink
Merge pull request #4314 from KratosMultiphysics/core/minor-cmake-cle…
Browse files Browse the repository at this point in the history
…anup

Minor CMake cleanup and KratosMultiphysics install logic.
  • Loading branch information
roigcarlo authored Mar 1, 2019
2 parents 942c00b + d5615a7 commit 9771a61
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -423,17 +423,17 @@ else(DEFINED KRATOS_INSTALL_PREFIX)
message(STATUS "Standard install dir ${CMAKE_INSTALL_PREFIX}")
endif(DEFINED KRATOS_INSTALL_PREFIX)

# Clean the Module and libs install directories
install(CODE "message(STATUS \"Deleting: ${CMAKE_INSTALL_PREFIX}/KratosMultiphysics\")")
install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/KratosMultiphysics\")")
install(CODE "message(STATUS \"Deleting: ${CMAKE_INSTALL_PREFIX}/libs\")")
install(CODE "file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/libs\")")

################################################################################
# install core files for the KratosMultiphysics python module
install(FILES "${CMAKE_SOURCE_DIR}/kratos/python_interface/__init__.py" DESTINATION KratosMultiphysics )
install(FILES "${CMAKE_SOURCE_DIR}/kratos/python_interface/kratos_globals.py" DESTINATION KratosMultiphysics )
install(FILES "${CMAKE_SOURCE_DIR}/kratos/python_interface/application_importer.py" DESTINATION KratosMultiphysics )

# Remove the tags in the event of multiple versions of boost being found
# in the same directory
# list(REMOVE_ITEM Boost_LIBRARIES "debug" "optimized")

# Install the libraries in the libs folder
install(FILES ${Boost_LIBRARIES} DESTINATION libs)
install(FILES ${EXTRA_INSTALL_LIBS} DESTINATION libs)
Expand All @@ -445,22 +445,3 @@ if(${BLAS_INCLUDE_NEEDED} MATCHES ON )
message("installed lapack = " ${LAPACK_LIBRARIES})
install(FILES ${LAPACK_LIBRARIES} DESTINATION libs)
endif(${BLAS_INCLUDE_NEEDED} MATCHES ON )

################################################################################
if(${INSTALL_PYTHON_FILES} MATCHES ON)
file(WRITE ${CMAKE_SOURCE_DIR}/packaging_aux/kratos.conf "${CMAKE_INSTALL_PREFIX}/libs")

install(FILES ${CMAKE_SOURCE_DIR}/packaging_aux/kratos.conf DESTINATION packaging )
install(FILES ${CMAKE_SOURCE_DIR}/packaging_aux/script.py DESTINATION . )

SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kratos Team") #required
set(CPACK_PACKAGE_FILE_NAME "Kratos_${KratosMultiphysics_VERSION_MAJOR}_${KratosMultiphysics_VERSION_MINOR}")
#SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS} "libc6, libgcc1, libgfortran3, libgomp1, libopenmpi1.3, libparmetis3.1, libstdc++6, openmpi-bin, ${KRATOS_EXTRA_PACKAGE_DEPENDS} " )
# SET(CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS} " openmpi-bin, ${KRATOS_EXTRA_PACKAGE_DEPENDS}" )
Set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/packaging_aux/postinst;${CMAKE_SOURCE_DIR}/packaging_aux/prerm;")

INCLUDE(CPack)
endif(${INSTALL_PYTHON_FILES} MATCHES ON)

0 comments on commit 9771a61

Please sign in to comment.