Skip to content

Conversation

@Priyadarshan-Garg
Copy link

Fixed build failure for clfml-lowwi on windows-x64.

Changes:

  • Disabled example projects in CMakeLists.txt via portfile to prevent configuration errors and race conditions.
  • Updated vcpkg.json to properly configure onnxruntime dependency.
  • Corrected the installation script in portfile.cmake to handle header files and dependencies correctly (manual install).
  • Verified the build locally on x64-windows.

@Priyadarshan-Garg
Copy link
Author

@microsoft-github-policy-service agree

SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DCLFML_LOWWI_BUILD_EXAMPLE_PROJECTS=OFF" # <--- YE HAI SOLUTION (No Examples = No SDL2 Download)
"-DFETCHCONTENT_FULLY_DISCONNECTED=OFF" # Onnx ke liye internet on rakha hai
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. vcpkg intentionally sets FETCHCONTENT_FULLY_DISCONNECTED to prevent vendoring of dependencies. If possible, replace the necessary dependencies with vcpkg ports; if no port exists, then explicitly acquire the dependencies as part of the portfile.

)

# 2. Build Only
vcpkg_cmake_build()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use vcpkg_cmake_install() if the upstream CMakeLists.txt does not have install targets then we would prefer to patch it so it does.

@@ -0,0 +1,13 @@
{
"name": "clfml-lowwi",
"version": "3.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is missing version database files, please run vcpkg x-add-version clfml-lowwi and commit the results.

Comment on lines +27 to +29
# B. Libraries copy karo (Release)
file(GLOB_RECURSE REL_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib")
file(INSTALL ${REL_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# B. Libraries copy karo (Release)
file(GLOB_RECURSE REL_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib")
file(INSTALL ${REL_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
# B. Libraries copy karo (Release)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(GLOB_RECURSE REL_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib")
file(INSTALL ${REL_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
endif()

But it would be really preferable if you could patch CMakeLists.txt so that we can do vcpkg_cmake_install

Comment on lines +32 to +33
file(GLOB_RECURSE DBG_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib")
file(INSTALL ${DBG_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file(GLOB_RECURSE DBG_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib")
file(INSTALL ${DBG_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(GLOB_RECURSE DBG_LIB "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib")
file(INSTALL ${DBG_LIB} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
endif()

Same as above, it would be better to use vcpkg_cmake_install

@vicroms vicroms marked this pull request as draft January 28, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants