[CMake] Adding CMAKE_BUILD_TYPE support to ProjectConfig.cmake
J Decker
d3ck0r at gmail.com
Mon Dec 16 21:29:43 EST 2013
build with multiple passes... 1 time release, and 1 time debug. Don't
think about building both at once....
On Mon, Dec 16, 2013 at 8:59 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
> Hi,
>
> I've started adding the config mode support to my CMake-based
> projects and with quite a success.
>
> So far, I have basic understanding of what it takes in practice to enable
> config mode and there is still more to learn for me.
>
> TL;TR: How to make use of CMAKE_BUILD_TYPE in config mode?
> Could anyone update the tutorial [1] with related notes?
>
> I'm considering basic scenario:
> - FooBar is a library with ProjectConfig.cmake support
> - FooBarUser is an external project that find_package() the FooBar
> and links against FooBar through its exported target
> - during development, FooBar is *not* installed, but referred to from
> its build directory
>
> How can FooBarUser look for and link against Debug or Release variant
> of FooBar depending on CMAKE_BUILD_TYPE,
> given both variants live in separate directories?
>
> How does the package registry work here?
>
> [1] http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
>
> Best regards,
> --
> Mateusz Łoskot, http://mateusz.loskot.net
> --
>
> 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:
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list