mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
fix missing debug references in cmake generated (release) target files.
This commit is contained in:
parent
f6f2def009
commit
1c7972a011
@ -95,26 +95,27 @@ if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_I
|
||||
message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.")
|
||||
endif()
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Debug$" 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}/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}/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}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files.
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
|
||||
)
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
|
||||
)
|
||||
endif()
|
||||
list(APPEND CMAKE_PREFIX_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
list(APPEND CMAKE_FIND_ROOT_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
|
||||
)
|
||||
list(APPEND CMAKE_LIBRARY_PATH
|
||||
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
|
||||
)
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||
set(CMAKE_SYSTEM_IGNORE_PATH
|
||||
|
Loading…
x
Reference in New Issue
Block a user