From 178cb1dbf4828d8bd4048674cb32aeef7ecf6e31 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 21 Sep 2016 13:05:32 +0200 Subject: cmake: move install pdb as separate function --- cmake/opentrack-boilerplate.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 21451090..de6330a6 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -115,6 +115,13 @@ function(opentrack_is_target_c_only ret srcs) set(${ret} "${val}" PARENT_SCOPE) endfunction() +function(opentrack_install_pdb_current_project) + if(MSVC) + file(GLOB_RECURSE pdbs "${CMAKE_CURRENT_BINARY_DIR}/*.pdb") + install(FILES ${pdbs} DESTINATION "${subdir}" ${opentrack-perms}) + endif() +endfunction() + function(opentrack_boilerplate n) message(STATUS "module ${n}") cmake_parse_arguments(arg @@ -204,10 +211,7 @@ function(opentrack_boilerplate n) set(subdir "${opentrack-hier-pfx}") install(TARGETS "${n}" ${opentrack-hier-str} ${opentrack-perms}) endif() - if(MSVC) - file(GLOB_RECURSE pdbs "${CMAKE_CURRENT_BINARY_DIR}/*.pdb") - install(FILES ${pdbs} DESTINATION "${subdir}" ${opentrack-perms}) - endif() + opentrack_install_pdb_current_project() endif() endif() endfunction() -- cgit v1.2.3