diff options
-rw-r--r-- | cmake/opentrack-boilerplate.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
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() |