From ba62268d4a1cd7db9e66f52e08a393eb6cc2df90 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 7 Nov 2020 00:34:04 +0800 Subject: install bin for tools/cmake --- xmake/modules/package/tools/cmake.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index c81958826..77a204e8b 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -323,12 +323,13 @@ function _install_for_msvc(package, configs, opt) local projfile = os.isfile("INSTALL.vcxproj") and "INSTALL.vcxproj" or "INSTALL.vcproj" if os.isfile(projfile) then os.vrunv(msbuild.program, {projfile, "/property:configuration=" .. (package:debug() and "Debug" or "Release")}, {envs = runenvs}) + os.trycp("install/bin", package:installdir()) os.trycp("install/lib", package:installdir()) -- perhaps only headers library os.trycp("install/include", package:installdir()) else - os.cp("**.lib", package:installdir("lib")) - os.cp("**.dll", package:installdir("lib")) - os.cp("**.exp", package:installdir("lib")) + os.trycp("**.dll", package:installdir("bin")) + os.trycp("**.lib", package:installdir("lib")) + os.trycp("**.exp", package:installdir("lib")) end end @@ -345,9 +346,7 @@ function _install_files_for_cmake(package, opt) local prefixdir_new = package:installdir() io.replace(cmakefile, prefixdir_old, prefixdir_new, {plain = true}) end - if (opt and opt.binary) or package:kind() == "binary" then - os.trycp("install/bin", package:installdir()) - end + os.trycp("install/bin", package:installdir()) os.trycp("install/lib", package:installdir()) os.trycp("install/include", package:installdir()) end -- cgit v1.3.1