On Fri, 2019-05-31 at 20:43 +0200, Steven Truppe wrote: > macro(bsAddLibrary lib) > # get all WITH_LIB varables > message(STATUS "${lib}") > > get_cmake_property(_variables VARIABLES) > foreach(_var ${_variables}) > > -->> (${lib} is "WITH_LIB_GLAD" but allways return false =( > if(_var STREQUAL ${lib})
Should be: if(_var STREQUAL lib) due to how if() expands variable references. https://cmake.org/cmake/help/v3.14/command/if.html#variable-expansion Kyle -- 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