File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,17 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-libmagic-config.cmake.in" DESTIN
3131file (COPY "${CMAKE_CURRENT_LIST_DIR} /magic.def" DESTINATION "${SOURCE_PATH} /src" )
3232file (COPY "${CMAKE_CURRENT_LIST_DIR} /config.h" DESTINATION "${SOURCE_PATH} /src" )
3333
34+ if (VCPKG_CROSSCOMPILING)
35+ vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR} /tools/libmagic" )
36+ elseif (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
37+ set (EXTRA_ARGS "ADD_BIN_TO_PATH" )
38+ endif ()
39+
3440vcpkg_cmake_configure(
3541 SOURCE_PATH ${SOURCE_PATH}
3642)
3743
38- vcpkg_cmake_install()
44+ vcpkg_cmake_install(${EXTRA_ARGS} )
3945vcpkg_copy_pdbs()
4046vcpkg_fixup_pkgconfig()
4147vcpkg_copy_tools(TOOL_NAMES file AUTO_CLEAN)
@@ -47,12 +53,6 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
4753file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /debug/share" )
4854file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /share/${PORT} /man5" )
4955
50- if (VCPKG_CROSSCOMPILING)
51- vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR} /tools/libmagic/bin" )
52- elseif (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
53- set (EXTRA_ARGS "ADD_BIN_TO_PATH" )
54- endif ()
55-
5656if (VCPKG_LIBRARY_LINKAGE STREQUAL static )
5757 file (REMOVE_RECURSE "${CURRENT_PACKAGES_DIR} /bin" "${CURRENT_PACKAGES_DIR} /debug/bin" )
5858endif ()
Original file line number Diff line number Diff line change 1313 "name" : " vcpkg-cmake-config" ,
1414 "host" : true
1515 },
16+ {
17+ "name" : " libmagic" ,
18+ "host" : true
19+ },
1620 {
1721 "name" : " dirent" ,
1822 "platform" : " windows"
You can’t perform that action at this time.
0 commit comments