Commit edb5f6e6 authored by Elias Pipping's avatar Elias Pipping Committed by pipping
Browse files

Regenerate build system using duneproject

This takes care of shipping cmake files, installing documentation
properly, etc.

[[Imported from SVN: r12963]]
parent ccc989e7
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
project("dune-solvers" CXX)
cmake_minimum_required(VERSION 2.8.6)
project(dune-solvers CXX)

if(NOT (dune-common_DIR OR dune-common_ROOT))
  string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR ${PROJECT_BINARY_DIR})
if(NOT (dune-common_DIR OR dune-common_ROOT OR
      "${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
    string(REPLACE  ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
      ${PROJECT_BINARY_DIR})
endif()

#find dune-common and set the module path
find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH})
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
  ${dune-common_MODULE_PATH})

#include the dune macros
include(DuneMacros)

# start a dune project with information from dune.module
dune_project()

add_subdirectory("doc")
add_subdirectory("dune")
add_subdirectory("m4")
add_subdirectory("dune")
add_subdirectory("doc")
add_subdirectory("cmake/modules")

# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
+12 −5
Original line number Diff line number Diff line
# $Id: duneproject 5500 2009-04-03 13:45:04Z sander $
# $Id$

# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
EXTRA_DIST = dune.module \
  CMakeLists.txt \
  config.h.cmake

SUBDIRS = m4 dune
SUBDIRS = m4 dune doc cmake

if BUILD_DOCS
SUBDIRS += doc
endif

# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5
# we need automake 1.9 or newer
AUTOMAKE_OPTIONS = foreign 1.9

# pass most important options when "make distcheck" is used
# dune-geometry is a dependency of dune-grid.
@@ -19,3 +21,8 @@ DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-g

include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules

# Generate package configuration files for finding
# installed modules with CMake
include $(top_srcdir)/am/cmake-pkg-config
+3 −3
Original line number Diff line number Diff line
@@ -4,9 +4,9 @@ Preparing the Sources
Additional to the software mentioned in README you'll need the
following programs installed on your system:

  automake >= 1.5
  automake >= 1.9

  autoconf >= 2.50
  autoconf >= 2.62

  libtool

@@ -69,5 +69,5 @@ for further options.

The full build-system is described in the dune-common/doc/buildsystem (SVN version) or under share/doc/dune-common/buildsystem if you installed DUNE!

$Id: duneproject 5500 2009-04-03 13:45:04Z sander $
$Id$

cmake/Makefile.am

0 → 100644
+3 −0
Original line number Diff line number Diff line
SUBDIRS = modules

include $(top_srcdir)/am/global-rules
+3 −0
Original line number Diff line number Diff line
set(modules "DuneSolversMacros.cmake")

install(FILES ${modules} DESTINATION ${DUNE_INSTALL_MODULEDIR})
Loading