fixed: we need different paths in installed and in-tree config file

fixes #44
This commit is contained in:
Arne Morten Kvarving
2015-09-21 14:21:21 +02:00
parent 8cd76e6d9e
commit 0b321d31ef
2 changed files with 8 additions and 3 deletions

View File

@@ -73,6 +73,7 @@ function (opm_cmake_config name)
set (template_dir "${OPM_MACROS_ROOT}/cmake/Templates")
# write configuration file to locate library
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INTREE})
configure_cmake_file (${name} "config" "")
configure_cmake_file (${name} "config" "-version")
configure_vars (
@@ -109,6 +110,7 @@ function (opm_cmake_config name)
)
# create a config mode file which targets the install directory instead
# of the build directory (using the same input template)
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INSTALLED})
configure_cmake_file (${name} "install" "")
configure_vars (
FILE CMAKE "${PROJECT_BINARY_DIR}/${${name}_NAME}-install.cmake"