diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/ADSP-Common.cmake | 11 | ||||
-rw-r--r-- | Modules/Platform/ADSP-Determine.cmake | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/Modules/Platform/ADSP-Common.cmake b/Modules/Platform/ADSP-Common.cmake index 2ba90b2..7ec8a6f 100644 --- a/Modules/Platform/ADSP-Common.cmake +++ b/Modules/Platform/ADSP-Common.cmake @@ -9,9 +9,9 @@ macro(__platform_adsp_init) set(CMAKE_ADSP_PROCESSOR "ADSP-${CMAKE_SYSTEM_PROCESSOR}") string(TOUPPER "${CMAKE_ADSP_PROCESSOR}" CMAKE_ADSP_PROCESSOR) - set(CMAKE_ADSP_COMPILER_NAME cc21k.exe) + set(CMAKE_ADSP_COMPILER_NAME "cc21k${CMAKE_EXECUTABLE_SUFFIX}") if(CMAKE_ADSP_PROCESSOR MATCHES "^ADSP-BF") - set(CMAKE_ADSP_COMPILER_NAME ccblkfn.exe) + set(CMAKE_ADSP_COMPILER_NAME "ccblkfn${CMAKE_EXECUTABLE_SUFFIX}") endif() set(CMAKE_ADSP_PLATFORM_INITIALIZED TRUE) @@ -20,7 +20,12 @@ endmacro() macro(__platform_adsp lang) __platform_adsp_init() - set(CMAKE_${lang}_COMPILER "${CMAKE_ADSP_ROOT}/${CMAKE_ADSP_COMPILER_NAME}") + find_program( + CMAKE_${lang}_COMPILER + "${CMAKE_ADSP_COMPILER_NAME}" + PATHS "${CMAKE_ADSP_ROOT}" + REQUIRED + ) execute_process( COMMAND "${CMAKE_${lang}_COMPILER}" "-proc=${CMAKE_ADSP_PROCESSOR}" "-version" diff --git a/Modules/Platform/ADSP-Determine.cmake b/Modules/Platform/ADSP-Determine.cmake index 6ccf1ea..1588c92 100644 --- a/Modules/Platform/ADSP-Determine.cmake +++ b/Modules/Platform/ADSP-Determine.cmake @@ -21,6 +21,6 @@ endif() if(NOT CMAKE_ADSP_ROOT) _find_adsp_root("C:/Program Files (x86)/Analog Devices/VisualDSP *") endif() -if(NOT IS_DIRECTORY "${CMAKE_ADSP_ROOT}") - message(FATAL_ERROR "ADSP: could not find CCES/VDSP++ install directory ${CMAKE_ADSP_ROOT}") +if(NOT CMAKE_ADSP_ROOT) + _find_adsp_root("/opt/analog/cces *") endif() |