Commit 37dac5c8 authored by Ansgar Burchardt's avatar Ansgar Burchardt Committed by ansgar
Browse files

Add partial cmake support (still missing tests).

[[Imported from SVN: r12683]]
parent adb2395d
project("dune-elasticity" CXX)
cmake_minimum_required(VERSION 2.8.6)
find_package(dune-common)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH})
include(DuneMacros)
dune_project()
add_subdirectory("dune")
add_subdirectory("m4")
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
if(NOT @DUNE_MOD_NAME@_FOUND)
#compute installation prefix relative to this file
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_prefix "${_dir}/../../.." ABSOLUTE)
#import the target
#include("${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
#report other information
set(@DUNE_MOD_NAME@_PREFIX "${_prefix}")
set(@DUNE_MOD_NAME@_INCLUDE_DIRS "${_prefix}/include")
set(@DUNE_MOD_NAME@_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
set(@DUNE_MOD_NAME@_DEPENDS "@DUNE_DEPENDS@")
set(@DUNE_MOD_NAME@_SUGGESTS "@DUNE_SUGGESTS@")
set(@DUNE_MOD_NAME@_MODULE_PATH "${_prefix}/@DUNE_INSTALL_MODULEDIR@")
endif(NOT @DUNE_MOD_NAME@_FOUND)
\ No newline at end of file
if(NOT @DUNE_MOD_NAME@_FOUND)
#compute installation prefix relative to this file
get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_prefix "${_dir}/../../.." ABSOLUTE)
#import the target
#include("${_prefix}/lib/cmake/@DUNE_MOD_NAME@-targets.cmake")
#report other information
set(@DUNE_MOD_NAME@_PREFIX "${_prefix}")
set(@DUNE_MOD_NAME@_INCLUDE_DIRS "${_prefix}/include")
set(@DUNE_MOD_NAME@_CXX_FLAGS "@CMAKE_CXX_FLAGS@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@")
set(@DUNE_MOD_NAME@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
set(@DUNE_MOD_NAME@_DEPENDS "@DUNE_DEPENDS@")
set(@DUNE_MOD_NAME@_SUGGESTS "@DUNE_SUGGESTS@")
set(@DUNE_MOD_NAME@_MODULE_PATH "${_prefix}/@DUNE_INSTALL_MODULEDIR@")
endif(NOT @DUNE_MOD_NAME@_FOUND)
\ No newline at end of file
set(PACKAGE_VERSION "@DUNE_MOD_VERSION@")
if(NOT "${PACKAGE_FIND_VERSION}" VERSION_GREATER "@DUNE_MOD_VERSION@")
set (PACKAGE_VERSION_COMPATIBLE 1) # compatible with older
if ("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "@DUNE_MOD_VERSION@")
set(PACKAGE_VERSION_EXACT 1) #exact match for this version
endif()
endif()
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CXX=@CXX@
CC=@CC@
DEPENDENCIES=@REQUIRES@
Name: @PACKAGE_NAME@
Version: @VERSION@
Description: Dune (Distributed and Unified Numerics Environment) elasticity module
URL: http://dune-project.org/
Requires: ${DEPENDENCIES}
Libs:
Cflags: -I${includedir}
add_subdirectory(elasticity)
add_subdirectory(assemblers)
add_subdirectory(common)
add_subdirectory(estimators)
add_subdirectory(materials)
install(FILES
neohookeassembler.cc
neohookeassembler.hh
neohookefunctionalassembler.hh
neohookeoperatorassembler.hh
ogdenassembler.cc
ogdenassembler.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/elasticity/assemblers)
install(FILES
elasticityhelpers.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/elasticity/common)
install(FILES
zienkiewiczzhuestimator.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/elasticity/estimators)
install(FILES
geomexactstvenantkirchhoffmaterial.hh
neohookeanmaterial.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/elasticity/materials)
install(FILES
dune-elasticity.m4
DESTINATION share/aclocal)
Markdown is supported
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