You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using add_requires to import cmake packages and then use add_packages in Windows, generated CMakeLists.txt will enumerate all possible compile definition like this:
Please use add_requires("opencv") instead of cmake::OpenCV whenever possible. Getting link information from cmake::OpenCV is unreliable.
Thanks for your reply. I have to use OpenCV with specific versions and options , so I can't simply use add_requires. Can I pass these options by using something like add_requires("libname", {configs = {option_1 = val_1}}), or I should create a local xrepo to do this?
I found Open3D hits the same issue too, but I didn't test more libs. For more convenience, is there a list of libs that should or shouldn't be located by cmake?
Xmake Version
xmake v2.8.9+HEAD.cb1b65054
Operating System Version and Architecture
Windows 11 22631.3296
Describe Bug
When using
add_requires
to import cmake packages and then useadd_packages
in Windows, generated CMakeLists.txt will enumerate all possible compile definition like this:Full CMakeLists.txt generated in Windows
Change platform into linux, generated CMakeLists.txt won't have these weird compile definitions.
Full CMakeLists.txt generated in Linux
Expected Behavior
In Windows, generated CMakeLists.txt with cmake "Local Package" should not have all possible definitions in
target_compile_definitions
Project Configuration
Additional Information and Error Logs
Use below commands to reproduce:
Info of Windows:
Info of Linux:
The text was updated successfully, but these errors were encountered: