From 6e4b9cd3310fd8a08748ea953df3ce9526b70caf Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 7 May 2023 13:07:02 -0500 Subject: [PATCH] Don't use RelWithDebInfo Conan packages - Some packages fail to build (e.g., libtool) --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 678da305..62bdd8a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,15 @@ set_property(DIRECTORY PROPERTY CMAKE_CONFIGURE_DEPENDS conanfile.txt) -conan_cmake_autodetect(settings) +# Don't use RelWithDebInfo Conan packages +if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") + set(conan_build_type "Release") +else() + set(conan_build_type ${CMAKE_BUILD_TYPE}) +endif() + +conan_cmake_autodetect(settings + BUILD_TYPE ${conan_build_type}) conan_cmake_install(PATH_OR_REFERENCE ${PROJECT_SOURCE_DIR} BUILD missing