Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve copy pdb with cmake package #5566

Open
star-hengxing opened this issue Sep 4, 2024 · 2 comments
Open

Improve copy pdb with cmake package #5566

star-hengxing opened this issue Sep 4, 2024 · 2 comments
Labels

Comments

@star-hengxing
Copy link
Contributor

Xmake Version

dev

Operating System Version and Architecture

Windows

Describe Bug

add_requires("flecs", {debug = true, system = false, configs = {shared = true}})

install dir:

$ eza -T bin
bin
├── flecs.dll
└── vc140.pdb
$ eza -T lib
lib
├── cmake
│  └── flecs
│     ├── flecs-config-debug.cmake
│     └── flecs-config.cmake
├── flecs.lib
└── pkgconfig
   └── flecs.pc

build dir:

$ eza --long
-a---  94k  4 build.ninja
-a--- 4.6k  4 cmake_install.cmake
-a---  18k  4 CMakeCache.txt
d----    -  4 CMakeFiles
-a--- 3.6M  4 flecs.dll
-a--- 129k  4 flecs.exp
-a--- 5.7M  4 flecs.ilk
-a--- 196k  4 flecs.lib
-a---  10M  4 flecs.pdb
d----    -  4 install
-a---  22k  4 install_manifest.txt
d----    -  4 pdb

The install dir missing flecs.pdb.

Expected Behavior

Improve this code or patch cmakelists (How?)

if package:is_plat("windows") and os.isdir("pdb") then
if package:config("shared") or not package:is_library() then
os.trycp("pdb/**.pdb", package:installdir("bin"))
else
os.trycp("pdb/**.pdb", package:installdir("lib"))
end
end

Project Configuration

N/A

Additional Information and Error Logs

N/A

@waruqi
Copy link
Member

waruqi commented Sep 4, 2024

这种没办法,cmake 里面搞得这么随意,要么只能改成 **.pdb ,全目录搜,但这样可能会影响安装速度,要是文件太多,安装会变得很慢。

要么只能针对特定包,install 后,额外 os.cp 下就行了。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


There is no way around this, cmake is so random, or you can only change it to **.pdb and search the whole directory, but this may affect the installation speed. If there are too many files, the installation will become very slow.

Or it can only be used for specific packages. After installation, just download the additional os.cp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants