From 6a535b03f63327b1448a42804a4601530c6c4466 Mon Sep 17 00:00:00 2001 From: The Coriolis Project Date: Wed, 28 Apr 2010 21:57:14 +0000 Subject: [PATCH] Coorect pathes detection. --- vlsisapd/cmake_modules/FindIO.cmake | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/vlsisapd/cmake_modules/FindIO.cmake b/vlsisapd/cmake_modules/FindIO.cmake index 5f742dac..602a57f3 100644 --- a/vlsisapd/cmake_modules/FindIO.cmake +++ b/vlsisapd/cmake_modules/FindIO.cmake @@ -9,21 +9,17 @@ 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) + LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_TOP}") ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) + + IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) + MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}") + LIST(INSERT ${project}_DIR_SEARCH 0 "$ENV{${project}_USER_TOP}") + ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) + + LIST(REMOVE_DUPLICATES ${project}_DIR_SEARCH) ENDMACRO(SETUP_SEARCH_DIR project) MACRO(SET_FOUND project)