Skip to content
Snippets Groups Projects
Commit b1b6e414 authored by Markus Blatt's avatar Markus Blatt
Browse files

- List the cmake modules explicitly (file(GLOB will not detect changes

  after configure)
- Make CMake module installation path configurable
- Detect CMAKE_MODULE_PATH automatically
  + First call find_package(dune-common) to query its CMAKE_MODULE_PATH
  + Then setup the module path
  + After each find_package of dune module update the CMAK_MODULE_PATH
  + each module exports ist own <package-name>_MODULE_PATH in the
  + package configuration files

[[Imported from SVN: r1714]]
parent ced5acb6
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,10 @@ project("dune-istl" C CXX)
# general stuff
cmake_minimum_required(VERSION 2.8)
# make sure our own modules are found
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
#find dune-common and set the module path
find_package(dune-common)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/modules")
#include the dune macros
include(DuneMacros)
......
file(GLOB modules *.cmake)
set(modules DuneIstlMacros.cmake
FindSuperLU.cmake)
install(FILES ${modules} DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/cmake/modules)
${DUNE_INSTALL_MODULEDIR})
......@@ -15,4 +15,5 @@ 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 "@DUNE_INSTALL_MODULEDIR@")
endif(NOT @DUNE_MOD_NAME@_FOUND)
\ No newline at end of file
......@@ -13,4 +13,5 @@ set(@DUNE_MOD_NAME@_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@")
set(@DUNE_MOD_NAME@_LIBRARIES "")
set(@DUNE_MOD_NAME@_DEPENDS "@DUNE_DEPENDS@")
set(@DUNE_MOD_NAME@_SUGGESTS "@DUNE_SUGGESTS@")
set(@DUNE_MOD_NAME@_MODULE_PATH "@CMAKE_SOURCE_DIR@/cmake/modules")
endif(NOT @DUNE_MOD_NAME@_FOUND)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment