Third party package problem


I try to build a project that depends on a third party sdk, which is available as conan package. However, this package only contains a build for CMAKE_BUILD_TYPE “Release”. If I build the project with the CMAKE_BUILD_TYPE in Release, the build succeeds as expected. However, when trying to build in Debug mode, which is required to execute tests, project does not link at all against the third party libraries provided by the package.

My CmakeLists.txt looks something like this:

find_package(xyz REQUIRED)

add_library(mylib SHARED src/file.cpp)

target_link_libraries(mylib PUBLIC xyz::xyz)

Is there a way to link against the “Release” version of the third party package while actually in “Debug”?

Kind regards

before the find_package resolved my problem