summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-21 13:05:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-21 13:05:32 +0200
commit178cb1dbf4828d8bd4048674cb32aeef7ecf6e31 (patch)
tree464012b0af60d62c7bbe3a53e6f23154bdf62f41
parentef5ced86c22f2c83bd3f03931c7cde4c0c41a5c8 (diff)
cmake: move install pdb as separate function
-rw-r--r--cmake/opentrack-boilerplate.cmake12
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()