From 8725bd0573c9b7583e082a058237d3446c12e575 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 22 May 2020 13:13:46 -0700 Subject: [PATCH] Simplify package-relative installation --- .cmake/isce2_helpers.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.cmake/isce2_helpers.cmake b/.cmake/isce2_helpers.cmake index f147569..8e67efa 100644 --- a/.cmake/isce2_helpers.cmake +++ b/.cmake/isce2_helpers.cmake @@ -50,22 +50,16 @@ endfunction() # Note that it first checks if a provided file is a target, # and if so, installs it as a TARGET instead. Make sure your # filenames and target names don't have any overlap! - function(InstallSameDir) -mark_as_advanced(isce2_bin_base) foreach(name ${ARGN}) if(TARGET ${name}) set(installtype TARGETS) else() set(installtype FILES) endif() - file(RELATIVE_PATH path ${isce2_bin_dir} ${CMAKE_CURRENT_BINARY_DIR}) + file(RELATIVE_PATH path ${isce2_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) install(${installtype} ${name} DESTINATION ${ISCE2_PKG}/${path} ) endforeach() endfunction() -# We use this instead of CMAKE_BINARY_DIR to handle -# cases where isce2 is added as a subdirectory -set(isce2_bin_dir ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH - "ISCE2 root build directory")