Hi,
I'd like to use my own built libs instead of the system's one by default.
I saw in scripts/buildsystems/vcpkg.cmake(L221) this:
...
if(CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths.
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
list(APPEND CMAKE_LIBRARY_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
)
list(APPEND CMAKE_FIND_ROOT_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
...
The append directive bothers me because the system lib is found before my own on MacOS. (ZLib)
(System lib): /usr/lib/libz.tbd
(My lib): /tmp/test/vcpkg/x86-darwin-release/lib/libz.a
Is there any way to change this behavior ?
For now, my workaround is to change vcpkg's APPEND to PREPEND.
Hi,
I'd like to use my own built libs instead of the system's one by default.
I saw in scripts/buildsystems/vcpkg.cmake(L221) this:
The append directive bothers me because the system lib is found before my own on MacOS. (ZLib)
(System lib): /usr/lib/libz.tbd
(My lib): /tmp/test/vcpkg/x86-darwin-release/lib/libz.a
Is there any way to change this behavior ?
For now, my workaround is to change vcpkg's APPEND to PREPEND.