From 6d433017a4f9149d5b3848a18cdee41257b87005 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 18 Nov 2013 13:19:18 +0100 Subject: [PATCH] Only add build sub-directory if it is actually used Otherwise the search will cascade down one level too many. --- cmake/Modules/OpmPackage.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/OpmPackage.cmake b/cmake/Modules/OpmPackage.cmake index ec055133..1b1a5bec 100644 --- a/cmake/Modules/OpmPackage.cmake +++ b/cmake/Modules/OpmPackage.cmake @@ -110,10 +110,12 @@ macro (find_opm_package module deps header lib defs prog conf) ) # look in similar dirs for the other module - list (APPEND _guess_bin_only - "../../${module}/${_build_dir}" - "../../${_module_lower}/${_build_dir}" - ) + if (_build_dir) + list (APPEND _guess_bin_only + "../../${module}/${_build_dir}" + "../../${_module_lower}/${_build_dir}" + ) + endif (_build_dir) # generate items that are in the build, not source dir set (_guess_bin)