Allow some template files to keep their Autotools dirs

By using the abs_top_{build,src}dir variables, template files can
co-exist between Autotools and CMake build systems.
This commit is contained in:
Roland Kaufmann 2013-02-21 09:55:03 +01:00
parent 041f3fb881
commit 5810819b95
2 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,7 @@ include (UseMultiArch)
# this module contains code to figure out which files is where
include (OpmFiles)
opm_auto_dirs ()
# put libraries in lib/
opm_out_dirs ()

View File

@ -8,6 +8,13 @@ macro (opm_out_dirs)
set (CMAKE_Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles")
endmacro (opm_out_dirs)
# support for some of the variables that are used in Autotools
# template files
macro (opm_auto_dirs)
set (abs_top_builddir "${PROJECT_BINARY_DIR}")
set (abs_top_srcdir "${PROJECT_SOURCE_DIR}")
endmacro (opm_auto_dirs)
macro (opm_sources opm)
# find all the source code (note that these variables have name after
# the target library and not the project). the documentation recommends