Re: [CMake] Release and Debug build linking

2015-10-06 Thread Lee Butler
So if this is the case, how does one "write correctly" the find/config module so that both debug and release libraries are found? I've got a library I depend on whose maintainer may not have built the best Find module in the world. I've looked at https://cmake.org/Wiki/CMake/Tutorials/How_to

Re: [CMake] Release and Debug build linking

2015-10-06 Thread Tamás Kenéz
CMake supports multi-config generators such as Visual Studio and Xcode for a long time. There are two flavors of config-modules (and find-modules), the legacy one which creates variables like MY_PACKAGE_LIBRARIES and the install-export kind which creates IMPORTED targets. Both kinds of modules sup

[CMake] Release and Debug build linking

2015-10-06 Thread Lee Butler
I am looking for a way to tell my project to link against external debug libraries with a debug build and external release libraries with a release build with Visual Studio. I sort of want to be able to say something like if (BuildingReleaseConfig) find_package(OtherPackage REQUIRED COMPONENTS