# Note the double de-reference of "referenceVariable":
SET(_tmp_ROOT_DIR "${${referenceVariable}}")
ENDIF()
- IF(${upCount})
- FOREACH(_unused RANGE 1 ${upCount})
+ # Up cound can be reset by detection procedure
+ SET(_upCount ${upCount})
+ IF(DEFINED ${pkg_UC}_UPCOUNT)
+ SET(_upCount ${${pkg_UC}_UPCOUNT})
+ ENDIF()
+ IF(${_upCount})
+ FOREACH(_unused RANGE 1 ${_upCount})
GET_FILENAME_COMPONENT(_tmp_ROOT_DIR "${_tmp_ROOT_DIR}" PATH)
ENDFOREACH()
ENDIF()