Thanks Bo. I have added the suffix to my libraries already, however with some 3rd party libraries that I am getting with FetchContent, I have no control over how they name their libraries.
Now, their <project>Config.cmake files have release targets that are globbed by one of the CMake config files (which is part of the install process). So CMake 'can' figure out which configuration has been installed and I was hoping that there was a built-in way to distinguish that rather than me writing some custom scripts for it (where the scripts will search for the debug/release target files). On Mon, Apr 9, 2018 at 11:03 PM Bo Zhou <bo.schwarzst...@gmail.com> wrote: > Hi, > > Generally speaking, no, you might have to use the suffix or special name > to distinguish the different library, such as with the "_d" suffix. > > The Boost module of CMake is a considerable example, since it could > generate different names for Debug and Release libraries on Windows. > > At POSIX(UNIX, OSX, Linux), sometimes user mixes the library, it still > works well. On Windows, it's dangerous or even won't work with mixed > libraries which were built by different Visual Studios with different > runtime libraries. > > Cheers. > > On Tue, Apr 10, 2018 at 10:56 AM, Saad Khattak <saadrus...@gmail.com> > wrote: > >> Hi, >> >> When find_package(LibA) sets the LibA_FOUND variable, is it possible to >> know if the package found is the Debug or Release build (or both)? I have a >> fairly complex build setup where I need to be able to distinguish if >> find_package(LibA) found a Debug or Release build. >> >> - Saad >> >> -- >> >> Powered by www.kitware.com >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Kitware offers various services to support the CMake community. For more >> information on each offering, please visit: >> >> CMake Support: http://cmake.org/cmake/help/support.html >> CMake Consulting: http://cmake.org/cmake/help/consulting.html >> CMake Training Courses: http://cmake.org/cmake/help/training.html >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Follow this link to subscribe/unsubscribe: >> https://cmake.org/mailman/listinfo/cmake >> >> >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake