<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi everyone,</p>
<p><br>
</p>
<p>i've the following code: </p>
<pre>macro(bsBuildLibExamples lib)
# get all examples
get_cmake_property(_vars VARIABLES)
foreach(_var ${_vars})
string(TOUPPER ${lib} lib_upper)
set(WITH_LIB_${lib_upper}_EXAMPLES "")
if(_var MATCHES "^WITH_LIB_${lib_upper}_EXAMPLE_([A-Za-z]+)$")
message(STATUS "Example found: ${CMAKE_MATCH_1}")
list(APPEND ${WITH_LIB_${lib_upper}_EXAMPLES} ${CMAKE_MATCH_1})
endif()
endforeach()
message(STATUS "Glad examples: ${WITH_LIB_GLAD_EXAMPLES}")
message(STATUS "GLFW examples: ${WITH_LIB_GLFW_EXAMPLES}")
endmacro()
</pre>
<p>The problem is that ${WITH_LIB_${lib_upper}_EXAMPLES} is not
available anymore after the foreach, i was not able to find
something in the docs about this, i hope someone here can help me
out.</p>
<p><br>
</p>
<p>best regrads!<br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>