diff --git a/vlsisapd/cmake_modules/FindIO.cmake b/vlsisapd/cmake_modules/FindIO.cmake index 47332682..a205c3e0 100644 --- a/vlsisapd/cmake_modules/FindIO.cmake +++ b/vlsisapd/cmake_modules/FindIO.cmake @@ -7,6 +7,27 @@ SET(IO_FOUND FALSE) +# Setup the DIR_SEARCH_PATH. +MACRO(SETUP_SEARCH_DIR project) + IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) + MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}") + LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX) + IF( DIR_INDEX LESS 0) + LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_USER_TOP}") + ENDIF( DIR_INDEX LESS 0) + ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) + + IF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) + MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}") + LIST(FIND ${project}_DIR_SEARCH "${${project}_DIR_SEARCH}" DIR_INDEX) + IF( DIR_INDEX LESS 0) + LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_TOP}") + ENDIF( DIR_INDEX LESS 0) + ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) +ENDMACRO(SETUP_SEARCH_DIR project) + +SETUP_SEARCH_DIR(IO) + IF(IO_DIR_SEARCH) # AGDS FIND_PATH(AGDS_INCLUDE_DIR